Search notes:

Oracle: DBMS_SQLTUNE

dbms_sqltune is the traditional package to manage SQL Tuning Sets. The package allows to to create, alter, drop and transport SQL profiles.
It requires Oracle Tuning Pack.
dbms_sqlset offers the same functionality, but without the Tuning Pack.
dbms_sqltune requires the ADMINISTER SQL MANAGEMENT OBJECT privilege.

Functions and procedures

accept_all_sql_profiles
accept_sql_profile
add_sqlset_reference
alter_plan_object_xml
alter_sql_profile
alter_tuning_task_xml
build_stash_xml
cancel_tuning_task
capture_cursor_cache_sqlset
cap_sts_cbk
check_sqlset_privs
check_sql_profile_priv
check_tuning_task_status
configure_tuning_task_xml
create_sqlset
create_sqlset
create_sql_plan_baseline
create_stgtab_sqlprof
create_stgtab_sqlset
create_tuning_task
delete_sqlset
drop_plan_object_xml
drop_sqlset
drop_sql_profile
drop_tuning_task
examine_stgtab
execute_tuning_task
export_plan_object_xml
extract_bind
extract_binds
implement_tuning_task
implement_tuning_task_xml
import_plan_object_xml
import_sql_profile
interrupt_tuning_task
list_all_directories_xml
load_sqlset
load_sql_plan_baseline_xml
pack_stgtab_sqlprof
pack_stgtab_sqlset
prepare_awr_statement
prepare_sqlset_statement
remap_stgtab_sqlprof
remap_stgtab_sqlset
remove_sqlset_reference
report_auto_tuning_task
report_sql_detail
report_sql_detail_xml
report_sql_monitor
report_sql_monitor_list
report_sql_monitor_list_xml
report_sql_monitor_xml
report_tuning_task
report_tuning_task_list_xml
report_tuning_task_xml
reset_tuning_task
resume_tuning_task
schedule_tuning_task See Identifying SQL statements: force_matching_signature and exact_matching_signature
script_tuning_task
select_cursor_cache collects SQL statements from the shared SQL area.
select_sqlpa_task
select_sqlset
select_sql_trace reads a trace file and returns the found SQL statements as an sqlset_row.
select_workload_repository
set_auto_tuning_task_parameter
set_tuning_task_parameter
sqlset_progress_stats
sqltext_to_signature
transform_sqlset_cursor
unpack_stgtab_sqlprof
unpack_stgtab_sqlset
update_sqlset

Operations sequences

SQL profile «life cycle»

dbms_sqltune.accept_sql_profile implements a (new) SQL profile.
dba_sql_profiles shows available profiles.
Existing profiles is modified with dbms_sqltune.alter_sql_profile.
Profiles are removed with `dbms_sqltune.drop_sql_profile.

Transporting SQL profiles

dbms_sqltune.create_stgtab_sqlprof creates the staging table.
dbms_sqltune.pack_stgtab_sqlset copies an SQL profile's data into the staging table.
dbms_sqltune.unpack_stgtab_sqlset uses the data in a staging table to create SQL profiles.
Typically, after inserting data into the staging table, the data is then copied to another server using with the Data Pump or a database link.

See also

Oracle DBMS PL/SQL packages

Index