Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Getting sysdate across a DB link
Content-Type: text/plain;
charset="iso-8859-1"
The dates are different. Currently remote server is GMT and local is EST and
this can change.
I was looking for something without creating any database object like
function or view on the remote server.
Thanks
-----Original Message-----
Sent: Monday, January 26, 2004 1:36 PM
To: 'ORACLE-L_at_fatcity.com'
Cc: 'asahasrabudhe_at_weightwatchers.com'
Ashish,
Why do you think that the dates would be different on the two machines - is one across the international date line? Shouldn't the dates be the same?
How about getting the time from both servers - they *might be* different by a few seconds.
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
Sent: Monday, January 26, 2004 11:14 AM
To: Multiple recipients of list ORACLE-L
I'm trying to get the value of SYSDATE on a remote server. I have a database link to the server, but I'm not sure how to force SYSDATE to be evaluated on the remote machine.
Following query gives same results, both dates are same.
select sysdate local_date, remote_date from ( select sysdate remote_date from dual_at_remote_db)
How can this be done?
Thanks
------_=_NextPart_001_01C3E43D.29B658E0
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Getting sysdate across a DB link</TITLE>
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=421003718-26012004><FONT face=Arial color=#0000ff size=2>The
dates are different. Currently remote server is GMT
and local is EST and this can change.</FONT></SPAN></DIV>
<DIV><SPAN class=421003718-26012004><FONT face=Arial color=#0000ff size=2>I was
looking for something without creating any database object like function or
view on the remote server.</FONT></SPAN></DIV>
<DIV><SPAN class=421003718-26012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=421003718-26012004><FONT face=Arial color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Mercadante, Thomas F
[mailto:thomas.mercadante_at_labor.state.ny.us]<BR><B>Sent:</B> Monday, January
26, 2004 1:36 PM<BR><B>To:</B> 'ORACLE-L_at_fatcity.com'<BR><B>Cc:</B>
'asahasrabudhe_at_weightwatchers.com'<BR><B>Subject:</B> RE: Getting sysdate
across a DB link<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=756152718-26012004>Ashish,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=756152718-26012004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=756152718-26012004>Why
do you think that the dates would be different on the two machines - is one
across the international date line? Shouldn't the dates be the
same?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=756152718-26012004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=756152718-26012004>How
about getting the time from both servers - they *might be* different by a few
seconds. </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=756152718-26012004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2>Tom Mercadante</FONT> <BR><FONT face=Arial
size=2>Oracle Certified Professional</FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Ashish Sahasrabudhe
[mailto:asahasrabudhe_at_weightwatchers.com]<BR><B>Sent:</B> Monday, January
26, 2004 11:14 AM<BR><B>To:</B> Multiple recipients of list
ORACLE-L<BR><B>Subject:</B> Getting sysdate across a DB
link<BR><BR></FONT></DIV>
<P><FONT size=2>I'm trying to get the value of SYSDATE on a remote server. I
have a</FONT> <BR><FONT size=2>database link to the server, but I'm not sure
how to force SYSDATE to</FONT> <BR><FONT size=2>be evaluated on the remote
machine.</FONT> </P>
<P><FONT size=2>Following query gives same results, both dates are
same.</FONT> </P>
<P><FONT size=2>select sysdate local_date, remote_date from ( select sysdate
remote_date from dual_at_remote_db)</FONT> </P>
<P><FONT size=2>How can this be done?</FONT> </P>
<P><FONT size=2>Thanks</FONT> </P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C3E43D.29B658E0--
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Ashish Sahasrabudhe INET: asahasrabudhe_at_weightwatchers.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Jan 26 2004 - 12:49:30 CST
![]() |
![]() |