Problem with Identity Columns

Feb 6, 2013 at 11:31 AM
I was recently working with the command ManagePartition /C: CreateStagingFull on a table in my database and what I've noticed is that it doesn't creates the Identity field on staging table.

May be a bug with the cloning of the source table?

Here is my script in sql to create the source table and then the use of ManagePartition:

CREATE TABLE [Core]. [PassValueHistory] (
[IdPassValue] [int] IDENTITY (1,1) NOT NULL,
[PartitionDate] [date] NOT NULL,
[IdPass] [dbo]. [IDENTIFIER] NOT NULL,
[IdVariable] [dbo]. [IDENTIFIER] NOT NULL,
[ValueDateTime] [datetime] NOT NULL,
[Value] [sql_variant] NULL,
CONSTRAINT [PK_PassValueHistory] PRIMARY KEY CLUSTERED
(
[IdPassValue] ASC,
[PartitionDate] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)

GO

ALTER TABLE [Core]. [PassValueHistory] WITH NOCHECK ADD CONSTRAINT [FK_PassValueHistory_Pass] FOREIGN KEY ([IdPass], [PartitionDate])
REFERENCES [Core]. [PassHistory] ([IdPass], [PartitionDate])
GO

ALTER TABLE [Core]. [PassValueHistory] NOCHECK CONSTRAINT [FK_PassValueHistory_Pass]
GO

ALTER TABLE [Core]. [PassValueHistory] WITH CHECK ADD CONSTRAINT [FK_PassValueHistory_Variable] FOREIGN KEY ([IdVariable])
REFERENCES [Core]. [Variable] ([IdVariable])
GO

ALTER TABLE [Core]. [PassValueHistory] CHECK CONSTRAINT [FK_PassValueHistory_Variable]
GO

C: > ManagePartition / C: CreateStagingFull / d: DbDw / s: Core / t: PassValueHistory / p: 1 / A: staging_ValorTubo

Many Thanks, Jorge