Re: Current Timestamp over DB Link
From: Yong Huang <yong321_at_yahoo.com>
Date: Mon, 23 Jun 2014 07:54:05 -0700
Message-ID: <1403535245.97453.YahooMailNeo_at_web184805.mail.gq1.yahoo.com>
Date: Mon, 23 Jun 2014 07:54:05 -0700
Message-ID: <1403535245.97453.YahooMailNeo_at_web184805.mail.gq1.yahoo.com>
Your idea is excellent! I searched dba_arguments for a function name that sounds promising and found KUPF$FILE.GET_FORMATTED_TIME. The good thing about it is that the package is used for data pumps so there's no license restriction. Here's a test to find local time and remote time. I deliberately changed the remote system time to slightly off for easy observation: SQL> select sys.KUPF$FILE.GET_FORMATTED_TIME, sys.KUPF$FILE.GET_FORMATTED_TIME_at_yongtest from dual; GET_FORMATTED_TIME ------------------------------ GET_FORMATTED_TIME ------------------------------ 09:41:28.702 09:40:22.634 Obviously this function is undocumented. Every upgrade requires review of your code if you use it in production. Yong Huang > What about some existing function like this one? (You'd need to grant exec > access to it and as it's a SQLTUNE one, it probably needs tuning pack > license too): > SQL> SELECT sysdate, sys.dbms_sqltune_util1.get_current_time local_time, > sys.dbms_sqltune_util1.get_current_time_at_sol121 remote_time FROM dual; > > SYSDATE��������� LOCAL_TIME������� REMOTE_TIME > ----------------- ----------------- ----------------- > 20140621 22:41:36 20140621 22:41:35 20140617 13:52:36 > > > But there may be more existing functions like this one out there...
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Jun 23 2014 - 16:54:05 CEST