Re: Changing Logon Password

From: Scott Hollows <shollows_at_ricochet.com>
Date: 1996/09/26
Message-ID: <52f5lc$bv7_at_news0-alterdial.uu.net>#1/1


Jim Schimmoeller <schim_at_erols.com> wrote:

>is there a way to create a stored procedure or function that will allow
>users to change logon password.
>Jim
>schim_at_erols.com

this will do it ...
you have to run the DBMSSQL.sql scripts first (connected as SYS) and you may have to manually grant execute on DBMS_SQL to public or to your users.

CREATE OR REPLACE PROCEDURE
        CHANGE_PASSWORD (p_new_password in char) IS

--
-- Changes the password of the current user
--
  v_cursor number;
  v_result number;
BEGIN
  v_cursor := DBMS_SQL.open_cursor;
  DBMS_SQL.PARSE (v_cursor
		,'Alter User ' 
			|| user
			|| ' identified by '
			|| p_new_password
		,DBMS_SQL.native);
  v_result := DBMS_SQL.EXECUTE (v_cursor);
END;
/

 * Expert Oracle consultants : RDBMS, Designer, Developer *
 Scott Hollows		shollows_at_ricochet.net
+1.415.596.1437	Redwood Shores, California
Received on Thu Sep 26 1996 - 00:00:00 CEST

Original text of this message