Collation question

  • Hey guys,

    I was about to commission a new SQL instance to host several app databases when I noticed that one set of databases for a particular app has a collation of Latin1_General_BIN2 (same at the instance level).

    I was planning on using SQL_Latin1_General_CP1_CI_AS at the instance level on the new server, so my question is whether or not I should be concerned if a couple of the databases have a collation setting of Latin1_General_BIN2? According to the vendor this shouldn't be an issue but I wondered if anyone had encountered issues in this scenario.

    Is it possible they'll run into issues with tempdb?

    Chris

  • Chris-475469 (11/26/2015)


    Hey guys,

    I was about to commission a new SQL instance to host several app databases when I noticed that one set of databases for a particular app has a collation of Latin1_General_BIN2 (same at the instance level).

    I was planning on using SQL_Latin1_General_CP1_CI_AS at the instance level on the new server, so my question is whether or not I should be concerned if a couple of the databases have a collation setting of Latin1_General_BIN2? According to the vendor this shouldn't be an issue but I wondered if anyone had encountered issues in this scenario.

    Is it possible they'll run into issues with tempdb?

    Chris

    Spot on with tempdb.

    It's not so much of an issue, if the code was done right.

    When a #Table is created all string data type columns will have default collation for tempdb unless specified otherwise, which would be (again, unless specified otherwise) the collation of the server.

    Therefore in my code which is meant to go to Prod I always use:

    SomeNameColumn nvarchar(50) COLLATE DATABASE_DEFAULT

    Check if you can find it in the code.

    Check on only temp tables but table variables as well.

    This way collations on columns in static tables in the database will match collations on columns in temporary tables. Unless, again, specified otherwise.:-)

    _____________
    Code for TallyGenerator

  • Thanks for the info.

    I'll have to look at this to see what the best option is.

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

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