I got it to fail. Then I re-open the file and could not get it to fail, after a few tries. These are the queries I had: It failed when I added the SQL that prompts starting with line 37. Line 1 would start with the dash line. You just have to keep randomly execute SELECTS until it fails.
-----------------------------------------------------------------------------------------------------------------
--Get Sys_context
SELECT '"usr="' || USER || '" osusr="' || sys_context('USERENV', 'OS_USER') || '" mach="' ||
sys_context('USERENV', 'HOST') || '" ip="' || sys_context('USERENV', 'IP_ADDRESS') || '" mod="' ||
sys_context('USERENV', 'MODULE') || '" act="' || sys_context('USERENV', 'ACTION') || '" id="' ||
sys_context('USERENV', 'CLIENT_IDENTIFIER') || '" info="' || sys_context('USERENV', 'CLIENT_INFO')
FROM dual;
--Get Session ID
SELECT USERENV('SESSIONID') FROM dual;
-----------------------------------------------------------------------------------------------------------------
--Get Sesssions Count by OSUSER
SELECT t.osuser,
COUNT(*)
FROM v$session t
GROUP BY t.osuser
ORDER BY 2 DESC;
-----------------------------------------------------------------------------------------------------------------
--Get Sesssions Count by Program
SELECT t.program,
COUNT(*)
FROM v$session t
GROUP BY t.program
ORDER BY 2 DESC;
-----------------------------------------------------------------------------------------------------------------
--Get Sesssions Count by Machine
SELECT t.machine,
COUNT(*)
FROM v$session t
GROUP BY t.machine
ORDER BY 2 DESC;
--Get by Username
SELECT t.sid,
t.serial#,
t.audsid,
t.user#,
t.username,
t.status,
t.server,
t.schemaname,
t.osuser,
t.process,
t.machine,
t.port,
t.terminal,
t.program,
t.type,
t.module,
t.action,
t.client_info,
t.logon_time
FROM v$session t
WHERE username = UPPER('&pUserName')
ORDER BY t.logon_time;
-----------------------------------------------------------------------------------------------------------------
--Get Sesssions
SELECT t.saddr,
t.sid,
t.serial#,
t.audsid,
t.paddr,
t.user#,
t.username,
t.command,
t.ownerid,
t.taddr,
t.lockwait,
t.status,
t.server,
t.schema#,
t.schemaname,
t.osuser,
t.process,
t.machine,
t.port,
t.terminal,
t.program,
t.type,
t.sql_address,
t.sql_hash_value,
t.sql_id,
t.sql_child_number,
t.sql_exec_start,
t.sql_exec_id,
t.prev_sql_addr,
t.prev_hash_value,
t.prev_sql_id,
t.prev_child_number,
t.prev_exec_start,
t.prev_exec_id,
t.plsql_entry_object_id,
t.plsql_entry_subprogram_id,
t.plsql_object_id,
t.plsql_subprogram_id,
t.module,
t.module_hash,
t.action,
t.action_hash,
t.client_info,
t.fixed_table_sequence,
t.row_wait_obj#,
t.row_wait_file#,
t.row_wait_block#,
t.row_wait_row#,
t.top_level_call#,
t.logon_time,
t.last_call_et,
t.pdml_enabled,
t.failover_type,
t.failover_method,
t.failed_over,
t.resource_consumer_group,
t.pdml_status,
t.pddl_status,
t.pq_status,
t.current_queue_duration,
t.client_identifier,
t.blocking_session_status,
t.blocking_instance,
t.blocking_session,
t.final_blocking_session_status,
t.final_blocking_instance,
t.final_blocking_session,
t.seq#,
t.event#,
t.event,
t.p1text,
t.p1,
t.p1raw,
t.p2text,
t.p2,
t.p2raw,
t.p3text,
t.p3,
t.p3raw,
t.wait_class_id,
t.wait_class#,
t.wait_class,
t.wait_time,
t.seconds_in_wait,
t.state,
t.wait_time_micro,
t.time_remaining_micro,
t.time_since_last_wait_micro,
t.service_name,
t.sql_trace,
t.sql_trace_waits,
t.sql_trace_binds,
t.sql_trace_plan_stats,
t.session_edition_id,
t.creator_addr,
t.creator_serial#,
t.ecid,
t.sql_translation_profile_id,
t.pga_tunable_mem,
t.con_id,
t.external_name
FROM v$session t
ORDER BY t.logon_time;