Originally posted by balajiyes
hi,
i think u have to use DYNAMIC block
for example:
EXECUTE IMMEDIATE
'begin
alter user xxx account unlock;
end';
this sholud help u
that does not work...
Code:
begin
execute immediate 'alter user xxx account lock';
end;
/
if you wanna lock many users you do (for example lock everyone's acc who's got expired in a speicific date, XXXX would your predicate)
begin
for i in (select * from dba_users where expiry_date = to_date(XXXX))
loop
execute immediate 'alter user '||i.username||' account lock';
end loop;
end;
/
[Edited by pando on 01-19-2002 at 06:12 AM]