Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Collation issues Expand / Collapse
Author
Message
Posted Thursday, August 08, 2013 2:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:58 AM
Points: 5,077, Visits: 8,918
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
Post #1482177
Posted Thursday, August 08, 2013 11:47 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 25, 2013 2:22 AM
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
Post #1482500
Posted Friday, August 09, 2013 2:08 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, April 07, 2014 1:34 AM
Points: 702, Visits: 2,163
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.



MCSA: SQL Server 2012
Follow me on Twitter: @WazzTheBadger
LinkedIn Profile: Simon Osborne
Post #1482685
Posted Friday, August 09, 2013 7:02 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 25, 2013 2:22 AM
Points: 12, Visits: 25
Not sure about that
Post #1482753
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse