Monday, March 26, 2012

How to remove a file [dbcc shrinkfile(filename,empty) is not working]

I tried to remove a file from a filegroup by using the following two comamnd
1) dbcc SHRINKFILE('FileName1', EMPTYFILE)
2) ALTER DATABASE PED_PROD REMOVE FILE FileName1

but I am getting the following error message

Server: Msg 5042, Level 16, State 1, Line 1
The file ''FileName1'' cannot be removed because it is not empty.

Please help in this

Thanks in Advance,
SateeshHowdy

What version of SQL are you using?

Cheers

SG

No comments:

Post a Comment