set serveroutput on size 1000000 format wrapped
declare
cursor c is select 'alter user ' || lower(username) || ' identified by '||lower(username) md_pwd
3 from dba_users
where lower(username) in ('maps','readonly','ods_batch','mpsload','mapsuser')
order by username;
begin
for r in c loop
dbms_output.put_line(r.md_pwd);
execute immediate r.md_pwd;
end loop;
end;
/[@more@]
declare
cursor c is select 'alter user ' || lower(username) || ' identified by '||lower(username) md_pwd
3 from dba_users
where lower(username) in ('maps','readonly','ods_batch','mpsload','mapsuser')
order by username;
begin
for r in c loop
dbms_output.put_line(r.md_pwd);
execute immediate r.md_pwd;
end loop;
end;
/[@more@]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/3345/viewspace-1031552/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/3345/viewspace-1031552/