I have a database I wanted to deploy with my application. So I emptied it, but the size is still HUGE! Even after running DBCC SHRINKFILE (1, 1)
and DBCC SHRINKDATABASE (1, 1)
Can anyone help?
I have a database I wanted to deploy with my application. So I emptied it, but the size is still HUGE! Even after running DBCC SHRINKFILE (1, 1)
and DBCC SHRINKDATABASE (1, 1)
Can anyone help?
If the database is set to use the "Full" recovery mode, then you will not be able to shrink it until you have backed up the transaction logs.
If you don't require the recoverability provided by this recovery mode, set it to Simple, and you should be able to shrink the database without requiring the log backup.
It looks like there are a fair few options on the SHRINKFILE command, rather than repeat them here, try this link, it gives a decent explanation on the comman options, hopefully some of it will help...
You might do better by shipping with scripts rather than an actual database - that way you can avoid, for instance, service pack issues - If you've developed against SP2 of a particular version of SQL Server, people using RTM or SP1 of the same version of SQL would be able to use your scripts, but would be unable to attach an actual db.