DROP ROLE plustrace;
CREATE ROLE plustrace;
GRANT SELECT ON V_$SESSTAT TO plustrace;
GRANT SELECT ON V_$STATNAME TO plustrace;
GRANT SELECT ON V_$MYSTAT TO plustrace;
GRANT plustrace TO dba WITH ADMIN OPTION;
@?\rdbms\admin\utlxplan.sql
CREATE PUBLIC SYNONYM plan_table FOR system.plan_table;
GRANT SELECT, UPDATE, INSERT, DELETE ON plan_table TO ;
GRANT plustrace TO ;
SET AUTOTRACE ON
SELECT * FROM dual;
執行查詢後應顯示執行計畫與統計資訊(如 consistent gets、physical reads、bytes sent/received)。