Extended Properties

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Extended Properties

Postby alex_sefrin » Tue Dec 20, 2011 6:32 pm

I just installed the new version and suddenly getting lots of different objects.
New:
Code: Select all
EXEC sp_addextendedproperty N'MS_Description', 'Auswertegruppennummer', 'SCHEMA', N'dbo', 'TABLE', N'Auswertegruppen', 'COLUMN', N'AWGNr'

Old:
Code: Select all
EXEC sp_addextendedproperty N'MS_Description', N'Auswertegruppennummer', 'SCHEMA', N'dbo', 'TABLE', N'Auswertegruppen', 'COLUMN', N'AWGNr'


The second parameter doesn't have an N before the '.
When I create the script with SSMS the N is before the '.

How can I force SQLCompare to write the N?
alex_sefrin
 
Posts: 9
Joined: Thu Jan 08, 2009 11:24 am

Postby james.billings » Thu Dec 22, 2011 10:14 pm

Thanks for your post.

I just tried this here by creating a new database, with a single table that I could then run your example code against.
I then created a second database and ran Compare between the two, using both V8 and V10.
They both seem to keep the 'N' in front of Auswertegruppennummer:

Code: Select all
CREATE TABLE [dbo].[Auswertegruppen]
(
[AWGNr] [nvarchar] (50) COLLATE Latin1_General_CI_AS NOT NULL
)
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating extended properties'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Auswertegruppennummer', 'SCHEMA', N'dbo', 'TABLE', N'Auswertegruppen', 'COLUMN', N'AWGNr'
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO


So I'm not sure why you're seeing it behave differently. Could you let us know some more details as to the collation in use as maybe this is having an effect? Also, can you reproduce the problem by creating a simple example in the same way I did?
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby alex_sefrin » Fri Dec 23, 2011 9:25 am

Collation is Latin1_General_CI_AS for both databases.

Another problem is that in some statements the square brakets are missing now.

new
Code: Select all
CREATE TRIGGER [dbo].[Adressen_Delete] ON dbo.Adressen FOR DELETE AS


old
Code: Select all
CREATE TRIGGER [dbo].[Adressen_Delete] ON [dbo].[Adressen] FOR DELETE AS


Re missing N:
The N isn't missing on all ext. prop. I can't find a rule when it is missing.

Code: Select all
-- Extended Properties

EXEC sp_addextendedproperty N'MS_Description', '0 = nicht speichern', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'AdressHistorieJN'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Datum, an dem diese Adresse erstmals erfasst wurde', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'AnlageDatum'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Ist diese Adresse eine Filiale?', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Filiale'
GO
EXEC sp_addextendedproperty N'MS_Description', 'weitere Gruppenzugehörigkeit (frei)', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Gruppe1'
GO
EXEC sp_addextendedproperty N'MS_Description', 'weitere Gruppenzugehörigkeit (frei)', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Gruppe2'
GO
EXEC sp_addextendedproperty N'MS_Description', 'weitere Gruppenzugehörigkeit (frei)', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Gruppe3'
GO
EXEC sp_addextendedproperty N'MS_Description', 'weitere Gruppenzugehörigkeit (frei)', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Gruppe4'
GO
EXEC sp_addextendedproperty N'MS_Description', 'weitere Gruppenzugehörigkeit (frei)', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Gruppe5'
GO
EXEC sp_addextendedproperty N'MS_Description', 'EDI: Internationale Nummer, die die Adresse eindeutig identifiziert. Format: Basis|RestNr und Prüfziffer', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'ILN'
GO
EXEC sp_addextendedproperty N'MS_Description', N'0=aktiv, 1=inaktiv, Adresse wird nicht mehr angezeigt bzw. benutzt für Exporte', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'InaktivJN'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Ist diese Adresse ein Interessent?', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Interessent'
GO
EXEC sp_addextendedproperty N'MS_Description', N'URL der Website der Adresse', 'SCHEMA', N'dbo', 'TABLE', N'Adressen', 'COLUMN', N'Internet'
GO


I will create to dbs an try to reproduce the errors.
alex_sefrin
 
Posts: 9
Joined: Thu Jan 08, 2009 11:24 am

Postby james.billings » Fri Dec 23, 2011 9:26 am

If you can create something to reproduce it, please feel free to mail me directly - support@red-gate.com, quoting ref. F0055662 in the subject line.
Thanks!
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby alex_sefrin » Fri Dec 23, 2011 9:58 am

you'll get them in a few minutes...
alex_sefrin
 
Posts: 9
Joined: Thu Jan 08, 2009 11:24 am


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 1 guest