SQL Server Performance Forum – Threads Archive
Shrinking database (file) increases size
Dear all, I’ve got a strange problem over here. I have got a backup of a production database (SQL7) I want to use as a development database but it’s way too large. Size of data is 10GBand log is 4GB. There’s about 6GB of data. What I am trying to do is make the database ‘smaller’ because I don’t need all the data. Only a reasonable amount of data is enough for testing purposes. That why I have some delete-scripts to remove about 70% of the data. After running the scripts and rebuilding the indexes there is 2GB data left. So I have 8GB of free space. When I’m trying to shrink the data file using DBCC SHRINKFILE (FILENAME, TARGETSIZE) the amount of data has increased to about 8GB. I can’t find anything on the net about this (my google reflexes are probably a bit rusty [:I]). Any ideas anybody? Thanks in advance! Will.I beleive you need to monitor the database activity to see what exactly contributing this behaviour and having database consistency jobs will have negative affect when you perform a shrink and reindexing process. Linkhttp://www.databasejournal.com/features/mssql/article.php/3339681 is a good reference.
HTH Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
Thanks for the advice. I will give it a try.
]]>