Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Collation conflicts between my database and the shadow DB

Dylan Beattie Jun 12, 2013 03:31AM AEST

Hi,

I've hit a bit of a stumbling block during first steps with ReadyRoll, and think it's probably something you can fix pretty easily..

Background: Our server is SQL 2008 R2, with the default collation is Latin1_General_CI_AS but most of our actual databases are using SQL_Latin1_General_CP1_CI_AS (as well as running in 2005 or 2000 compatibility mode)

It appears that when I do the initial import of a local DB into my ReadyRoll project, it's creating the shadow database using the default collation of the server, not copying the collation from the database I'm working on. At least, that behaviour would be consistent with the error messages I'm seeing when trying to build/verify the initial import script.

If that's the case - could it be fixed in future release?

If that's NOT the case, can you advise what else might be causing this behaviour?

Thanks.

Dylan

Up -1 rated Down
Daniel Nolan Jun 24, 2013 05:29PM AEST ReadyRoll Agent

Hi Dylan,

(Posting the resolution that we reached in our offline discussion on JUN 12TH, 2013)

To use a collation other than the server default, simply add the COLLATE [CollationName] clause to your project’s CREATE DATABASE statement. This can be found within the “Pre-Deployment\01_Create_Database.sql” script. For example:

CREATE DATABASE [$(DatabaseName)] COLLATE SQL_Latin1_General_CP1_CI_AS

This will ensure consistency between your target and Shadow databases.

Please note, you will also need to drop the current Shadow database from your SQL Server instance for this to take effect. This will force ReadyRoll to regenerate the database with the correct collation, during the next rebuild.

Best Regards,

Daniel

This question has received the maximum number of answers.

readyroll.support@red-gate.com
http://assets2.desk.com/
false
readyrollsql
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete