Database Trace

You can trace a session connected to the Oracle Clinical Database and generate a log file. The following example explains how to run a trace while in the Maintain DCM form.

  1. Start a SQL*Plus session as SYS, or another user with the DBMS_SYSTEM role.

  2. Find the session ID and serial number of the Oracle Clinical user working in the Maintain DCM form:

    select sid, serial# FROM v$session where username = 'userid';

  3. Assume that 8 and 12 are returned for sid and serial#, enable SQL trace for the user as follows:

    exec dbms_system.set_sql_trace_in_session(8,12,TRUE)

  4. Have user perform the operation that causes the error. After the error is returned disable SQL trace:

    exec dbms_system.set_sql_trace_in_session(8,12,FALSE)

  5. Find the trace file out in your USER_DUMP_DEST directory. For example,

    select value from v$parameter where name = 'user_dump_dest';

    where value is the path, something like, /ind/oraclelogs/maria/db/udump. The trace file is placed in this directory.