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
NinaTry 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.|||Hey
thanks for the help but it worked fine after i truncated the log file.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment