Re: Current Timestamp over DB Link
From: Maris Elsins <elmaris_at_gmail.com>
Date: Wed, 18 Jun 2014 16:07:44 +0300
Message-ID: <CABQhObuZZ_QcQimx8rW1GS_4Ta=jzD+9gAs0DtfqgjVioBS_Rw_at_mail.gmail.com>
Hi,
Date: Wed, 18 Jun 2014 16:07:44 +0300
Message-ID: <CABQhObuZZ_QcQimx8rW1GS_4Ta=jzD+9gAs0DtfqgjVioBS_Rw_at_mail.gmail.com>
Hi,
> select systimestamp, systimestamp_at_remotedb from dual
doesn't work because of ERROR ORA-00923: FROM keyword not found where
expected (and the pointer is at "_at_" sign)
> create view ...
I can't create objects in databases
>
https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:50128786135391
this could work, but it's so complicated, I thought something more simple
was possible, but looks like it's not.
--- Maris Elsins _at_MarisElsins <https://twitter.com/MarisElsins> www.facebook.com/maris.elsins On Wed, Jun 18, 2014 at 3:49 PM, Nigel Thomas < nigel.cl.thomas_at_googlemail.com> wrote:Received on Wed Jun 18 2014 - 15:07:44 CEST
> Maris
>
> The optimiser selects a row from the remote table but executes the
> function systimestamp locally.
>
> You can either:
>
> select systimestamp, systimestamp_at_remotedb from dual
>
>
> or create a view on the remote database:
>
> create view vtime as select systimestamp remote_time from dual;
>
>
> and then select from it:
>
> select systimestamp local_time, remote_time from vtime_at_remotedb
>
>
>
> HTH Nigel
>
>
> On 18 June 2014 13:02, Maris Elsins <elmaris_at_gmail.com> wrote:
>
>> HI All,
>>
>> I'm trying to compare the local and remote timestamps to assess the time
>> offset between 2 DBs, but this query gives the local timestamp only:
>>
>> SQL> select systimestamp local_time, (select systimestamp from
>> dual_at_REMOTE_DB) remote_time from dual;
>>
>> LOCAL_TIME
>>
>> ---------------------------------------------------------------------------
>> REMOTE_TIME
>>
>> ---------------------------------------------------------------------------
>> 18-JUN-14 07.00.06.611471 AM -05:00
>> 18-JUN-14 07.00.06.611471 AM -05:00
>>
>> Can anyone suggest a way to retrieve the current timestamp from a remote
>> DB over DB Link?
>>
>> ---
>> Maris Elsins
>> _at_MarisElsins <https://twitter.com/MarisElsins>
>> www.facebook.com/maris.elsins
>>
>>
>>
>
-- http://www.freelists.org/webpage/oracle-l