Shrink for secondary log file gives error

  • Hi, yesterday I created a secondary log file to a database, today I want to empty and remove the file I get the following error: (SQL Server 2008 SP1 EE)

    USE TCS_SYSTEM

    GO

    DBCC SHRINKFILE ('TCS_SYSTEM_Log2', EMPTYFILE)

    GO

    "Could not locate file '3' for database 'TCS_SYSTEM' in sys.database_files. The file either does not exist, or was dropped."

    Also the same error is given for

    ALTER DATABASE REMOVE FILE [TCS_SYSTEM_Log2]

    The FileID is 4 at sys.database_files, why it is trying to locate file 3 I don't know..

    file_idtypetype_descdata_space_idname state

    10ROWS1TCS_SYSTEM_Data0

    21LOG0TCS_SYSTEM_Log 0

    41LOG0TCS_SYSTEM_Log20

    No error in DBCC CHECKDB..

    Any helps appreciated

    Thanks

  • Any ideas?

Viewing 2 posts - 1 through 1 (of 1 total)

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