• Sumanta (9/14/2009)


    Hi,

    I am using SQL server 2008. Now I need to change the time zone in DB sever as per the country. Con anyone answer me the following queries.

    1. How to change the time zone in DB server.

    2. Do I need to chnge the timing setting in windows also in that server?

    3. I have multiple instances for different zone in that server. Can I set the time for each instance as per the local time of that zone?

    Thanks in advance.

    Ok, date functions normally return values based on the regional settings on the server.

    http://blogs.msdn.com/sqlprogrammability/archive/2008/03/18/using-time-zone-data-in-sql-server-2008.aspx

    http://blogs.msdn.com/manisblog/archive/2007/08/28/sql-server-2008-enhancements-in-date-and-time-data-types.aspx

    To answer question 1 and 2. the timezone is server specific, not db related.

    3 No, as far as i know. you can do other things though. you could store your data in UTC format and use the timezone functionality in sql 2008 and change or store your data based on what timezone you want. OR you could use virtual sqlservers for your instances on the one physical host, so that each is its own separate entity and therefore the timezone could be different.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]