Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Collation issues


Collation issues

Author
Message
John Mitchell-245523
John Mitchell-245523
SSCertifiable
SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)

Group: General Forum Members
Points: 7420 Visits: 15114
Martin

Let me see if I can be of a little bit more help. I'm disappointed, but not altogether surprised, that the code you posted is generated by a Microsoft utility. Given that, there's little point in trying to refactor the code, since it will only come out exactly the same next time you press the button.

You should be able to get the code to work with just a couple of tweaks. If you study the error messages in your original post, you'll notice that the errors are occurring in just two stored procedures. You need to find the definitions for those stored procedures and tweak the table variable declarations thus:
DECLARE @tbNames table(Name nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS  NOT NULL PRIMARY KEY)


Here I'm making the same assumption that Simon did, namely that SQL_Latin1_General_CP1_CI_AS is your database collation and Latin1_General_CI_AS is the server collation. Once you've changed that line for each of the two offending stored procedures in your script, you can just run it in the normal way.

One option I didn't suggest before is to build or comandeer a SQL Server instance where the server collation is the same as that of your database, and move everything over.

John
martin 7826
martin 7826
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 25
Hello John,

By hook or by crook I actually managed. Still not sure how... but all's well that ends well. It did unearth other self-inflicted issues too unfortunately.
Thanks to you and Simon. The learning curve is very steep. But's that's no bad thing.

Martin
s_osborne2
s_osborne2
Right there with Babe
Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)

Group: General Forum Members
Points: 745 Visits: 2292
Glad you got it sorted. At this rate of learning you'll be a fully fledged battle worn DBA by the middle of next week. ;-)



MCSE: Data Platform
MCSE: Business Intelligence
Follow me on Twitter: @WazzTheBadger
LinkedIn Profile: Simon Osborne
martin 7826
martin 7826
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 25
Not sure about that :-D
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search