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_id type type_desc data_space_id name state
1 0 ROWS 1 TCS_SYSTEM_Data 0
2 1 LOG 0 TCS_SYSTEM_Log 0
4 1 LOG 0 TCS_SYSTEM_Log2 0
No error in DBCC CHECKDB..
Any helps appreciated
Thanks