Skip to content

Instantly share code, notes, and snippets.

@oraculix
oraculix / log_server_errors_tg.sql
Created April 15, 2014 13:22
Trigger to catch and log SQL errors in Oracle in the background
-- See http://wp.me/pojaY-8G (German)
DROP TABLE servererror_log
/
CREATE TABLE servererror_log (
error_datetime TIMESTAMP,
, error_user VARCHAR2(30)
, error_stack VARCHAR2(2000)
, error_backtrace VARCHAR2(4000)
, captured_sql VARCHAR2(4000))
/