How to generate a fake ORA error in Oracle Database

How to generate a fake ORA error in Oracle Database

I was setting up the Oracle Enterprise Manager 12c and had to test whether the metrics threshold was being configured correctly. Thus,  I had to “write” an ORA error into the database. 

# tail -5 $DB_LOG
Sun Apr 07 00:08:02 2013
Starting background process EMNC
Sun Apr 07 00:08:02 2013
EMNC started with pid=88, OS id=21430428
Sun Apr 07 00:15:49 2013

SQL>  execute sys.dbms_system.ksdwrt(2,to_char(sysdate)|| ' ORA-999: Testing, Please Ignore!);

# tail -5 $DB_LOG
Starting background process EMNC
Sun Apr 07 00:08:02 2013
EMNC started with pid=88, OS id=21430428
Sun Apr 07 00:15:49 2013
07-APR-2013 ORA-999: Testing, Please Ignore!
Advertisements
  1. Leave a comment

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: