2026-03-12 20:23:15
This commit is contained in:
22
timhall/monitoring/sql_text.sql
Normal file
22
timhall/monitoring/sql_text.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
-- -----------------------------------------------------------------------------------
|
||||
-- File Name : https://oracle-base.com/dba/monitoring/sql_text.sql
|
||||
-- Author : Tim Hall
|
||||
-- Description : Displays the SQL statement held at the specified address.
|
||||
-- Comments : The address can be found using v$session or Top_SQL.sql.
|
||||
-- Requirements : Access to the V$ views.
|
||||
-- Call Syntax : @sql_text (address)
|
||||
-- Last Modified: 15/07/2000
|
||||
-- -----------------------------------------------------------------------------------
|
||||
SET LINESIZE 500
|
||||
SET PAGESIZE 1000
|
||||
SET FEEDBACK OFF
|
||||
SET VERIFY OFF
|
||||
|
||||
SELECT a.sql_text
|
||||
FROM v$sqltext_with_newlines a
|
||||
WHERE a.address = UPPER('&&1')
|
||||
ORDER BY a.piece;
|
||||
|
||||
PROMPT
|
||||
SET PAGESIZE 14
|
||||
SET FEEDBACK ON
|
||||
Reference in New Issue
Block a user