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.