Database Log file not able to delete

  • Hi Experts,

    I am not able to delete a db log file .I used the below command to delete but its throwing error.

    USE ABC

    GO

    DBCC SHRINKFILE('ABC_Log4', EMPTYFILE)

    GO

    ALTER DATABASE [ABC_XSM] REMOVE FILE [ABC_Log4]

    GO

    Cannot shrink log file 5 (ABC_Log4) because the logical log file located at the end of the file is in use.

    (1 row(s) affected)

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

    Msg 5042, Level 16, State 2, Line 1

    The file 'ABC_Log4' cannot be removed because it is not empty.

Viewing 0 posts

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