![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All , I have 3 sql servers located at different time zones. Say, CST,PST,EST. Now how can I get current time at EST,PST from the SQL server located at CST? Is there any query to do that? I have a stored proc located in SQL server at CST zone where I need to query for the current date/time of the other zone sql servers. I tried below query at CST SQL server SELECT TOP 1 GETDATE() FROM [SERVER-PST].master.dbo.syslocks But it always gives CST datetime. Please reply... Thanks RP |
#3
| |||
| |||
|
|
Haven't tested but it should work using Openquery instead of the 4 part name. The statement passed in the openquery is executed on the remote server. -Sue On Fri, 27 Apr 2007 12:24:01 -0700, Ram Ram (AT) discussions (DOT) microsoft.com> wrote: Hi All , I have 3 sql servers located at different time zones. Say, CST,PST,EST. Now how can I get current time at EST,PST from the SQL server located at CST? Is there any query to do that? I have a stored proc located in SQL server at CST zone where I need to query for the current date/time of the other zone sql servers. I tried below query at CST SQL server SELECT TOP 1 GETDATE() FROM [SERVER-PST].master.dbo.syslocks But it always gives CST datetime. Please reply... Thanks RP |
#4
| |||
| |||
|
|
Hi Sue, It works gr8.... Thanks for the help... "Sue Hoegemeier" wrote: Haven't tested but it should work using Openquery instead of the 4 part name. The statement passed in the openquery is executed on the remote server. -Sue On Fri, 27 Apr 2007 12:24:01 -0700, Ram Ram (AT) discussions (DOT) microsoft.com> wrote: Hi All , I have 3 sql servers located at different time zones. Say, CST,PST,EST. Now how can I get current time at EST,PST from the SQL server located at CST? Is there any query to do that? I have a stored proc located in SQL server at CST zone where I need to query for the current date/time of the other zone sql servers. I tried below query at CST SQL server SELECT TOP 1 GETDATE() FROM [SERVER-PST].master.dbo.syslocks But it always gives CST datetime. Please reply... Thanks RP |
![]() |
| Thread Tools | |
| Display Modes | |
| |