Hi every one,
I'm trying to delete one of the two log files from a database but I get the
message "error 5042: the file databse_log cannot be removed because it is
not empty".
I have tried with the commands "backup log databasename with truncate_only"
and "dbcc shrinkfile (filename,emptyfile)" but no luck.
Can anyone tell me how to do it please.
Thanks to all,
Ivan MckenzieUse DBCC LOGINFO to verify that no virtual log files is in use in the ldf file. Google and you will
find articles etc. on how to use the DBCC LOGINFO command.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Ivan Mckenzie" <imck@.inerza.com> wrote in message news:uUT%230SGIGHA.2680@.TK2MSFTNGP09.phx.gbl...
> Hi every one,
> I'm trying to delete one of the two log files from a database but I get the message "error 5042:
> the file databse_log cannot be removed because it is not empty".
> I have tried with the commands "backup log databasename with truncate_only" and "dbcc shrinkfile
> (filename,emptyfile)" but no luck.
> Can anyone tell me how to do it please.
> Thanks to all,
> Ivan Mckenzie
>
No comments:
Post a Comment