Search

Invalid filegroup not raising an error in dbcc checkdb by Stefan Oude Vrielink

Resolved
as Not Reproducible Help for as Not Reproducible

1
0
Sign in
to vote
Type: Bug
ID: 778910
Opened: 2/10/2013 12:11:42 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
After merging a lot of partitions (from 1001 to 200) and removing all unused files and filegroups, I ended up with "incosistent metadata" on a partitioned table. Luckily this was a test database, to test the partition merge.

select * from dbo.Test where CustomerID < 199:
(0 row(s) affected)

select * from dbo.Test where CustomerID > 199:
Msg 606, Level 21, State 1, Line 1
Metadata inconsistency. Filegroup id 15 specified for table 'dbo.Test' does not exist. Run DBCC CHECKDB or CHECKCATALOG.

Every CustomerID is on it's own filegroup: 0 - 199, filegroups fg_00 - fg_199

Apart from this database inconsistency checkdb is not raising an error!

dbcc checkdb() with all_errormsgs

DBCC results for 'MDB_NET_PartitionTestSOV'.
.....
There are 0 rows in 0 pages for object "sys.syssoftobjrefs".
Unable to process index pk_Test of table Test because filegroup (FileGroup ID 15) is invalid.
.....
CHECKDB found 0 allocation errors and 0 consistency errors in database 'MDB_NET_PartitionTestSOV'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

To my opinion an invalid filegroup must be an allocation error, or a consistency error, but is not raised as one!
Details (expand)

Product Language

English

Version

SQL Server 2012 - Developer Edition

Category

SQL Engine

Operating System

Windows Server 2008 R2 Standard

Operating System Language

US English

Steps to Reproduce

Can't, did same actions on other databases with good results (no metadata inconsistency)

Actual Results

Metadata inconsistency after partition merge (from 1001 to 200).
dbcc checkdb only shows a line for an invalid filegroup, but not raising error.

Expected Results

No Metadata inconsistency after partition merge
dbcc checkdb signalling invalid filegroup as error

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Stefan Oude Vrielink on 4/17/2013 at 12:08 PM
Hello,
Sorry for the delay. DBCC CHECKDB did not find any errors to fix, although it mentioned an invalid filegroup. That's what scares me.
I have a backup file of the corrupt database. Fortunately, it is a very small database because I used it only for testing.
Despite only being a test database, I do not want to upload it to this post. Can I PM you?
Hopefully this bug can be reopend.
Tanks, Stefan.
Posted by Microsoft on 3/14/2013 at 5:50 PM
Dear Customer,

I am a dev in SQL Server. Thanks for reporting the bug.
To investigate this issue, I need more helps from you.
Can you give me a repro?
If not, can you give me the full steps with all TSQL statements that you use for:
1) creating the partitions
2) merging partitions
When you see the data corruption, I need the DB file before you call DBCC CHECKDB.
The corrected file wouldn't help too much.

Thanks very much,
Bryan
Sign in to post a workaround.