shrink database trought enterprise manager

  • If i shrink (trought enterprise manager) first the data file and only then the log file, will i obtain the same results as if the shrink is made , by starting first shrinking the log file?

    Does the order interests in terms of shrink, when you do the operation trought query analiser?

  • Why do you want to shrink? Databases tend to grow as more data gets put in them. It's in their nature.

    Shrinking causes massive fragmentation and will just result in the data file growing again next time data gets added. When that happens, the entire system will slow down as the file is expanded. Also repeated shrinks and grows will cause fragmentation at the file-system level, which is hard to fix.

    See - http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • The first question to ask is why do you want to shrink the database? If this is a one time operation, then you really need to look at shrinkfile (DBCC SHRINKFILE) instead.

    It won't matter what order, but you do have to understand what will happen if you shrink the data file. Shrinking the data file will cause the indexes in that database to fragment. You will have to rebuild all of the indexes in that database after the shrink.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply