I've restored a database backup in a new SQL Server 2012 server from a .bak made in SQL Server 2008 R2, and one of the tables has it's primary key index disabled. This doesn't happen when I restore to a 2008R2 server.
The structure of the table is:
CREATE TABLE RouteSegment (
RouteSegmentID bigint IDENTITY(1,1) NOT NULL,
Representation geography NOT NULL,
LastTime int NOT NULL,
SourceStop1ID bigint NULL,
SourceStop2ID bigint NULL,
Length as ([Representation].[STLength]()) PERSISTED,
CONSTRAINT PK_RouteSegment PRIMARY KEY CLUSTERED (RouteSegmentID ASC)
)
Is this a known problem in SQL Server 2012, or is there something I've missed?
I know that I can fix the problem with an index rebuild, I ask because it's surprising behavior, and want to know how to prevent it.
DBCC CHECKTABLEagainst RouteSegment on the source server. It's fairly likely that upgrading (which runs a full suit of checks as part of the upgrade) has found an extant issue (i.e. one that's just sitting there) that hasn't blown up yet. – Simon Righarts Jul 12 '12 at 4:08