Hello, you are not logged in.  Login or sign up
Experts >> Steven Feuerstein's PL/SQL Obsession >> My Pet Projects and Contributions >> Quest Error Manager (QEM)
Search Toad World Search

Use Quest Error Manager (QEM) to Raise, Handle and Log Errors

The Quest Error Manager is a framework that will help you standardize the management of errors in a PL/SQL-based application.  The most important concept inside QEM is that you trap and log information about instances of errors, and not just the Oracle error.  QEM consists of a PL/SQL package and four underlying tables that store information about errors that occur in an application.

DOWNLOAD QEM

Last updated: 10/1/2008


Quest Error Manager is a freeware product.  Quest Support does not support this product.  If you have any questions about QEM, please send an email to steven.feuerstein@quest.com

About QEM
 
The Error Manager helps you in these two areas:
1. Error definition and management
Use the q$error_manager package to raise, handle and log errors. Rather than write low-level error logic yourself, you simply call the appropriate program in the package API. The Error Manager will then write error information to a set of error tables. You can then extract this information and pass it back to the user (front-end environment) or query the tables to help diagnose the cause of the problem.
2. Runtime execution tracing
The Quest Error Manager offers a single package to help you trace the execution of your application. With q$error_manager, you can
  • Write to table or screen: Write trace information out to the q$log table (using the autonomous transaction feature, to ensure that the trace is saved without affecting your application transaction) or to the DBMS_OUTPUT buffer.
  • Selectively turn on and off tracing through calls to the q$error_manager procedures. You can in this way set tracing for a given application test run, or you can build your own runtime interface to these programs in your application, as we did in The Quest Error Manager.
  • Trace execution of code by a context string, and then also include strings, numbers, dates or Boolean values. You can also minimize the overhead of tracing by checking to see if trace is enabled before calling the trace program.

Installing the Quest Error Manager

Download and unzip the qem.zip file into your directory of choice (for example, c:\QEM).
You can choose to install the Error Manager into your application schema, or create a new schema for these objects. If you want to be able to execute Error Manager from other schemas, you will need to create the appropriate public or private synonyms. We do not provide a script to do this.
Run the qem$install.sql script from your chosen schema to install the nine database objects associated with the Error Manager:
  • Tables: q$error_context, q$error_instance,q$error,q$log and their associated sequences
  • The q$error_manager package
You can integrate this script into your own application install scripts, if you choose.

Removing the Quest Error Manager
Run the qem$uninstall.sql script from the schema in which you installed the Error Manager to remove all the database objects associated with the Error Manager.
Copyright 2008 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us