connect as sys
grant select on v_$database to the user that will own the procedure
Printable View
connect as sys
grant select on v_$database to the user that will own the procedure
Why even bother with querying something tzhat is not publicly accessible just to find out if the database is up? Why granting extra privileges for that, why not using something that is accessible to everyone? For example, with "select global_name from global_name;" will do just as well, without need for any additional grants and synonys.
Or simple query on DUAL table will do the same.
If the instance is down, how can you execute this? How can you send the e-mail from the server? Or have I totally misunderstood?Quote:
Originally posted by ssmith001
2) in an effort to tell which instance has shutdown, I am using the line: SELECT name into v_db_name from v$database;
If you want to monitor db status, take a look at OEM or follow Jeff's lead and use some Perl scripts. (I started with this: http://www.amazon.com/exec/obidos/tg...43038?v=glance - it took a couple of days, but I now have a fine tool kit available.)
agreed on the EM part, why all this hoopla for something that oracle has already created and delivered. Mucho events in EM like the probe event will tell you if Oracle is accepting connections or not and send you a page/emailQuote:
Originally posted by DaPi
If the instance is down, how can you execute this? How can you send the e-mail from the server? Or have I totally misunderstood?
If you want to monitor db status, take a look at OEM or follow Jeff's lead and use some Perl scripts. (I started with this: http://www.amazon.com/exec/obidos/tg...43038?v=glance - it took a couple of days, but I now have a fine tool kit available.)
I assumed he is "pinging" the remote instance over database link. Say you have a job running on the database DB1 that queries something from the databases DB2, DB3, DB4, .... every x seconds/minutes/hours. And if something goes wrong with any of those remote databases it sends an alert email.Quote:
Originally posted by DaPi
If the instance is down, how can you execute this? How can you send the e-mail from the server? Or have I totally misunderstood?
I assumed he wasn't! I wonder which of us is right :)Quote:
Originally posted by jmodic
I assumed he is "pinging" the remote instance over database link.
I assumed it was part of a shutdown trigger or something... http://www.dbasupport.com/forums/http://www.dbasupport.com/forums/http://www.dbasupport.com/forums/http://www.dbasupport.com/forums/