Writing custom messages in alert log

Writing custom messages in alert log … IS IT POSSIBLE???

Yes it is… We can edit, update or delete alert log entries with any editor, but oracle has a package that does the same work: dbms_system.ksdwrt.

We can write our own customized messages in alert.log sitting at SQL*PLUS session using undocumented KSDWRT procedure (part of DBMS_SYSTEM).


begin
sys.dbms_system.ksdwrt(2, '<Message Text>');
end;
/

The first parameter of sys.dbms_system.ksdwrt indicates the destination:

* Use 1 to write to the trace file.
* Use 2 to write to the “alert.log”.
* Use 3 to write to both.

The second parameter is the message.

This feature can be very useful in testing – Generic Alert Log Error metric in Enterprise Manager or other monitoring tools.

Note from Metalink about DBMS_SYSTEM:


 

This package should in fact only be installed when requested by Oracle Support. 
It is not documented in the server documentation.
As such the package functionality may change without notice.
It is to be used only as directed by Oracle Support and its use otherwise is not supported.
As per internal Note 153324.1:
Generally, if a package is not in the Oracle documentation at all, it is intentional, as it is not for end user use. Non-documented packages should be avoided by customers unless specifically instructed to use them by either Oracle Support or Oracle Development.

Reference : How To Edit, Read, and Query the Alert.Log (Doc ID 1072547.1)

Hope so u will find this post very useful 🙂

Cheers

Regards,

Adityanath

6 replies

  1. Nice post. I was checking constantly this blog and I am impressed! Extremely useful information specially the last part.

  2. Hi there are using WordPress for your site platform?
    I’m new to the blog world but I’m trying to get started and create my
    own. Do you need any html coding expertise to make your
    own blog? Any help would be greatly appreciated!

  3. Pretty nice post. I just stumbled upon your blog and wished to say that I’ve really enjoyed
    browsing your blog posts. In any case I’ll be subscribing to your
    feed and I hope you write again soon!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s