Collected posts: Oracle, SQL, PL/SQL, Performance, Security...(More than 300 blogs)

mardi 26 mars 2013

Oracle White Paper :SQL Profiles: Technical Overview



What is a SQL profile? 
            A SQL profile is a set of auxiliary information specific to a SQL statement. Conceptually, a SQL
profile is to a SQL statement what statistics are to a table or index. The database can use the
auxiliary information to improve execution plans.
A SQL profile contains corrections for poor optimizer estimates discovered by the SQL Tuning
advisor. This information can improve optimizer cardinality and selectivity estimates, which in
turn leads the optimizer to select better plans.
The SQL profile does not contain information about individual execution plans. Rather, the
optimizer has the following sources of information when choosing plans:
• The environment, which contains the database configuration, bind variable values, optimizer
statistics, data set, etc.
• The supplemental statistics in the SQL profile
 Therefore, SQL profiles just guide the optimizer to a better plan.
Sql-profiles-technical-overview-128535

lundi 4 mars 2013

SYS.DBMS_SESSION :ORA-01031: insufficient privileges






Lors de l'activation de traçage Oracle en utilisant SYS.DBMS_SESSION.session_trace_enable
J'ai réçu l'erreur Oracle suivante:

ORA-01031: insufficient privilegesORA-06512: at "SYS.DBMS_SESSION", line 276ORA-06512: at line 3,
begin
dbms_session.session_trace_enable();end;

Un simple grant execute sur dbms_session package ne fonctionne pas; vous avez besoin de faire :


grant CONNECT_9I from YourOracleUser ;

Assigner le rôle CONNECT_9I à l'utilisateur oralce  YourOracleUser.

Le rôle CONNECT_9I a les privilèges nécessaires pour utiliser le Package DBMS_SESSION