Print Page | Close Window

Unexpected increase in SQL database size

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20704
Printed Date: 29 March 2026 at 7:46pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Unexpected increase in SQL database size
Posted By: PrivateEye
Subject: Unexpected increase in SQL database size
Date Posted: 16 July 2006 at 4:10pm
I imported data from foxpro 2.5 .dbf file into SQL Server 200 table. Foxpro data file size was 75 MB, the new SQL database file size was 80 MB. The structure of the SQL Server table is:
 
Columns: 118
Rows:  105967
I droped many columns in SQL table as they were useless to me and new structure of SQL Server table become
 
Columns: 16
Rows:   105967 (same as above)
 
I then use a simple ASP page to READ the data from SQL Server table. When I looked back on the files size on disk it becomes:
 
Data File Size: 229 MB
Log File Siz: 109 MB
 
I am surprised how data file size is increased whereas I have added no data to the table rather droped so many columns. Any idea about it. Can I reduce the size of the SQL Server database? as I have to upload it on web server and the file size is very strange to me. Please help.


-------------
The Judgement Day



Replies:
Posted By: dpyers
Date Posted: 16 July 2006 at 6:27pm
Usually if you drop that many columns, you'll need to use something like dts to export the remaining data, delete the SQL db, and reload it from the exported data.

Try dropping the columns in foxpro and perform any db compression there before you do the import to SQL Server.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: PrivateEye
Date Posted: 16 July 2006 at 7:46pm

It is not necessary, what I think, to export the data back to the ForxPro. Actually I imported the data through DTS in MS SQL Server, then droped the un-necesary columns and I also don't want to drop the columns first to import the data due to some reasons. Is there any solution that the SQL Server database size can be reduced?



-------------
The Judgement Day


Posted By: dpyers
Date Posted: 16 July 2006 at 8:29pm
You don't have to export back into foxpro, just export to a dts file, delete and then re-instantiate the db, then import the dts file.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: PrivateEye
Date Posted: 16 July 2006 at 8:52pm
Thank you for your suppot, but I found no option to export to DTS in SQL Server. I tried Import Export Wizard. Please guide me how can I export to DTS

-------------
The Judgement Day


Posted By: dpyers
Date Posted: 16 July 2006 at 9:36pm
Technically, what you nead to do is a backup and restore and delete/reallocate the db inbetween. Here's a couple of links I had about that
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx - http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx
http://support.microsoft.com/?id=314546 - http://support.microsoft.com/?id=314546

googling for MS SQL dts backup restore would turn up more links


-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net