Oracle CTX_OUTPUT
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Error and Trace log utility for CTX based activities.
AUTHID CURRENT_USER
Constants
Name Data Type Value
 Print
 EVENT_INDEX_PRINT_ROWID NUMBER 1
EVENT_INDEX_PRINT_TOKEN NUMBER 4;
EVENT_OPT_PRINT_TOKEN NUMBER 2;
 Trace Errors
DRG_DUMP_ALL_ERRORS NUMBER -1
EVENT_DRG_DUMP_ERRORSTACK NUMBER 8
 Trace Query
TRACE_QRY_SEAR_PRINT_TIME NUMBER TRACE_QRY_FACET_OUT_TIME;
TRACE_QRY_SEAR_ROWS NUMBER 31
TRACE_QRY_SEAR_FETCH_TIME NUMBER 32
TRACE_QRY_SEAR_CONV_TIME NUMBER 33
TRACE_QRY_SEAR_ORDER_TIME NUMBER 34
TRACE_QRY_SEAR_SDAT_TIME NUMBER 35
TRACE_QRY_SEAR_TOT_TIME NUMBER 36
 Timer
TRACE_IDX_USER_DATASTORE NUMBER 1
TRACE_IDX_INSO_FILTER NUMBER 2
TRACE_IDX_AUTO_FILTER NUMBER 2
TRACE_QRY_XX_TIME NUMBER 3
TRACE_QRY_XF_TIME NUMBER 4
TRACE_QRY_X_TIME NUMBER 5
TRACE_QRY_IF_TIME NUMBER 6
TRACE_QRY_IR_TIME NUMBER 7
TRACE_QRY_I_ROWS NUMBER 8
TRACE_QRY_I_SIZE NUMBER 9
TRACE_QRY_R_TIME NUMBER 10
TRACE_QRY_CON_TIME NUMBER 11
TRACE_QRY_K_TIME NUMBER 12
TRACE_QRY_S_TIME NUMBER 15
TRACE_QRY_O_TIME NUMBER 19
TRACE_QRY_OR_TIME NUMBER 20
TRACE_QRY_O_ROWS NUMBER 21
TRACE_QRY_O_SIZE NUMBER 22
TRACE_QRY_D_TIME NUMBER 23
TRACE_QRY_SUBSTR_TIME NUMBER 24
TRACE_QRY_SNIPPET_TIME NUMBER 25
TRACE_HIL_DOCSERV_TIME NUMBER 26
TRACE_QRY_FACET_TOT_TIME NUMBER 27
TRACE_QRY_FACET_INI_TIME NUMBER 28
TRACE_QRY_FACET_EXC_TIME NUMBER 29
TRACE_QRY_FACET_OUT_TIME NUMBER 30
TRACE_QRY_MVTOK_ROWS NUMBER 31
TRACE_QRY_MVTOK_SIZE NUMBER 32
TRACE_CTXTREE_GETDS_TIME NUMBER 33
TRACE_CTXTREE_ADDND_TIME NUMBER 34
TRACE_CTXTREE_GETND_TIME NUMBER 35
TRACE_CTXTREE_REMND_TIME NUMBER 36
TRACE_QRY_VV_TIME NUMBER 37
TRACE_QRY_VF_TIME NUMBER 38
TRACE_QRY_V_ROWS NUMBER 39
TRACE_QRY_WLDCRD_TIME NUMBER 40
TRACE_QRY_SN_TIME NUMBER 41
TRACE_QRY_SN_ROWS NUMBER 42
TRACE_QRY_SN_SIZE NUMBER 43
TRACE_QRY_SV_TIME NUMBER 44
TRACE_QRY_SV_ROWS NUMBER 45
TRACE_QRY_SV_SIZE NUMBER 46
TRACE_QRY_SD_TIME NUMBER 47
TRACE_QRY_SD_ROWS NUMBER 48
TRACE_QRY_SD_SIZE NUMBER 49
TRACE_QRY_SBF_TIME NUMBER 50
TRACE_QRY_SBF_ROWS NUMBER 51
TRACE_QRY_SBF_SIZE NUMBER 52
TRACE_QRY_SBD_TIME NUMBER 53
TRACE_QRY_SBD_ROWS NUMBER 54
TRACE_QRY_SBD_SIZE NUMBER 55
TRACE_QRY_ST_TIME NUMBER 56
TRACE_QRY_ST_ROWS NUMBER 57
TRACE_QRY_ST_SIZE NUMBER 58
TRACE_QRY_STZ_TIME NUMBER 59
TRACE_QRY_STZ_ROWS NUMBER 60
TRACE_QRY_STZ_SIZE NUMBER 61
TRACE_QRY_SIYM_TIME NUMBER 62
TRACE_QRY_SIYM_ROWS NUMBER 63
TRACE_QRY_SIYM_SIZE NUMBER 64
Data Types CREATE OR REPLACE NONEDITIONABLE TYPE ctxsys.dr$numtable AS TABLE OF NUMBER;
Dependencies
DBMS_XDBT DRIXMD DRVXTAB
DR$NUMTABLE DRUE DRVXTABC
DRIDISP DRVDDL DRVXTABR
DRIG DRVDML DRVXTABX
DRILIST DRVUTL DR_DEF
DRIPARX DRVXMD PLITBLM
DRIUTL    
Documented No
First Available 1998-1999
Security Model Owned by CTXSYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/ctx/admin/dr0out.pkh
Subprograms
 
ADD_EVENT
Add an event to the logging event list ctx_output.add_event(
event  IN NUMBER,
errnum IN NUMBER := NULL);
TBD
 
ADD_TRACE
Enable trace specified in the trace_id argument ctx_output.add_trace(trace_id IN BINARY_INTEGER);
exec ctx_output.add_trace(ctx_output.event_drg_dump_errorstack);
 
DISABLE_QUERY_STATS
Disables query stats collection ctx_output.disable_query_stats(indexname IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(disable_query_stats, AUTO);
TBD
 
DUMPEDERRORS
Returns an array of all current errors with stack traces ctx_output.dumpedErrors RETURN dr$numtable;
DECLARE
 retVal ctxsys.dr$numtable;
BEGIN
  retVal := ctx_output.dumpedErrors;
  IF retVal.COUNT > 0 THEN
    FOR i IN 1 .. retVal.COUNT LOOP
      dbms_output.put_line(retVal(i));
    END LOOP;
  ELSE
    dbms_output.put_line('Empty Trace Stack');
  END IF;
END;
/
 
ENABLE_QUERY_STATS
Enables query stats collection ctx_output.enable_query_stats(indexname IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(enable_query_stats, AUTO);
TBD
 
END_LOG
halt logging index and document service requests ctx_output.end_log;
exec ctx_output.end_log;
 
END_QUERY_LOG
Halt query logging ctx_output.end_query_log;
exec ctx_output.end_query_log;
 
GET_TRACE_VALUE
Returns the current value of the specified trace ctx_output.get_trace_value(trace_id IN BINARY_INTEGER) RETURN NUMBER;
SELECT ctx_output.get_trace_value(ctx_output.trace_qry_r_time)
FROM dual;
 
LOGFILENAME
Returns the current log file name ctx_output.logFileName RETURN VARCHAR2;
SELECT ctx_output.logFileName
FROM dual;
 
LOGILEOVERWRITE
Returns the current overwrite setting ctx_output.logFileOverWrite RETURN BOOLEAN;
BEGIN
  IF ctx_output.logFileOverWrite THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F

PL/SQL procedure successfully completed.
 
LOGGING
Returns TRUE if logging is enabled, else FALSE ctx_output.logging RETURN BOOLEAN;
BEGIN
  IF ctx_output.logging THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F

PL/SQL procedure successfully completed.
 
LOG_TRACES
Dumps all active traces to the logfile ctx_output.log_traces;
exec ctx_output.log_traces;
 
REMOVE_EVENT
remove an event from the logging event list ctx_output.remove_event(
event  IN NUMBER,
errnum IN NUMBER := NULL);
TBD
 
REMOVE_TRACE
Disable trace specfied in the trace_id argument ctx_output.remove_trace(trace_id IN BINARY_INTEGER);
SELECT ctx_output.remove_trace(ctx_output.trace_qry_r_time)
FROM dual;
 
RESET_TRACE
Resets the trace specified in the trace_id argument ctx_output.reset_trace(trace_id IN BINARY_INTEGER);
SELECT ctx_output.reset_trace(ctx_output.trace_qry_r_time)
FROM dual;
 
START_LOG
Begin logging index and document service requests

Overload 1
ctx_output.start_log(
logfile   IN VARCHAR2,
overwrite IN BOOLEAN DEFAULT TRUE);
TBD
Overload 2 ctx_output.start_log;
exec ctx_output.start_log;
 
START_QUERY_LOG
Begin logging query against context index

Overload 1
ctx_output.start_query_log(
logfile   IN VARCHAR2,
overwrite IN BOOLEAN DEFAULT TRUE);
TBD
Overload 2 ctx_output.start_query_log;
exec ctx_output.start_query_log;

Related Topics
Built-in Functions
Built-in Packages
Database Security
CTX_ADM
CTX_ANL
CTX_CATSEARCH
CTX_CLS
CTX_DDL
CTX_ENTITY
CTX_MATCHES
CTX_REPORT
CTX_TREE
CTX_ULEXER
CTX_XPCONTAINS
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx