December 1, 2009 at 6:23 pm
Can anyone explain the functions of transact SQL below.I hv plan to drop non-system stuff from master db to clean up master file due to my current data stored in master database.Can i reuse the master file to create any table after run the transact below?
DBCC SHRINKDATABASE(master)
Your help is appreciated
Dwen
December 1, 2009 at 7:40 pm
ridzuan_first (12/1/2009)
Can anyone explain the functions of transact SQL below.
The DBCC SHRINKDATABASE Shrinks your Database, freeing up some space to the Operating System.
Read Books Online for a detailed information on what it does. It is not a recommended step unless otherwise that is needed.
Can i reuse the master file to create any table after run the transact below?
I guess you mean master database (not master file). If so, are you planning again to use the master database create new tables?
May I ask why ? It is not a recommended that you create any tables and /or change data inside Master Database.
Finally few questions, what size has you Master DB grown now? Without that info I cannot suggest to Shrink or not to.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 1, 2009 at 8:38 pm
As Bru mentioned, you should not have any tables in master. If you need to store data for your application, create a new database and store things there. Do not put anything in master.
December 2, 2009 at 7:40 pm
Yes,master database.Currently size of master database is abt
7GB.I have already moved the data to the new database before clean the master database.However,the size of
master database still show same after drop all the table for clean up.That why i plan to use DBCC SHRINKDATABASE(master) to reduce master database size.Unfortunately,i don't know wht the impact of this command?
Thanks,
Dwen
December 2, 2009 at 7:59 pm
Having Master DB as 7 GB in size is really bad. You can use DBCC SHRINKDATABASE to reclaim the space to the OS.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 2, 2009 at 9:05 pm
Don't shrink it too far. As you add logins and objects it needs to grow a little. I'd give it a 10% pad over what's used and you should be fine.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply