Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to change the time zone Expand / Collapse
Author
Message
Posted Monday, September 14, 2009 2:28 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 9:21 AM
Points: 1,602, Visits: 1,572
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//
Post #787242
Posted Monday, September 14, 2009 2:58 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, November 24, 2014 6:56 AM
Points: 2,699, Visits: 1,144
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
Post #787251
Posted Monday, September 14, 2009 3:14 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 9:21 AM
Points: 1,602, Visits: 1,572
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//
Post #787259
Posted Monday, September 14, 2009 3:27 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, November 24, 2014 6:56 AM
Points: 2,699, Visits: 1,144
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
Post #787264
Posted Monday, September 14, 2009 4:32 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, October 27, 2014 12:28 AM
Points: 90, Visits: 422
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
Post #787304
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse