Different options to display execution plan and statistics from SQL*Plus?

— Turn off display of execution plan and statistics
SET AUTOTRACE OFF

— show user query output, execution plan
SET AUTOTRACE ON EXPLAIN

— display output from query and statistics
SET AUTOTRACE ON STATISTICS

— show user query output, execution plan and statistics
SET AUTOTRACE ON

— set trace on but suppress output from query, display execution plan and statistics
SET AUTOTRACE TRACEONLY

To be able view the trace using the above option the user needs PLUSTRACE role assigned, the role is created by running the script which is ORACLE_HOME @?/sqlplus/admin/plustrce.sql to be run as SYS. If the PLUSTRACE role is not granted you will get the following error “SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled”