Sunday, September 16, 2012

Debugging in Apex (3.0.1 and onward) with Embedded PL/SQL Gateway

If your web page, run by Oracle EPG Web server, displays an error that you cannot resolve easily, you can see all the errors with the activating error logging. It allows you to trace PL/SQL errors when you develop a web application.
You must first activate the log option with a PL/SQL command. Make sure you are logged in as a SYSTEM user prior to running the below command:
SQL> execute dbms_epg.set_global_attribute('log-level', 3)
Where different log-levels are:
0 - LOG_EMERG (Default Log-Level)
1 - LOG_ALERT
2 - LOG_CRIT
3 - LOG_ERR
4 - LOG_WARNING
5 - LOG_NOTICE
6 - LOG_INFO
7 - LOG_DEBUG
This should generate a .trc file on the server file system in bdump directory. To get this location, use classic checking of parameter:
SQL> show parameter background_dump_dest

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest string c:\oracle\product\10.2.0\dbhome_1\admin\XE\bdump
Note that there will be many .trc and .trm files in this directory from different DB functions. The files of interest are the .trc files that are generated at the time of the APEX event of interest. To further identify the specific .trc file(s) containing the desired information, accomplish a unix grep or windows find for the word "APEX" in the file:
  • UNIX
    grep APEX .trc
  • Windows
    type .trc|find "APEX"

The End

This is nothing but making one official reminder for future reference...
Hope this helps someone.
Cheers!

No comments :

Post a Comment

Zagreb u srcu!

Copyright © 2009-2018 Damir Vadas

All rights reserved.


Sign by Danasoft - Get Your Sign