Generate ORA error in Alert log file with dbms_system.ksdwrt Oracle
We can generate entry in alert log file for making alerts on sepecific things with help of dbms_system package.
It help us to configured alert for us in alert log file. We can monitor alert log file with lot of monitoring tools which will help us when specific condition occurred in database or application level then we get alert in alert log file of Oracle.
Generate your own error in alert log file
dbms_system.ksdwrt is the package used to write in alert log.
Execute the following command to write any message in alert log.
To write on alert log file through package, we are monitoring ETL job with alert log if record above 600000 then it write message in alert log.
create or replace procedure monitoredrep as
select count(*) into n_count from TRACKNTRACE.SSA_REPL_LOG;
if n_count > 600000 then
dbms_system.ksdwrt(3,'ORA-3 Count value of SSA_REPL_LOG is higher than 600000 in PRODAMP Database');