Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing To See If Oracle Instance Is Up On A Remote Server

Status
Not open for further replies.

THoey

IS-IT--Management
Jun 21, 2000
2,142
US
I need help figuring out how to test to see if an Oracle instance is up on a remote machine. <br><br>We have a copy of the same database on two different servers, one as a production database and the other as an emergency backup. There are several tables that need to be sync'd up nightly. I wrote nightly NT batch files that truncated the backup tables and then reloaded them from the production tables. That worked fine, until the one time that the production machines' Oracle went down. The backup tables got truncated, but since Oracle was unavailable on the production machine, the backup tables remained empty. <br><br>Any suggestions? As an added wrench to this, I am not allowed to have logins/passwords in any of the scripts... <br><br>
 
You could copy the backup tables before truncating.&nbsp;&nbsp;Then the data would be available in case the copy from production failed.&nbsp;&nbsp;You might even be able to put logic in your batch job to decide whether the copy from production was successful.&nbsp;&nbsp;You could then automatically restore the backup data from the previous night if the current night's production copy failed.<br><br>Your situation seems ideal for replication.&nbsp;&nbsp;Have you considered setting up replication between your production and backup servers with a 24 hour refresh interval?&nbsp;&nbsp;That way Oracle would take over the task of keeping the two databases in sync.
 
Thanks for the suggestion.&nbsp;&nbsp;&nbsp;I think I have found a way to do this by using the Unix ps -ef command (checks for active processes) and then some more scripting to verify that the processes are running.&nbsp;&nbsp;&nbsp;<br><br>As for Replication...&nbsp;&nbsp;&nbsp;&quot;It is not our policy to use Replication&quot;, said the contracted Oracle DBA assigned to our group...&nbsp;&nbsp;&nbsp;Sounds like a mechanic having a complete Craftsman toolbox, but only knowing how to use the hammer to me, but it is what I have to work with...<br><br>Thanks again...
 
Perhaps establishing your second database as a standby, then pushing your archived logfiles across to the standby database from production would be a better alternative. You can make the prod database automatically synch the logfiles via your network (but I think that is only available through v8 or higher.
 
This might sound foolish but have you thought of using a dblink running via pl/sql and checking for the error. Ps. Do be so harsh on your dba...
 
Thank you for all of your suggestions.&nbsp;&nbsp;&nbsp;It has finally been decided that this is a good occaission to use replication to load the tables nightly.&nbsp;&nbsp;&nbsp; <p>Terry M. Hoey<br><a href=mailto:th3856@txmail.sbc.com>th3856@txmail.sbc.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top