Re: How to get remote server datetime

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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@xxxxxxxxxxxxxxxxxxxxxxxxx> 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

.



Relevant Pages

  • Re: Linked Server to Excel Issue
    ... If I'm physically on the SQL Server box I can open the ... >> server and see the named range on the desired spreadsheet. ... >> Enterprise Manager) and try to run a query using the OPENQUERY and linked ...
    (microsoft.public.sqlserver.programming)
  • Re: CONTAINS performance
    ... That said, and with the query plan, I can start to give you more ... relational join in the context of the free-text optimization, ... SQL Server tables. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Indexing Service, Openquery and sp_executesql
    ... SQL Server version and sp are you running? ... > data from the indexing service catalog when pasted into ... > query analyzer, but failed when put against sp_executesql ... I would choose Microsoft Indexing ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Problem using Access or Query Designer to run queries in SQL Serve
    ... >or Query Designer within Enterprise Manager, it works and I get data back. ... >ODBC Call Failed [ODBC SQL Server Driver] Timeout Expirederror in Access ... >[ODBC SQL Server Driver] Timeout Expired ...
    (microsoft.public.sqlserver.odbc)
  • Re: Transaction Isolation Level
    ... This means that while I initiate a transaction selecting all new orders it ... My query is executed on a SQL server 2005. ... the isolation level you should use is snapshot isolation. ...
    (comp.databases.ms-sqlserver)