December 11, 2014 at 4:42 am
Hi All,
I am not able to to drop few file groups that has been created to add partition range.
Steps taken so far:
--Empty files started
DBCC ShrinkFile(YEAR2015_FG,EmptyFile);
GO
--Removing files
Alter DATABASE ETL_MART REMOVE FILEGROUP YEAR2015_FG;
GO
-- Remove parition scheme depednecy
ALTER PARTITION SCHEME Yearly_Partition_Schemenew NEXT USED YEAR2015_FG
--Removing files group
Alter DATABASE ETL_MART REMOVE FILEGROUP YEAR2015_FG;
GO
Error:
Msg 5042, Level 16, State 12, Line 1
The filegroup 'YEAR2015_FG' cannot be removed because it is not empty.
PLease help me out.
"More Green More Oxygen !! Plant a tree today"
December 11, 2014 at 5:37 am
Minaz Amin (12/11/2014)
Steps taken so far:--Empty files started
DBCC ShrinkFile(YEAR2015_FG,EmptyFile);
GO
--Removing files
Alter DATABASE ETL_MART REMOVE FILEGROUP YEAR2015_FG;
GO
-- Remove parition scheme depednecy
ALTER PARTITION SCHEME Yearly_Partition_Schemenew NEXT USED YEAR2015_FG
--Removing files group
Alter DATABASE ETL_MART REMOVE FILEGROUP YEAR2015_FG;
GO
Wheres the step you used to remove the file(s) after the empty command?
You cannot remove a filegroup until the files in it are empty and the files themselves have been removed
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
December 12, 2014 at 5:37 am
Thanks it helped.
"More Green More Oxygen !! Plant a tree today"
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply