Databases Reference
In-Depth Information
After reviewing the SQL statement, copy the text from this screen, paste it into a SQL*Plus session,
and run it. You might want to do this if you prefer to modify the script before executing it. For example,
you might want to apply your index naming standards or modify the tablespace in which the index is
created.
If you want to schedule the implementation script to be run by Enterprise Manager, then navigate
back to the screen shown in Figure 10-9 and click on the Schedule Implementation button.
These steps illustrate the most basic usage of the SQL Access Advisor. We recommend that you run
through these screens to familiarize yourself with the tool and its full capabilities.
Querying Advisor Views
There are several data dictionary views you can query to display information regarding SQL Access
Advisor activities (refer to Table 10-3 for commonly used advisor view names and descriptions). For
example, to report on tasks and execution details, query the DBA_ADVISOR_TASKS view.
select
owner
,task_name
,advisor_name
,created
,execution_start
,status
from dba_advisor_tasks
where advisor_name = 'SQL Access Advisor'
order by 1, 2;
Here is some sample output for this example:
OWNER TASK_NAME ADVISOR_NAME CREATED EXECUTION STATUS
------- ----------------- -------------------- --------- --------- --------
SYS SQLACCESS2522132 SQL Access Advisor 22-JUL-11 22-JUL-11 COMPLETED
SYS SQLACCESS4159181 SQL Access Advisor 19-AUG-11 19-AUG-11 EXECUTING
To report on advisor usage statistics, run this query:
select
advisor_name
,last_exec_time
,num_db_reports
from dba_advisor_usage
order by 1, 2;
 
Search WWH ::




Custom Search