@@header

/*
*
*  Author     : Vishal Gupta
*  Purpose    : Display Execution plan from cursor cache
*  Parameters : 1 - SQL_ID
*               
*
*  Revision History:
*  ===================
*  Date       Author        Description
*  ---------  ------------  -----------------------------------------
*  18-Mar-12  Vishal Gupta  Intial version
*
*
*/

SET verify OFF

VARIABLE sql_id VARCHAR2(13)
VARIABLE child_number NUMBER

BEGIN
   :sql_id := '&&1';
   :child_number := NULL;
END;
/


SET long 4000 
SET longchunksize 4000 

 
SELECT * 
FROM table(DBMS_XPLAN.display_cursor( sql_id          => :sql_id 
                                    , cursor_child_no => :child_number
                                    , format          => 'ADVANCED'
                                  )
          )
;


@@footer
