Is DATEFIRST affected by collation?

  • Hi all

    We've got 4 servers and they are all set up identically (apart from collation) with British English as the default language.

    However, just to make things interesting, using SELECT @@LANGUAGE gives a choice of either us_english or British (I've called that Actual Language below).

    The details for each server are:-
    Server 1 - Collation SQL_Latin1_General_CP1_CS_AS - Default Language British English - Actual Language us_english
    Server 2 - Collation Latin1_General_CI_AS - Default Language British English - Actual Language British
    Server 3 - Collation SQL_Latin1_General_CP1_CS_AS - Default Language British English - Actual Language us_english
    Server 4 - Collation SQL_Latin1_General_CP1_CS_AS - Default Language British English - Actual Language us_english

    This is causing us a small issue as the DATEFIRST is slightly different (Sunday or Monday) depending on which server you connect to.

    So, my question is, does the collation of the server have any bearing on the Actual Language that's used?

    Thanks in advance

    Richard

  • richardmgreen1 - Friday, March 31, 2017 5:05 AM

    Hi all

    We've got 4 servers and they are all set up identically (apart from collation) with British English as the default language.

    However, just to make things interesting, using SELECT @@LANGUAGE gives a choice of either us_english or British (I've called that Actual Language below).

    The details for each server are:-
    Server 1 - Collation SQL_Latin1_General_CP1_CS_AS - Default Language British English - Actual Language us_english
    Server 2 - Collation Latin1_General_CI_AS - Default Language British English - Actual Language British
    Server 3 - Collation SQL_Latin1_General_CP1_CS_AS - Default Language British English - Actual Language us_english
    Server 4 - Collation SQL_Latin1_General_CP1_CS_AS - Default Language British English - Actual Language us_english

    This is causing us a small issue as the DATEFIRST is slightly different (Sunday or Monday) depending on which server you connect to.

    So, my question is, does the collation of the server have any bearing on the Actual Language that's used?

    Thanks in advance

    Richard

    Richard

    Not sure exactly what you're getting at.  Collation is independent of server language, but the DATEFIRST setting does depend on the language.

    John

  • Hi John

    All the servers are set up to set British English (looking in Server Properties/Advanced/Default/Language).

    That's why we can't understand why the DATEFIRST property is difference or using SELECT @@LANGUAGE gives different results.

    I wasn't sure collation had an impact on language, but obviously not.

  • richardmgreen1 - Friday, March 31, 2017 5:37 AM

    Hi John

    All the servers are set up to set British English (looking in Server Properties/Advanced/Default/Language).

    That's why we can't understand why the DATEFIRST property is difference or using SELECT @@LANGUAGE gives different results.

    I wasn't sure collation had an impact on language, but obviously not.

    Language is login based as well. Just because the default language of a server is British English, doesn't mean that every login has their language set to British English.

    Does this return any actively used logins (note you'll need to do this on each server)?
    Use master;
    GO

    SELECT name
    FROM sys.syslogins
    WHERE language != 'British';

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi Thom

    They do against all the servers.
    Looks like I'll have to go through all of the logins and sort them out.

  • richardmgreen1 - Friday, March 31, 2017 6:17 AM

    Hi Thom

    They do against all the servers.
    Looks like I'll have to go through all of the logins and sort them out.

    Do be careful changing them. Depending on the account, you may cause adverse effects on other queries they are using. Especially if they are service or application logins.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

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

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