Search for the password expired user in a oracle database and change a new password.
To search all the users in a database execute the below query as Sys user.
set serveroutput on
BEGIN
for rr in(select USERNAME from dba_users)loop
--execute IMMEDIATE 'alter user '||rr.USERNAME||' identified by abc12345';
dbms_output.put_line('alter user '||rr.USERNAME||' identified by abc12345 ;');
end loop;
end;
/
Above query gives you a all user in database with a password you want change it.
Execute the output of above query to change a password.
To search all the users in a database execute the below query as Sys user.
set serveroutput on
BEGIN
for rr in(select USERNAME from dba_users)loop
--execute IMMEDIATE 'alter user '||rr.USERNAME||' identified by abc12345';
dbms_output.put_line('alter user '||rr.USERNAME||' identified by abc12345 ;');
end loop;
end;
/
Above query gives you a all user in database with a password you want change it.
Execute the output of above query to change a password.
No comments:
Post a Comment