Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Unexpected increase in SQL database size
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Unexpected increase in SQL database size

 Post Reply Post Reply
Author
PrivateEye View Drop Down
Groupie
Groupie
Avatar

Joined: 21 March 2003
Location: United Kingdom
Status: Offline
Points: 168
Post Options Post Options   Thanks (0) Thanks(0)   Quote PrivateEye Quote  Post ReplyReply Direct Link To This Post Topic: Unexpected increase in SQL database size
    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.


Edited by PrivateEye - 16 July 2006 at 4:13pm
The Judgement Day
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
PrivateEye View Drop Down
Groupie
Groupie
Avatar

Joined: 21 March 2003
Location: United Kingdom
Status: Offline
Points: 168
Post Options Post Options   Thanks (0) Thanks(0)   Quote PrivateEye Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
PrivateEye View Drop Down
Groupie
Groupie
Avatar

Joined: 21 March 2003
Location: United Kingdom
Status: Offline
Points: 168
Post Options Post Options   Thanks (0) Thanks(0)   Quote PrivateEye Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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://support.microsoft.com/?id=314546

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


Edited by dpyers - 16 July 2006 at 9:36pm

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.