Hi I have a very large database (40 gig) and have run the procedure
sp_space_used
and found that there is 10 gig of unallocated space. Obviously this is a lot and the .mdf file is taking up most of the disk. I have looked into running
DBCC SHRINKDATABASE (db, TRUNCATEONLY);
Do I also need to shrink the transaction log or will shrinkdatabase take care of this? What are the negative implications of running this procedure? Can I run this while the db is in use? Please help! I've tried running the shrinkdatabase command but still have lots of unallocated space...
database_size unallocated space
49575.06 MB 8393.49 MB
reserved data index_size unused
42170328 KB 22704672 KB 19099160 KB 366496 KB
NOTE: the db has a simple recovery model so i'm guessing i don't need to backup the log at all...
What is the difference between running
DBCC SHRINKFILE (datafile, TRUNCATEONLY)
to
DBCC SHRINKDATABSE (db, TRUNCATEONLY)?