Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pl/SQl procedure
In article <QjxM3.7857$Ph7.39186_at_insync>,
"Joet Singh" <jsingh_at_bigfoot.com> wrote:
> Anybody out there already have a procedure for changing user password?
> Where the user gives there old password and new password. I am using
PL/SQL
> 8.0 and the main problem I am having is phrasing "alter" statement
with in
> the procedure. Any help is appreciated.
>
>
Hi, you need the old password to connect as the user,
then:
alter user <username> identified by <new password>;
you will need to wrap that into dynamic sql, so check out the package dbms_sql.
the proceeding would go like:
(by the time you get here, you already used the old password to connect...)
put statement into a varchar2
open cursor;
parse statement with cursor;
execute statement;
close cursor;
you may want to catch some exceptions along the way, and make sure you always close the cursor. (perhaps a when others exception handler)
Karsten
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Oct 12 1999 - 03:30:42 CDT