DBCC SHRINKDATABASE ERROR

  • On the following command, I get the following error, run within a stored procedure:

    Command: DBCC SHRINKDATABASE('databaseName',0,NOTRUNCATE)

    Error: Cannot shrink log file 2 (databaseName_log) because total number of logical log files cannot be fewer than 9.

    I don't understand the error, or how to correct it.

     

  • When you do the DBCC shrink, you cannot shrink the file size small then the database defination. You may want to use the DBCC ShrinkFile, but not ShrinkDatabase

  • Your error is related to virtual log files...

    Read the BOL topic "Virtual log files"...

    Try using DBCC SHRINKFILE as other user suggested....

     

    MohammedU
    Microsoft SQL Server MVP

  • Thanks to both for the pointer ... I'm following through with (yet more) reading ... and my boss also appreciates your help! (heh-heh-heh)

     

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

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