SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Collation query / XML issues due to collation


Collation query / XML issues due to collation

Author
Message
db_bunny
db_bunny
SSC-Enthusiastic
SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)

Group: General Forum Members
Points: 111 Visits: 169
Hello,

I have a database which I have restored from a SQL 2005 server which is of the following server collation type:

SQL_Latin1_General_CP1_CI_AS

The SQL 2005 server I have restored to has the following server collation type:

Latin1_General_CI_AS

However, the database I restored has the same database collation type on both servers, which is:

SQL_Latin1_General_CP1_CI_AS

The database has a stored proc which uses 'FOR XML EXPLICIT' to construct and return an XML result set . When I try to run this stored proc, I get the following error:

Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

Does anyone have any ideas why this is happening? Could this indicate I need to change the collation on the server I am restoring to?

If I do have to change the collation of the server, can somebody please explain why this is the case (I would have thought the database collation being the same would be sufficient). Also, is it possible to detach all databases, then rebuild master using the new collation type, then reattached the databases? Or would all databases have to be removed and then restored?

Thanks very much in advance!
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