Creating an Oracle Profile

Administering users with different policies have the possibility of major security in oracle database that compliam with all security departments in each organization.

In Oracle 19, have the same way to create profiles as Oracle 12.1, 12.2 , 18 and 19.

CREATE PROFILE GANDALF LIMIT 
   SESSIONS_PER_USER          UNLIMITED 
   CPU_PER_SESSION            UNLIMITED 
   CPU_PER_CALL               3000 
   CONNECT_TIME               45 
   LOGICAL_READS_PER_SESSION  DEFAULT 
   LOGICAL_READS_PER_CALL     1000 
   PRIVATE_SGA                15K
   COMPOSITE_LIMIT            5000000; 

Here, you have an small explanation about each parameter :

  1. SESSIONS_PER_USER: The user can have any number of concurrent sessions.
  2. CPU_PER_SESSION: In a single session, the user can consume an unlimited amount of CPU time.
  3. CPU_PER_CALL: A single call made by the user cannot consume more than 30 seconds of CPU time.
  4. CONNECT_TIME: A single session cannot last for more than 45 minutes.
  5. LOGICAL_READS_PER_SESSION: In a single session, the number of data blocks read from memory and disk is subject to the limit specified in the DEFAULT profile.
  6. LOGICAL_READS_PER_CALL: A single call made by the user cannot read more than 1000 data blocks from memory and disk.
  7. PRIVATE_SGA: A single session cannot allocate more than 15 kilobytes of memory in the SGA.
  8. COMPOSITE_LIMIT: in a single session, the total resource cost cannot exceed 5 million service units. The formula for calculating the total resource cost is specified by the ALTER RESOURCE COST statement.

Those are not the only paramters ,but this its a great example to start diferent tests.

ORA-38171: Insufficient privileges for SQL management object operation

Cuando trabajamos en tareas de performance, es util poder ejecutar desde la linea de comandos (Con analisis previo) las recomendaciones propuestas por:

  • SQLPrt (linea de comandos, recomendaciones propuestas.)
  • SQL TUNNING SET.

Dichas recomendaciones pueden mostrarnos:

  • Cambio de Plan de Ejeuccion.
  • Reescritura de querys.
  • Creacion de Indices.
  • Creacion de Profiles.

Descripcion del problema

Con respecto a la creacion de PROFILES, el siguiente error aparecera  si no contamos con los privilegios necesarios para aplicar las recomendaciones obtenidas.

Ante el intento de setear un profile por comandos

El resultado que nos aparece es el siguiente:

SQL> execute sys.dbms_sqltune.accept_sql_profile(task_name => 'HEAVYQUERY',replace => TRUE);
BEGIN sys.dbms_sqltune.accept_sql_profile(task_name => 'HEAVYQUERY',replace => TRUE); 
*
ERROR at line 1:
ORA-24265: Insufficient privileges for SQL profile operation
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_SQLTUNE", line 5659
ORA-06512: at "SYS.DBMS_SQLTUNE", line 5535
ORA-06512: at "SYS.DBMS_SQLTUNE", line 5564
ORA-06512: at line 1

ORA-24265: Insufficient privileges for SQL profile operatio

Ante el intento de aplicar el PROFILE desde Cloud Control. Sigue leyendo