Options

Extended Properties

alex_sefrinalex_sefrin Posts: 17
edited December 23, 2011 3:58AM in SQL Compare Previous Versions
I just installed the new version and suddenly getting lots of different objects.
New:
EXEC sp_addextendedproperty N'MS_Description', 'Auswertegruppennummer', 'SCHEMA', N'dbo', 'TABLE', N'Auswertegruppen', 'COLUMN', N'AWGNr'
Old:
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?

Comments

  • Options
    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:
    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?
    Systems Software Engineer

    Redgate Software

  • Options
    Collation is Latin1_General_CI_AS for both databases.

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

    new
    CREATE TRIGGER [dbo].[Adressen_Delete] ON dbo.Adressen FOR DELETE AS 
    

    old
    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.
    -- 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.
  • Options
    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!
    Systems Software Engineer

    Redgate Software

  • Options
    you'll get them in a few minutes...
Sign In or Register to comment.