this is a script I would like to be able to grab from the net no
matter where I am and run it as SYS.
Basically so far I always have to log on to the host machine as SYS in
case an user XZY happens to need to select from view e.g. V$INSTANCE,
am I am getting tired of that.
for rec in (
select replace(table_name, 'V$', 'V_$') table_name
where table_name like 'V$%'
execute immediate 'grant select on '
||rec.table_name||' to system with grant
when others then
||' '||sqlcode||' '||sqlerrm, 1, 255));