sqlexplain

NAME
SYNOPSIS
OPTIONS
EXAMPLE
COPYRIGHT
SEE ALSO

NAME

sqlexplain − Create an explain plan

SYNOPSIS

sqlexplain [options] -l u/p@c sqlid

For the provided sqlid, the sqlexplain utility will write an explain plan to stdout calling dbms_xplan.display_cursor or dbms_xplan.display_awr

OPTIONS

-l u/p

-l u/p@c

Compulsory option to provide the username, password, and potentially connect string for a database connection that provides access to a login with access to various gv$ and dba_ views. If you omit /p, rwloadsim will prompt for the password.

--awr

Use the display_awr function rather then the display_cursor function from the dbms_xplan package.

--format=’ text string ’

Provide the format argument; the default is ’last, all, allstats’.

--child-no=child#

When using the display_cursor function, provide this cursor_child_no, the default is 0.

--sessionid=sid
--instance=inst#

Rather than providing the sqlid as a command line argument, get it by querying v$session for the provided sessionid or gv$session for the provided sessionid and instance number.

sqlid

Unless --sessionid is specified, exactly one sqlid must be given as a command line argument.

EXAMPLE

sqlexplain -l system/{password} 07rw9znc8g7aj

will print the output of running the query select * from table(dbms_xplan.display_cursor(’07rw9znc8g7aj’,0,’last, all, allstats’)) to stdout

COPYRIGHT

Copyright © 2024 Oracle Corporation
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl

SEE ALSO

rwloadsim(1rwl), sqlreport(2rwl), sqlmonitor(2rwl) sqlmonitorawr(2rwl), utilities(2rwl)