Get sql_text from sid - Oracle Database Script. col sql_text form a80 SET lines 120 SELECT sql_text FROM gv$sqltext WHERE hash_value= (SELECT sql_hash_value FROM gv$session WHERE sid=&1 AND inst_id=&inst_id) ORDER BY piece /
col sql_text form a80 SET lines 120 SELECT sql_text FROM gv$sqltext WHERE hash_value= (SELECT sql_hash_value FROM gv$session WHERE sid=&1 AND inst_id=&inst_id) ORDER BY piece /