none
Change datefirst @server side RRS feed

  • 問題

  • Dear Sir,

     

    I've a problem with "set datefirst" problem with SQL 2005. Although I can use set datefirst 1 on all my sql programs, I would like to know if I can set it once on server side instead of writing on all sql programs ?

     

    How can I change the values on "dbcc useroptions" ?

     

    Thank you very much.

     

    Best Regards,

    Ivan

    2008年6月19日 上午 09:22

解答

  • Hi Ivan,

    Which day you want to be the first day of the week? What Default language are you using on the database?

    If you want to change the datefirst to 1 as default.
    Another thing you could try is to change the Default Language to British English, it would work.
    I guess your default language are either us_english, Chinese-Traditional ...etc in this case the datefirst is 7.


    The links below shows how to change the default language

    http://technet.microsoft.com/en-us/library/ms187378.aspx

    You can see the list of language setting by running the following query

    SELECT *
    FROM master.dbo.syslanguages

    Hope this could help.
    2008年6月25日 上午 09:47

所有回覆

  • Hi Ivan

    I think you can modify the datefirst field on the system database table [syslanguages]on the language that you can using. then the datefirst will be the one you have specified. If will change all the datefirst setting onthe database that are using the same language.

    Hope this help, Unforunately I am not sure if there any side effect = (.Please correct me if I am wrong.
    2008年6月19日 上午 10:05
  • You can't change anything to system tables in sql2k5.

    2008年6月19日 下午 01:25
  • Hi Rmiao

    Thanks for your information. I have not got SQL2005, so have not try it out.

    To Ivan: I am sorry to give you wrong information, hope you can forgive me.

    Sorry about that.
    2008年6月19日 下午 01:42
  • Dear ChiYau and Rmiao,

     

    Anyway, thanks for your information.

     

    BTW, Can any professionals help on this problem ?

     

    Thanks and regards,

    Ivan 

     

    2008年6月25日 上午 08:30
  • Hi Ivan,

    Which day you want to be the first day of the week? What Default language are you using on the database?

    If you want to change the datefirst to 1 as default.
    Another thing you could try is to change the Default Language to British English, it would work.
    I guess your default language are either us_english, Chinese-Traditional ...etc in this case the datefirst is 7.


    The links below shows how to change the default language

    http://technet.microsoft.com/en-us/library/ms187378.aspx

    You can see the list of language setting by running the following query

    SELECT *
    FROM master.dbo.syslanguages

    Hope this could help.
    2008年6月25日 上午 09:47