:

ORA-38171 Insufficient privileges for SQL management object operation

The Problem

You are trying to load plans into a SQL Management Baseline (SMB) in your 11g DB and you receive the following error:

SQL> DECLARE
2    my_plans PLS_INTEGER;
3  BEGIN
4    my_plans := DBMS_SPM.LOAD_PLANS_FROM_SQLSET( sqlset_name => ‘TEST’);
5  END;
6  /
DECLARE
*
ERROR at line 1:
ORA-38171: Insufficient privileges for SQL management object operation
ORA-06512: at “SYS.DBMS_SPM”, line 2093
ORA-06512: at line 4

The Solution

The user Requires the ADMINISTER SQL MANAGEMENT OBJECT privilege, so grant it like this:

GRANT ADMINISTER SQL MANAGEMENT OBJECT to USER;

If you are trying to use the DBMS_SQLTUNE package to load SQL plans into a SQL Tuning Set (STS) with the CAPTURE_CURSOR_CACHE_SQLSET procedure and receive the error ORA-13761: invalid filter or ORA-13773: insufficient privileges to select data from the cursor cache then read my other article which details how to resolve them.

Like it, share it...

Category: SQL


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *