最佳解答者
Change datefirst @server side

問題
-
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
解答
-
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.
所有回覆
-
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. -
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.