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 -> Re: Changing password via stored procedure

Re: Changing password via stored procedure

From: M. Bhatti <mohammed.bhatti_at_mci.com>
Date: 1998/10/19
Message-ID: <362B89F4.47DCE84A@mci.com>#1/1

Marc Rennhard wrote:

> Hi there,
>
> I'm pretty new to ORACLE (7.3) and I'm writing my first stored
> procedures in
> PL/SQL. So just a question:
>
> How to change the password of a user via stored procedure?
> (It should correspond to ALTER USER user IDENTIFIED BY pwd)
>
> Thanks in advance for any help,
> Marc

create or replace procedure sp_Change_Password (sUserID IN VARCHAR2,
sPassWord IN VARCHAR2)
AS
cur_handle INTEGER;
sSQL VARCHAR2(200) := '';

BEGIN
  cur_handle := DBMS_SQL.OPEN_CURSOR;
  sSQL := 'ALTER USER ' || sUserID || ' IDENTIFIED BY ' || sPassword ;   DBMS_SQL.PARSE(cur_handle, sSQL, DBMS_SQL.V7); END
/

That should get you started (note no exception handling, but you should add some add).

mkb Received on Mon Oct 19 1998 - 00:00:00 CDT

Original text of this message

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