Command line options
craigvn
Posts: 5
I am using the following command line options when comparing two databases
/options:Default,IgnoreConstraintNames,IgnoreExtendedProperties,IgnoreChecks,IgnoreNotForReplication,IgnorePermissions,IgnoreQuotedIdentifiersAndAnsiNullSettings
And get this output
== CREATE TABLE [dbo].[Audits]
== (
== [Id] [uniqueidentifier] NOT NULL ROWGUIDCOL CONSTRAINT [MSmerge_default_constraint_for_rowguidcol_of_693577509] DEFAULT (newsequentialid()),
== [EventType] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL,
== [Created] [datetime] NULL,
== [Data] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL,
== [User_id] [uniqueidentifier] NULL,
>> [RowGuid] [uniqueidentifier] NOT NULL CONSTRAINT [DF__Audits__RowGuid__56E2BEBD] DEFAULT (newsequentialid())
<< [RowGuid] [uniqueidentifier] NOT NULL CONSTRAINT [DF__Audits__RowGuid__0B0579F4] DEFAULT (newsequentialid())
== )
== GO
== ALTER TABLE [dbo].[Audits] ADD PRIMARY KEY CLUSTERED ([Id])
== GO
== CREATE NONCLUSTERED INDEX [IDX_AUDITS_USER_ID] ON [dbo].[Audits] ([User_id])
== GO
>> ALTER TABLE [dbo].[Audits] WITH NOCHECK ADD FOREIGN KEY ([User_id]) REFERENCES [dbo].[Users] ([Id])
<< ALTER TABLE [dbo].[Audits] ADD FOREIGN KEY ([User_id]) REFERENCES [dbo].[Users] ([Id])
== GO
The only differences are the WITH NOCHECK and CONSTRAINT name, both of which should be ignored by the command line. Why are they still showing up?
/options:Default,IgnoreConstraintNames,IgnoreExtendedProperties,IgnoreChecks,IgnoreNotForReplication,IgnorePermissions,IgnoreQuotedIdentifiersAndAnsiNullSettings
And get this output
== CREATE TABLE [dbo].[Audits]
== (
== [Id] [uniqueidentifier] NOT NULL ROWGUIDCOL CONSTRAINT [MSmerge_default_constraint_for_rowguidcol_of_693577509] DEFAULT (newsequentialid()),
== [EventType] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL,
== [Created] [datetime] NULL,
== [Data] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL,
== [User_id] [uniqueidentifier] NULL,
>> [RowGuid] [uniqueidentifier] NOT NULL CONSTRAINT [DF__Audits__RowGuid__56E2BEBD] DEFAULT (newsequentialid())
<< [RowGuid] [uniqueidentifier] NOT NULL CONSTRAINT [DF__Audits__RowGuid__0B0579F4] DEFAULT (newsequentialid())
== )
== GO
== ALTER TABLE [dbo].[Audits] ADD PRIMARY KEY CLUSTERED ([Id])
== GO
== CREATE NONCLUSTERED INDEX [IDX_AUDITS_USER_ID] ON [dbo].[Audits] ([User_id])
== GO
>> ALTER TABLE [dbo].[Audits] WITH NOCHECK ADD FOREIGN KEY ([User_id]) REFERENCES [dbo].[Users] ([Id])
<< ALTER TABLE [dbo].[Audits] ADD FOREIGN KEY ([User_id]) REFERENCES [dbo].[Users] ([Id])
== GO
The only differences are the WITH NOCHECK and CONSTRAINT name, both of which should be ignored by the command line. Why are they still showing up?
Comments
The difference should go away if you use IgnoreWithNoCheck. Does this solve your problem?
Redgate Software