Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> alter user via dbms_sql

alter user via dbms_sql

From: Kailash Awati <awatik_at_yahoo.com>
Date: Mon, 27 Sep 1999 19:08:34 +0200
Message-ID: <7so6rq$rcv$1@news.online.de>


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.




CREATE OR REPLACE PROCEDURE
NGE_PASSWORD(
     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;
Received on Mon Sep 27 1999 - 12:08:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US