|
-
I'm looking for an inexpensive method to monitor if my Oracle database is up or down and determine if I can connect to it remotely.
Does anyone have a UNIX shell script that would allow me to attempt a SQL*Plus connect and if it fails shoot an email out to a specified distribution list?
Thanks
Ken H.
-
I wrote a perl script to go out and "ping" databases. If a connection to the database fails, it sends mail to a particular id (in my case, my pager).
The basics of the oracle connect are:
#!/usr/local/bin/perl -w
use strict;
use DBI;
scalar(@ARGV)==1 || die ("usage");
my $name = $ARGV[0];
my $drh = DBI->install_driver('Oracle');
my $dbh = connect($name,'/','') || die "Can not connect: $DBI::errstr\n";
$dbh->disconnect;
exit;
Jeff Hunter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|