Tag: event

Using oradebug to set event

The following example shows how to set event on a oracle session To turn on event, needs to be run as sysdba SQL> connect /as sysdba – attach to session by OS process id SQL> oradebug setospid 5243378; Oracle pid: 68, Unix process pid: 5243378, image: oracle@hostname (TNS V1-V3) – sets maximum dump file size … Continue reading Using oradebug to set event

How to check/find session information (wait, io, lock, time)

Find SQL currently executing in a session: https://oraclespin.wordpress.com/2010/05/09/how-to-find-sql-running-for-a-usersid/ Session running waiting on SYS@TESTDB> SELECT event, state, p1, p2, p3, seconds_in_wait FROM v$session_wait where sid = 247; EVENT STATE P1 P2 P3 SECONDS_IN_WAIT ---------------------------------------------------------------- --------------- ---- ---------- ---------- ---------- ------------------- db file scattered read WAITED KNOWN TIME 122 1188369 128 30 1 row selected. SYS@TESTDB> SELECT … Continue reading How to check/find session information (wait, io, lock, time)

How to see job owner, Email operator, Event Notification, Email Notification on jobs scheduled?

Using the SELECT statement below one can list notications that occur for jobs scheduled on SQLServer. SELECT --Job name sj.name As JobName, --Job owner SUSER_SNAME(sj.owner_sid) As owner, --Job category e.g. "Database Maintenance", "Report Server", "[Uncategorized (Local)]" c.name as Category, --Operator to be e-mailed (may be NULL) o.name as EmailOperator, --notification in Event log (notify when … Continue reading How to see job owner, Email operator, Event Notification, Email Notification on jobs scheduled?

How to force a trace file to be created when an ORA error occurs?

There was an issue we ran into where one of the users ran out temporary tablespace (TEMP) we had message in the database alert log that there oracle couldn't extend temporary tablespace and we couldn't find the cause and user who ran into the issue. So turning on event for the error oracle will create … Continue reading How to force a trace file to be created when an ORA error occurs?