Task Operations
BEGIN
DBMS_SQLTUNE.EXECUTE_TUNING_TASK (task_name =>
‘dba_tuning_task_v1’ );
END;
/
For the Senior DBA or those who prefer the
hands-on approach, use the dbms_advisor.create_task
procedure. To view the tasks associated with any specific user
or application schema, use the following command:
SELECT
TASK_NAME FROM DBA_ADVISOR_LOG WHERE OWNER = ‘owner’ ;
Similarly,
the
dba_advisor_log
can
be used to
find the status of
a
tuning task:
SELECT
TASK_NAME FROM DBA_ADVISOR_LOG WHERE task_name =
‘dba_tuning_task_v1’ ;
The
execution progress
can be checked with
the v$session_longops view, which
gives the status of various operations that run longer than six
seconds (in absolute time).
Table 7.1 describes the columns available in this view.