0

We are using database projects to deploy our databases. In the project settings, we have specific a Project Version (version of target SQL Server) and a Collation for Data model.

However, when I deploy it, I get the following error

    TSD00560    The project and target databases have different collation settings. Deployment errors might occur.

This happens when we are deploying in upgrade mode. My question is, is there any way to read Model Collation from a deployed database?

We are using VSDBCMD for deployment

Hamid Shahid
  • 4,486
  • 3
  • 32
  • 41
  • `SELECT DataBasePropertyEx('model', 'collation') As collation_of_model_database` – gvee Feb 11 '14 at 11:58
  • Not sure if this is what I was after. Need to get the model collation set in the database property. http://blogs.msdn.com/b/gertd/archive/2008/10/04/model-collation-vs-database-collation.aspx. – Hamid Shahid Feb 12 '14 at 14:11
  • Wondering if there is a property in database for it at all or not? – Hamid Shahid Feb 12 '14 at 14:11

1 Answers1

0

You can use VSDBCMD to generate the model from the database using:

vsdbcmd.exe /Action:Import

In the schema file (output) you got a tag named DataSchemaModel that has a property called CollationLcid that displays the model setting of the target database.

I do not know any property on the target database you can retrieve, maybe this can be done using the Microsoft schema libs.

pakerblom
  • 23
  • 3