My Oracle Support Banner

ORA-1031 When Executing 'Alter User' With DBMS_SQL (Doc ID 1014103.102)

Last updated on MARCH 21, 2025

Applies to:

PL/SQL - Version 9.2.0.8 and later
Information in this document applies to any platform.

Symptoms

 The following error is generated when end users who have privilege to execute on a stored function attempt to execute a stored function owned by another user:

    ORA-01031: insufficient privileges

This error does not occur when the stored function is executed by the owner, or when executed by the user when the function is owned and compiled under the user's schema before execution.

The stored function is using DBMS_SQL to execute and 'alter user' statement.

 
Fails with:

Error is: ORA-01031: insufficient privileges
FALSE

PL/SQL procedure successfully completed.

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!


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