sqlmonitorawr

NAME
SYNOPSIS
OPTIONS
EXAMPLE
COPYRIGHT
SEE ALSO

NAME

sqlmonitorawr.rwl − Create sql monitor from awr repository

SYNOPSIS

rwloadsim [options] -u -l u/p@c sqlmonitorawr.rwl sqlid

For the provided sqlid, the sqlmonitorawr.rwl utility creates sql monitor from the awr repository view dba_hist_reports_details. The output is written to a file named with the sqlid and a suffix of .html unless the --output-file option is provided.

You can control which actual of many existing sql monitor to output similar to sqlmonitor.rwl that has several ways to provide information about which of potentially many sql monitors to output.

OPTIONS

-u

Compulsory option to find the sqlmonitorawr.rwl script in the public directory.

-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 gv$sql and dba_hist_sqltext. If you omit /p, rwloadsim will prompt for the password.

--output-file=filename

By default, the output is written to a file named as the sqlid with a suffix of .html. Use this option to specify a different filename.

--output-directory=directoryname

By default, the output file is written to the current directory. Use this option to specify a different directory name.

--sql-plan-hash-value=value

Provide a value for the sql_plan_hash_value similar to the same argument to dbms_sql_monitor.report_sql_monitor. Note that if you view the monitor in a browser, this is the hash value of the final statement.

--sql-exec-id=value

Provide a value for the sql_exec_id similar to the same argument to dbms_sql_monitor.report_sql_monitor.

--sql-exec-start=value

Provide a value which must be a date in the exact format YYYY.MM.DDTHH24:MI:SS with a literal T to separate the date part from the time part for the sql_exec_start similar to the same argument to dbms_sql_monitor.report_sql_monitor.

--dbid=value

Provide a value for the dbid found in in the dba_hist_reports view.

--con-dbid=value

Provide a value for the con_dbid found in in the dba_hist_reports view.

--show-list-query

Output a query that you can execute in sqlplus to show all available sql monitor reports saved in the awr repository with the conditions you have provided. Doing this is particularly useful if you are getting a warning about the presence of several reports.

sqlid

Exactly one sqlid must be provided.

EXAMPLE

rwloadsim -ul system/{password} --output-file=x7.html --con-dbid=3554276882 sqlmonitorawr.rwl fn0snbuqyccq5

will create a file named x7.html containing the last found sql monitor in the awr repository from the database with con_dbid=3554276882 with sqlid fn0snbuqyccq5. If multiple entries exist in the awr repository, you will get a warning like

a total of 32 reports found, generating latest with report_id=7086
re-execute with --show-list-query option to give a query you can execute from SQL*Plus

As the warning mentions, you can re-execute with an additional --show-list-query option which will output a query you can copy and paste directly into SQL*Plus. Subsequently you can choose a specific one using its sql_exec_id.

COPYRIGHT

Copyright © 2023 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), utilities(2rwl)