declare cursor c5 is select object_name, object_type from user_objects where object_type in ('TABLE','FUNCTION','PACKAGE') and status = 'VALID' order by object_type desc; n integer; begin n := dbms_sql.open_cursor; for c5rec in c5 loop begin IF c5rec.object_type in ('TABLE', 'FUNCTION', 'PACKAGE') THEN dbms_sql.parse(n, 'grant select on ' || c5rec.object_name || ' to TFR', dbms_sql.V7); END IF; exception when others then null; end; end loop; dbms_sql.close_cursor (n); end; /