Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    17

    Unanswered: Delete 2nd transaction log file

    Hello
    We have a SQL Server 2000 database with 2 transaction log files.
    The 2nd file was created when we were running out of disk space and the person creating it was not familiar with the dbcc shrink command.

    I now want to get rid of the 2nd log file. I ran the following steps with no success:

    DBCC SHRINKFILE ('Log_file', EMPTYFILE )
    --Message: Cannot shrink log file 3 (log_file) because all logical log files are in use.

    ALTER DATABASE db1 REMOVE FILE 'Log_file'
    --Message: The file 'Log_file' cannot be removed because it is not empty.


    There are no users or open transactions in the database. I have also tried sp_detach_db and sp_attach_single_file_db but that does not work either as the database attaches both the transaction logs back.

    Please advise.

    Thanks

    Nina

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Try running "checkpoint" after the DBCC SHRINKFILE. I think this was a requirement in the SQL 7.0 days, but I am not sure about SQL 2000.

  3. #3
    Join Date
    Oct 2002
    Posts
    17
    Hey
    thanks for the help but it worked fine after i truncated the log file.

Posting Permissions

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