Hi All. I am trying to remove one of the tempdb logical file
alter database tempdb remove file tempdev2
and have the following error:
The file "H:\tempdb2.mdf" has been modified in the system catalog. The new path will be used the next time the database is started.
Msg 5042, Level 16, State 1, Line 1
The file 'tempdev2' cannot be removed because it is not empty.
then i run
USE tempdb;
GO
DBCC SHRINKFILE('tempdev2', EMPTYFILE)
and another error comes up:
Msg 8985, Level 16, State 1, Line 1
Could not locate file 'tempdev2' for database 'tempdb' in sys.database_files. The file either does not exist, or was dropped.
then I see in sys.database_files ,, I see
file_id file_guid type type_desc data_space_id name physical_name state state_desc size max_size growth is_media_read_only is_read_only is_sparse is_percent_growth is_name_reserved create_lsn drop_lsn read_only_lsn read_write_lsn differential_base_lsn differential_base_guid differential_base_time redo_start_lsn redo_start_fork_guid redo_target_lsn redo_target_fork_guid backup_lsn
1 NULL 0 ROWS 1 tempdev d:\databases\tempdb\tempdb.mdf 0 ONLINE 52008 -1 10 0 0 0 1 0 NULL NULL NULL NULL 27000000012600037 245940A4-BFC3-4F98-98B8-E56FFD49AE02 2014-07-12
14:00:05.247 NULL NULL NULL NULL NULL
2 NULL 1 LOG 0 templog d:\databases\tempdb\tempdb.ldf 0 ONLINE 3688 -1 10 0 0 0 1 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
3 997529E5-AD3D-4605-9CC0-5DAB53C91DFD 0 ROWS 1 tempdev2 H:\tempdb2.mdf 0 ONLINE 1748360 -1 128 0 0 0 0 0 3515000000034000001 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
any one can help? am I afraid next time DB restart, the DB instance can't be start up.