Home » SQL & PL/SQL » SQL & PL/SQL » to find sysdate of remote database (merged 3)
to find sysdate of remote database (merged 3) [message #390938] Tue, 10 March 2009 06:48 Go to next message
gauravpuri2002
Messages: 24
Registered: October 2007
Location: Bangalore
Junior Member
Hi,
Is there is any way to find sysdate of remote database.
I am using :-
select sysdate from dual@db_link.
here this db_link links to remote database.
But this is not working as its giving date of local server.

Regards
Gaurav
Re: to find sysdate in remote server [message #390944 is a reply to message #390938] Tue, 10 March 2009 07:10 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member



You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you
Re: to find sysdate of remote database [message #390945 is a reply to message #390938] Tue, 10 March 2009 07:13 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Do not multi post your questions.
Re: to find sysdate of remote database (merged 3) [message #390947 is a reply to message #390938] Tue, 10 March 2009 07:19 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Create a function in your remote database that returns the date and call it like:
SQL> create function f return date is begin return sysdate; end;
  2  /

Function created.

SQL> select f@mika from dual;
F
-------------------
10/03/2009 13:18:16

1 row selected.

Regards
Michel
Previous Topic: Sql Query
Next Topic: How to delete duplicate entries in a table ?
Goto Forum:
  


Current Time: Sun Dec 04 06:36:20 CST 2016

Total time taken to generate the page: 0.03887 seconds