Answers for "ORACLE STORED PROCEDURE TO ALTER PASSWORD"

0

ORACLE STORED PROCEDURE TO ALTER PASSWORD

create or replace procedure SysChangePassword(
  pUserName in varchar2, 
  pPassWord in Varchar2) as
begin
  -- Check for system users here and reject
  if upper(pUserName) in ('SYS','SYSTEM') then
    dbms_output.put_line('not allowed');
  else
     execute immediate 'alter user '||pUserName||' identified by ' ||
           pPassWord;
    dbms_output.put_line('altered');
  end if;
  exception
     when others then
         dbms_output.put_line('error: ' || sqlerrm);
end;
/
Posted by: Guest on March-05-2021

Code answers related to "ORACLE STORED PROCEDURE TO ALTER PASSWORD"

Browse Popular Code Answers by Language