Unix Technical Forum

Single server but multiple timezone database..

This is a discussion on Single server but multiple timezone database.. within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, We need to create different databases for our application serving different regions (India, US and UK). All this ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-12-2008, 05:23 PM
ANS
 
Posts: n/a
Default Single server but multiple timezone database..

Hi,

We need to create different databases for our application serving
different regions (India, US and UK). All this on one database server
(multiple instances is a possiblilty).

Is there a way to instruct SQL server to use a default timezone
(different from the system timezone) for a database or server
instance?

Thanks in advance.

Sriram
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-12-2008, 05:23 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Single server but multiple timezone database..

ANS (sriram.nandakumar@gmail.com) writes:
> We need to create different databases for our application serving
> different regions (India, US and UK). All this on one database server
> (multiple instances is a possiblilty).
>
> Is there a way to instruct SQL server to use a default timezone
> (different from the system timezone) for a database or server
> instance?


You did not say which version of SQL Server you are using. SQL 2005 and
earlier are not time-zone aware at all. You can use getdate() and
getutcdate(), but that's that. In SQL 2008, you can store datetime values
with a timezone offset. But in that case, the clients will have to
provide the timezone. You cannot set a time-zone per database or per
connection. You can set the timezone per server, but only by changing the
timezone in Windows.



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-12-2008, 05:23 PM
--CELKO--
 
Posts: n/a
Default Re: Single server but multiple timezone database..

>> Is there a way to instruct SQL server to use a default timezone (different from the system timezone) for a database or server instance? <<

Standard SQL has been "timezone aware" for awhile. First read the
Standards so you can mimic the right implementation. Keep everything
in UTC, then use VIEWs which reference your timezone table. Yes, it
is painful.

Try to get over to SQL Server 2008, since it does have some support
for ANSI/ISO Standards. It still lacks the ability to put a timezone
declaration on individual columns, however.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads for: Single server but multiple timezone database..

Thread Thread Starter Forum Replies Last Post
multiple apaches against single postgres database Honza Novak Pgsql Performance 5 04-19-2008 11:41 AM
Re: Single database connection, multiple statements executing in parallel? vprabhu@uci.edu MS SQL ODBC 1 02-27-2008 08:24 PM
Re: NPTD multiple timezone on same server (fix) Daniel Ouellet lucky.openbsd.misc 0 02-17-2008 05:09 AM
Re: NPTD multiple timezone on same server Henning Brauer lucky.openbsd.misc 0 02-17-2008 05:08 AM
NPTD multiple timezone on same server Daniel Ouellet lucky.openbsd.misc 0 02-17-2008 05:08 AM


All times are GMT. The time now is 05:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com