The following procedure, which changes a user password,
gives an ORA-01031 (insufficient privileges) error. This
even though the user executing the procedure has the
ALTER USER privilege granted directly (not via a role).
Any help as to the cause of this error would be much
appreciated.
Thanks in advance.
Kailash.
--------------------------------------------------------------------------- IS CURSOR_PASS INTEGER; BEGIN ---------------------------------------------------------------------------
-------------------------------------------
CREATE OR REPLACE PROCEDURE
NGE_PASSWORD(
P_USER_ID IN VARCHAR2,
P_PASSWORD IN varchar2)
CURSOR_INT INTEGER;
v_string varchar2(100);
CURSOR_PASS := dbms_sql.open_cursor;
v_string := 'alter user ' || p_user_id || ' identified by ' || p_password;
dbms_sql.parse(cursor_PASS,v_string,dbms_sql.v7);
CURSOR_INT := dbms_sql.execute(CURSOR_PASS);
dbms_sql.close_cursor(cursor_PASS);
END;