Red Gate forums :: View topic - Extended Properties
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Extended Properties

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
alex_sefrin



Joined: 08 Jan 2009
Posts: 9

PostPosted: Tue Dec 20, 2011 6:32 pm    Post subject: Extended Properties Reply with quote

I just installed the new version and suddenly getting lots of different objects.
New:
Code:

EXEC sp_addextendedproperty N'MS_Description', 'Auswertegruppennummer', 'SCHEMA', N'dbo', 'TABLE', N'Auswertegruppen', 'COLUMN', N'AWGNr'

Old:
Code:

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?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Thu Dec 22, 2011 10:14 pm    Post subject: Reply with quote

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:

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?
Back to top
View user's profile Send private message
alex_sefrin



Joined: 08 Jan 2009
Posts: 9

PostPosted: Fri Dec 23, 2011 9:25 am    Post subject: Reply with quote

Collation is Latin1_General_CI_AS for both databases.

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

new
Code:

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


old
Code:

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:

-- 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.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Fri Dec 23, 2011 9:26 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
alex_sefrin



Joined: 08 Jan 2009
Posts: 9

PostPosted: Fri Dec 23, 2011 9:58 am    Post subject: Reply with quote

you'll get them in a few minutes...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group