Need Help With DBCC SHRINKFILE using the EMPTYFILE option

  • I am attempting to remove an extra log file from a database.  When I run DBCC SHRINKFILE(Filename, EMPTYFILE), I get this message:

    Cannot shrink log file 10 (Log2) because total number of logical log files cannot be fewer than 9.

    (1 row(s) affected)

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    Any ideas on how to get around this?  I only have two physical log files.

    “If you're not outraged at the media, you haven't been paying attention.”

  • This was removed by the editor as SPAM

  • Microsoft's knowledgebase(support.microsoft.com) shows this behavior is what they intend:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;814574

    Take a look in Books Online at "Shrinking the Transaction Log".

    What I have done in the past is use

    backup log databasename with truncate_only

    then use the DBCC SHRINKDATABASE command.  It will only work if all the transactions are at the beginning of the log file.  http://www.mssqlserver.com/faq/logs-shrinklog.asp



    Michelle

  • Yes!  That worked.  Thanks for the assistance.

    “If you're not outraged at the media, you haven't been paying attention.”

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

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