Configure Oracle E-MAIL notification for DB shutdown or startup events Manually
conn sys/linux@sns0910srv as sysdba
@E:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlmail.sql
@E:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\prvtmail.plb;
alter system set smtp_out_server = 'mail.uniconindia.in' scope=spfile;
shutdown immediate;
startup
grant execute on utl_mail to ldbo;
create or replace trigger ldbo.db_shutdown
before shutdown on database
begin
sys.utl_mail.send (
sender =>'dbanotification@uniconindia.in',
recipients =>'dbamonitoring@uniconindia.in',
subject => 'Oracle Database Server DOWN',
message => 'May be LD Server Down for maintenance'||
' but also contact to DBA for further details. '
);
end;
/
create or replace trigger ldbo.db_startup
after startup on database
begin
sys.utl_mail.send (
sender =>'dbanotification@uniconindia.in',
recipients =>'dbamonitoring@uniconindia.in',
subject => 'Oracle Database Server UP',
message => 'LD Server OPEN for normal use.'
);
end;
/
No comments:
Post a Comment