Collations on SQL Server

  • My first time on this site!

    There are 2 types of collatios: Windows Collations and SQL Server Collations. All servers have SQL collation at server level and all dbs also have SQL collation. On my local server, the server collation is Windows collation but when I copy dbs from production server that have SQL collattions, they work fine.

    We are moving to SQL Server 2005. When I install the server, what collation should I opt for and if there is a way as when I installed my local server, I dont remember setting the option; it was probably installed by default. Beware, that we will restore dbs from existing prod server to new SQL server 2005.

    I will appreciate a response.

    Regards,

    Madiha.

  • Hello Madiha,

    Please go through the Books Online help on this topic:

    Setting and Changing Collations

    Thanks and have a nice day!!!


    Lucky

  • Though server and database can have different collations, the best setting is to make them the same. This is because tempdb and other system dbs will take server collations by default.

    If you create temp tables in your db and have string comparing between temp tables and tables in your DB, you may have collation trouble. To avoid this, you have to attach the same collation in your column definition in the temp table, or use collation conversion in the comparision expression.

     

     

Viewing 3 posts - 1 through 2 (of 2 total)

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