Write Custom Messages into the alert log

The undocumented procedure kdswrt in dbms_system writes custom messages to the alert log.


Syntax:

sys.dbms_system.ksdwrt(destination, message);

Valid Destination values are
  • 1 Write to a trace file
  • 2 Write to the alert log
  • 3 Write to both trace and alert log


  • Example:
    begin
    sys.dbms_system.ksdwrt(2, 'Custom Message');
    end;
    /