Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting sysdate across a DB link

Re: Getting sysdate across a DB link

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Sun, 09 Mar 2003 10:48:11 -0800
Message-ID: <3E6B8C6B.E2F1FAC0@exesolutions.com>


Just Another User wrote:

> "John Russell" <netnews5_at_johnrussell.mailshell.com> wrote in message
> news:v15j6vc1322c2fhtk9tfl1jesnvhjg5unf_at_4ax.com...
> > On Mon, 03 Mar 2003 21:00:49 +0100, Jaap W. van Dijk
> > <j.w.vandijk.removethis_at_hetnet.nl> wrote:
> >
> > >On Sun, 02 Mar 2003 15:04:47 -0800, DA Morgan
> > ><damorgan_at_exesolutions.com> wrote:
> > >
> > >...
> > >>> If nothing helps, let's read the manual:
> > >>>
> > >>> 'SYSDATE returns the current date and time. Requires no arguments. In
> > >>> distributed SQL statements, this function returns the date and time on
> > >>> your local database.'
> > >>>
> > >>> (from the 8i SQL Reference Manual).
> > >>>
> > >>> Jaap.
> >
> > The obvious way seems to me to be to write a stored function on the
> > other server, returning a date. Then
> >
> > declare
> > right_now date;
> > begin
> > right_now := get_time_from_other_server_at_other_server;
> > end;
> > /
> >
> > John

>

> Shouldn't this work?
> select sysdate from dual_at_other_server;

Not necessarily. All the dual_at_other_server is doing is providing a table to bounce the query off. It is not specifying the location from which sysdate is determined.

If you haven't done this before, and I'm sure you have:

SELECT * FROM dual;

What you suggest is not different from saying:

SELECT 'ABC' FROM dual_at_other_server.

Daniel Morgan Received on Sun Mar 09 2003 - 12:48:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US