Collation query / XML issues due to collation

  • 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!

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply