Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Database link password in user_db_links Oracle
  • Temporary tablespace explaination Oracle
  • Disbaling DBA_SCHEDULER_JOBS Oracle
  • Zip and unzip with tar Linux/Unix
  • Good notes for shared pool Oracle
  • checking connectivity between two servers Linux/Unix
  • sid_wise_cursor.sql find open cursor basis on username or SID Oracle
  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle
  • Library cahe Latches and internal explaination Oracle
  • send attachment from unix-shell script Linux/Unix
  • sesswait.sql Oracle
  • When to rebuld B-tree index Oracle
  • alter database backup controlfile to trace Oracle
  • Drop all SPM baselines for SQL handle Oracle
  • Find_stale_dr.sql finding stale physical DR.. Oracle

sql_plan9i.sql

Posted on 10-May-2008 By Admin No Comments on sql_plan9i.sql

set lines 132

set pages 1400

accept v_address prompt ‘Enter ADDRESS :’

accept v_hash_value prompt ‘Enter HASH VALUE :’

select sql_text from v$sqltext

where address=’&v_address’

and hash_value=’&v_hash_value’

order by piece;

SELECT LPAD(‘ ‘,2*(LEVEL-1))||operation||’ ‘||options ||’ ‘||object_name ||’ ‘|| DECODE(id, 0, ‘Cost = ‘||position)

“Query Plan”

FROM v$sql_plan

START WITH id = 0 and address=’&v_address’ and hash_value=’&v_hash_value’ and child_number=0

CONNECT BY PRIOR id = parent_id and address=’&v_address’ and hash_value=’&v_hash_value’ and child_number=0;

Oracle, SQL scripts

Post navigation

Previous Post: find_idle_cpu.sql
Next Post: find_log_switch.sql Find log switches in graphical manner

Related Posts

  • Oracle Internal Good Websites 1 Oracle
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • How can I tell if ASO is installed ? Oracle
  • get_vmstat.ksh for Solaris Oracle
  • Import and export statements Oracle
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • good linux notes Linux/Unix
  • SAN Linux/Unix
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • AWR settings- MMON is not taking snapshot. Oracle
  • Drop specific SQL plan baseline – spm Oracle
  • Korn Shell Arithmatic Linux/Unix
  • The most important Tuning Notes Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme