August 16, 2011 at 1:58 pm
can any one tell me what is the diff between shrinking database and a file?
do we follow shrinking database on production, if,what are the precautions we need to take
during that process?
Thanks in advance.
Harish.G
August 16, 2011 at 2:19 pm
Database has log file and data file. When you shrink database you are shrinking both files. When you are doing shrink file, you can define which file you want to shrink. In some scenarios in production, it is better not to shrink log file as it will cost SQL server to grow it back. But if you have deleted lot of data then shrinking data file only will make sense. In production, you have to be careful and should do this activity within approved maintenance window for that database.
August 16, 2011 at 3:31 pm
If at all possible, you should avoid shrinking a database in production. Shrinking causes fragmentation and impacts performance.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply