开发者

Removing offline/defunct files in SQL server 2008

How to remove traces of files marked as OFFLINE or DEFUNCT in Microsoft SQL server 2008?

I have been playing around with a setup where I create a database with 3 f开发者_如何转开发ile-groups which are: Primary, FileGroupData and FileGroupIndex. The clustered index is using FileGroupData and a non-clustered index is set to use FileGroupIndex. To simulate a disk failure I've shut down SQL server and manually deleted the files in index file-group. To start the database I'll mark the files 'OFFLINE', but after that I can't delete the index files, which are now offline.

I don't have backup of the files as they are merely indices, but that has the implication that I can't restore the files and have their status as "ONLINE".

How would you recommend removing the files and the file-group as they still show up in management studio under files/file-groups. Management studio is not able to delete them.

As far as I can tell this is different from the question posted in : How do I remove offline Files from a SQL Server 2005 database

/Philip


Have you tried DROP DATABASE MyBollixedDB?

Basically, the entry still exists in sys.databases. You can't edit this, of course, so simpyl DROP the DB. You can't do any other operation on it because it's offline (and utterly inconsistent)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜