Home » SQL & PL/SQL » SQL & PL/SQL » time differnce between two databases (merged 3)
time differnce between two databases (merged 3) [message #389506] Mon, 02 March 2009 06:38 Go to next message
tannad
Messages: 43
Registered: January 2008
Location: mumbai
Member
I want to create a Script , which will check All the databases Date and time which are different host.
like

GLOBAL_NAME
------------------------------
P6NBSRTG

DATE_TIME
--------------------
01-MAR-2009 09:22:33

GLOBAL_NAME
------------------------------
P7NBSRTG

DATE_TIME
--------------------
01-MAR-2009 09:23:10


and if the time difference is greter than 1 minute it will give me alert on it

like

timediff is greter than 1 min in P6NBSRTG and P7NBSRTG
how can I create script for such databases?
Re: time differnce between two databases (merged 3) [message #389513 is a reply to message #389506] Mon, 02 March 2009 06:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68711
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
I'd go to a Perl script that connects to each database.

Regards
Michel
Re: time differnce between two databases (merged 3) [message #389516 is a reply to message #389513] Mon, 02 March 2009 06:56 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Perl sounds like a good option.
Also, I would not compare the two times directly, but compare both with the server's sysdate, and compare the difference between the db-times thus.
That will free you from discrepancies caused by connection-delays
Previous Topic: Trouble creating proc
Next Topic: Sorting strings with numbers
Goto Forum:
  


Current Time: Sat Nov 09 17:59:42 CST 2024