title: Cannot Resolve Collation Conflict
body: <p>I have moved one of our databases (DB1) from SQL Server 2008 to 2012 and when I run the stored procedures I get the following error</p>
  
  <blockquote>
    <p>Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation</p>
  </blockquote>
  
  <p>I changed the collation on the database using </p>
  
  <pre><code>ALTER DATABASE [optimiser] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
  ALTER DATABASE [optimiser] COLLATE SQL_Latin1_General_CP1_CI_AS
  ALTER DATABASE [optimiser] SET MULTI_USER
  </code></pre>
  
  <p>But I still get the error whenever the stored procedures run. I believe because the SP is using a join to another database (GE's ihistorian) and it has a collation mismatch. IS there anyway to resolve this.</p>
  
  <p>On the old server DB1 was set as <code>Latin1_General_CI_AS</code> and this works fine. The new location for the DB has a default of <code>SQL_Latin1_General_CP1_CI_AS</code>. Is it worth changing the collation n DB1 on the new server back to <code>Latin1_General_CI_AS</code>??</p>