Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to change the time zone


How to change the time zone

Author
Message
Ryan007
Ryan007
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1618 Visits: 1595
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.

Ryan
//All our dreams can come true, if we have the courage to pursue them//
Silverfox
Silverfox
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2740 Visits: 1161
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.

--------------------------------------------------------------------------------------
Recommended Articles on How to help us help you and
solve commonly asked questions

Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden
Managing Transaction Logs by Gail Shaw
How to post Performance problems by Gail Shaw
Help, my database is corrupt. Now what? by Gail Shaw
Ryan007
Ryan007
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1618 Visits: 1595
Thanks for the reply.
So can I come to conclusion that if I change the time settings in windows, the same will be reflected in the SQL database. There is no need to change anything in the databse to be in synch with the windows.

Ryan
//All our dreams can come true, if we have the courage to pursue them//
Silverfox
Silverfox
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2740 Visits: 1161
Sumanta (9/14/2009)
Thanks for the reply.
So can I come to conclusion that if I change the time settings in windows, the same will be reflected in the SQL database. There is no need to change anything in the databse to be in synch with the windows.


As far as I know, SQL Server will look the the server for the date settings, including timezone. only thing to think about, is if you do change anything time related on your server from time to time. Take into account any jobs, backups or log backups, anything which is time/date sensitive.

--------------------------------------------------------------------------------------
Recommended Articles on How to help us help you and
solve commonly asked questions

Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden
Managing Transaction Logs by Gail Shaw
How to post Performance problems by Gail Shaw
Help, my database is corrupt. Now what? by Gail Shaw
SQL Dev-938873
SQL Dev-938873
SSC Journeyman
SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)SSC Journeyman (94 reputation)

Group: General Forum Members
Points: 94 Visits: 425
yes....SQL Server will take the time from windows only....

otherwise u can check it out sumanta,,, change time evry time check through getdate() function in Query window...

GaNeSH
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search