Results 1 to 2 of 2

Thread: DBCC Shrinkdatabase

  1. #1
    Join Date
    Sep 2002
    Posts
    78

    DBCC Shrinkdatabase

    Hi:
    My database log file had grown upto 2.5 GB and my database is 5 GB. I decided to run the DBCC shrink database. The log file has grown even larger but the data files have reduced in size. I have never seen such a behavior before. Can you tell me what might be causing this to happen ?
    Also, after this happened I backed up the log to a separate backup device and ran the dbcc shrinkfile but I keep getting the message 'Cannot shrink log file 2 dbname log, the log file is in use '.
    I am nor sure what I am doing wrong. Please advise.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Do

    dbcc opentran(dbname)

    to see if there are any open transactions. Any open transaction can cause the transaction log to grow.

    Also when you shrink log file any virtual log file containing active transactions can't be shrunk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •