Unknown Collation

  • Hi Guys,

    we have an application that installs a database onto SQL servers (BOth MSDE and ED) that we cannot necessarily control the setup of. We appear to be haven collation sequence mismatches in stored procs etc that use either Temp tables or info from master.

    What is the best approach in avoiding these collation sequence hassles, considering the collation may well change between backup/restores etc.

    Can we set it at the database level and coerce the collation in each SQL statement or is there an easier way?

    Thanks in advance for any help.

    Rich O'Connor

  • Can we set it at the database level and coerce the collation in each SQL statement or is there an easier way?

    You can, however that won't solve your problem.  Why are you getting the erros in the first place?  That is your biggest issue.  Can you not enforce that everyone use the same collation?

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • Hi Derrick,

    >>Can you not enforce that everyone use the same collation?

    No that is our problem we cant guarantee what the collation sequence will be or how the boxes are setup etc - it is a commercial app/db not an internal one.

    Rich

  • If you make sure that no collation settings are specified in the scripts that create the databases then they will use the default collation for the model database on that SQL Server instance, which in turn uses the default collation for the SQL Server instance.  This will ensure that there are no collation mismatches (as master and tempdb will be using the same collation).

    Paul

     

  • What you should do is to

    1. get the collation that your commercial app uses

    2. change the SQL-Server to that collation, and

    3. then use the app to create its database

    Karl

    Best regards
    karl

Viewing 5 posts - 1 through 4 (of 4 total)

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