SQL profiles automatically. Which action would you perform to achieve this?
A. Edit the automatic maintenance window group configuration.
B. Set the CURSOR_SHARING parameter to EXACT for the database instance.
C. Use the DBMS_SQLTUNE.SET_TUNING_TASK_PARAMETERS procedure to set
ACCEPT_SQL_PROFILES to FALSE.
D. Set the SQLTUNE_CATEGORY parameter to DEFAULT for the database instance.
Answer: C
Tests SQL profiles by executing the SQL statement
If a SQL profile is recommended, the database tests the new profile by executing the SQL statement both with and without the profile. If the performance improvement improves at least threefold, then the database accepts the SQL profile, but only if the ACCEPT_SQL_PROFILES
task parameter is set to TRUE
. Otherwise, the automatic SQL tuning reports merely report the recommendation to create a SQL profile.
You can alter attributes of an existing SQL profile with the ALTER_SQL_PROFILE
procedure. Modifiable attributes are STATUS
, NAME
, DESCRIPTION
, and CATEGORY
.
The CATEGORY
attribute determines which sessions can apply a profile. You can view the CATEGORY
attribute by querying DBA_SQL_PROFILES.CATEGORY
. By default, all profiles are in the DEFAULT
category, which means that all sessions in which the SQLTUNE_CATEGORY
initialization parameter is set to DEFAULT
can use the profile.
By altering the category of a SQL profile, you can determine which sessions are affected by profile creation. For example, by setting the category to DEV
, only sessions in which the SQLTUNE_CATEGORY
initialization parameter is set to DEV
can use the profile. Other sessions do not have access to the SQL profile and execution plans for SQL statements are not impacted by the SQL profile. This technique enables you to test a profile in a restricted environment before making it available to other sessions.