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

Home -> Community -> Usenet -> c.d.o.server -> Re: pl/sql

Re: pl/sql

From: Jeremy Ovenden <jovenden_at_hazelweb.co.uk>
Date: 2000/03/07
Message-ID: <8a2jii$anj$1@gxsn.com>#1/1

I believe you will need to use dynamic sql to achieve this (dbms_sql). For example, this is a procedure from a package that I have been using which works OK (it may not be most elegant but it does the job for now).

procedure update_password

     (p_username  in varchar2,
      p_password  in varchar2,
      p_return_code out varchar2)

is

v_c number;
v_sql varchar2(2000);

begin

  begin
    v_sql := 'alter user '||p_username||' identified by '||p_password;     v_c := dbms_sql.open_cursor;
    dbms_sql.parse(v_c,v_sql,dbms_sql.v7);     dbms_sql.close_cursor(v_c);
  exception
    when others then

      p_return_code := sqlerrm(sqlcode);
      return;

  end;

  p_return_code := null;

end update_password;

bogaczew_at_my-deja.com wrote in message <8a2e96$85r$1_at_nnrp1.deja.com>...
>hi
>how can i change users passsword with pl/sql?
>thanx
>Pawel Bogaczewicz
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Tue Mar 07 2000 - 00:00:00 CST

Original text of this message

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