Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> alter user via dbms_sql
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.
P_USER_ID IN VARCHAR2, P_PASSWORD IN varchar2)
IS
CURSOR_PASS INTEGER;
CURSOR_INT INTEGER;
v_string varchar2(100);
BEGIN
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;
![]() |
![]() |