Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 REMOVE FILE leaves sys.database_files

Author  Topic 

NoamGr
Starting Member

12 Posts

Posted - 2014-07-15 : 04:50:31
I use SQL 2012 Std. Ed.
ALTER DATABASE <db name> REMOVE FILE leaves sys.database_files with missing files

the file was physical deleted, the filegroup also was remove.
but in the sys.database_files the row is exists !!!

what to do ???

sunder.bugatha
Yak Posting Veteran

66 Posts

Posted - 2014-07-15 : 07:18:57
did you try running the statement again?

Hema Sunder
Go to Top of Page

MichaelJSQL
Constraint Violating Yak Guru

252 Posts

Posted - 2014-07-15 : 07:23:06
You are in full recovery model. Backup your log and database after removing a file.
Go to Top of Page

NoamGr
Starting Member

12 Posts

Posted - 2014-07-15 : 14:29:33
right !!! I did it !!!
thanks

Go to Top of Page

Shanky
Yak Posting Veteran

84 Posts

Posted - 2014-07-16 : 07:14:30
It takes time to update sometimes read Books online for this its mentioned in Last line. See note section in http://msdn.microsoft.com/en-gb/library/ms186782.aspx

Regards
Shanky
http://social.technet.microsoft.com/wiki/contents/articles/24253.list-of-articles-by-shanky.aspx
Go to Top of Page

MichaelJSQL
Constraint Violating Yak Guru

252 Posts

Posted - 2014-07-16 : 13:51:25
I meant to say - after you do that and check sys.database_files you will no longer see the entry for that file.
Go to Top of Page
   

- Advertisement -