Quantcast
Viewing all articles
Browse latest Browse all 12963

Unable to drop filegroup; The filegroup cannot be removed because it is not empty

SQL 2008R2SP2 Standard Edition 64-Bit on Windows 2008R2 Enterprise.

I have an empty file group (no files assigned) that is not the default file group. I have never setup or tried to set up "Partitioning" (it is Standard Edition).

When I try to "Remove" the FG via SSMS GUI or T-SQL I get the error message.

Based on another (very old post) I checked sys.Indexes and found two indexes for one table still assigned to the file group.  (The table has 0 rows.)  Select * from the table did not generate an error!! and returned an empty result set as expected.

I Dropped the two indexes (one is PK the other is a Unique Constraint) and recreated them on different file groups.  This was successful and sys.Indexes shows the changes.

Now I can drop the File Group.

Why would the system let me

  1. Shrink (empty) a file that contained indexes for a table?
  2. Drop  a File that contained indexes for a table?
  3. Access a table in a file that does not exist?
  4. Drop Indexes from a file that does not exist

Seem like I should have gotten an error message somewhere around Step 1. :)

Thanks,


Ray


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>