Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Fetching system time of a remote database

How can I fetch the system time of a remote database? If I'm using select sysdate from dual@remote_db_link, it returns my server sydate and not the remote one.
When querying SYSDATE from DUAL, even across a link, Oracle still gets SYSDATE from the local server. To guarantee that you will get it from the remote server, make a view on the remote server as follows:

CREATE VIEW server_sysdate AS
SELECT sysdate FROM dual;

Then, on the local server, issue the following statement:

SELECT * FROM server_sysdate@remote_db_link;

Oracle will have no choice but to go to the remote server and issue the query against the view.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close