My Oracle Support Banner

After Upgrade 11.2.0.4.4 ORA-01031 DBMS_UTILITY.get_parameter_value (Doc ID 1939079.1)

Last updated on FEBRUARY 08, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.

Symptoms

On : 11.2.0.4 version, Database Security

When attempting to use DBMS_UTILITY.get_parameter_value ('db_name', intval, db_name);
the following error occurs.

ERROR
-----------------------
ORA-01031: insufficient privileges

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. sqlplus / as sysdba

2 create user USER1 identified by "<password>" quota unlimited on <tablespace> ;

CREATE or replace FUNCTION "USER1"."F_GET_USER_SERVICE_NAME" (A_USER VARCHAR2 DEFAULT USER)
RETURN VARCHAR2 IS
intval BINARY_INTEGER;
partyp BINARY_INTEGER;
returnparm VARCHAR2 (255);
db_name VARCHAR2 (30);
db_domain VARCHAR2 (255);
BEGIN
partyp := DBMS_UTILITY.get_parameter_value ('db_name', intval, db_name);
partyp := DBMS_UTILITY.get_parameter_value ('db_domain', intval, db_domain);
returnparm := A_USER || '.' || db_name;

IF db_domain IS NOT NULL THEN
returnparm := returnparm || '.' || db_domain;
END IF;

RETURN returnparm;
END f_get_user_service_name;
/


3) select USER1.F_GET_USER_SERVICE_NAME from dual;
      *
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_UTILITY", line 140
ORA-06512: at "USER1.F_GET_USER_SERVICE_NAME", line 16
ORA-06512: at line 1

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.