Re: Getting sysdate across a DB link

2004-01-26 Thread Mladen Gogala
Create procedure get_date on the remote node and invoke it over the DB  
link.

On 01/26/2004 11:14:26 AM, Ashish Sahasrabudhe wrote:
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 [EMAIL PROTECTED])
How can this be done?

Thanks

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Mladen Gogala
 INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).


RE: Getting sysdate across a DB link

2004-01-26 Thread Mercadante, Thomas F
Title: Getting sysdate across a DB link



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-From: Ashish Sahasrabudhe 
  [mailto:[EMAIL PROTECTED]Sent: Monday, January 26, 
  2004 11:14 AMTo: Multiple recipients of list 
  ORACLE-LSubject: Getting sysdate across a DB 
  link
  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 [EMAIL PROTECTED]) 
  How can this be done? 
  Thanks 


RE: Getting sysdate across a DB link

2004-01-26 Thread Ashish Sahasrabudhe
Title: Getting sysdate across a DB link



The 
dates are different. Currentlyremote serverisGMT 
andlocalis EST and this can change.
I was 
looking for something without creating any database object like function or 
viewon the remote server.

Thanks

  -Original Message-From: Mercadante, Thomas F 
  [mailto:[EMAIL PROTECTED]Sent: Monday, January 
  26, 2004 1:36 PMTo: '[EMAIL PROTECTED]'Cc: 
  '[EMAIL PROTECTED]'Subject: RE: Getting sysdate 
  across a DB link
  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-From: Ashish Sahasrabudhe 
[mailto:[EMAIL PROTECTED]Sent: Monday, January 
26, 2004 11:14 AMTo: Multiple recipients of list 
ORACLE-LSubject: Getting sysdate across a DB 
link
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 [EMAIL PROTECTED]) 
How can this be done? 
Thanks 


Re: Getting sysdate across a DB link

2004-01-26 Thread Mladen Gogala
On 01/26/2004 01:34:24 PM, Mercadante, Thomas F wrote:
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?
Thomas, if we learned anything from Einstein, it is that the time is  
relative to the observer and depends on the curvature of the space,  
speed and alike. This is particularly easy to prove when it comes to
computers, because very seldomly do two computers have exactly the same
time. As you are probably very well aware of, the central theorem of
the relativity theory  reads as follows:
The duration of a second depends on which side of the restroom door is
the observer.

Unfortunately, taking one server as a reference doesn't help because
even if it is decreed that everybody should invoke the get_date  
function from the central server, there will be a developer who will
smuggle a sysdate into the code. I've seen machines 5 apart differing
in time for more then a hour. It becomes especially interesting on the  
days when DST takes effect. To make the long story short, Thomas, your  
Newtonian world is obsolete.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Mladen Gogala
 INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).


RE: Getting sysdate across a DB link

2004-01-26 Thread Mercadante, Thomas F
Mladen,

there you go again!  LOL.

now go back and trade your Wang in for a new one.

Tom Mercadante
Oracle Certified Professional


-Original Message-
Sent: Monday, January 26, 2004 2:04 PM
To: Multiple recipients of list ORACLE-L


On 01/26/2004 01:34:24 PM, Mercadante, Thomas F wrote:
 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?

Thomas, if we learned anything from Einstein, it is that the time is  
relative to the observer and depends on the curvature of the space,  
speed and alike. This is particularly easy to prove when it comes to
computers, because very seldomly do two computers have exactly the same
time. As you are probably very well aware of, the central theorem of
the relativity theory  reads as follows:
The duration of a second depends on which side of the restroom door is
the observer.

Unfortunately, taking one server as a reference doesn't help because
even if it is decreed that everybody should invoke the get_date  
function from the central server, there will be a developer who will
smuggle a sysdate into the code. I've seen machines 5 apart differing
in time for more then a hour. It becomes especially interesting on the  
days when DST takes effect. To make the long story short, Thomas, your  
Newtonian world is obsolete.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mercadante, Thomas F
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).