create or replace procedure grant_on_tablespace
(tb_name in varchar2,user_name in varchar2)
is
begin
for rec in (select table_name,OWNER
from all_tables
where tablespace_name=tb_name)
loop
execute immediate 'grant select on '||rec.table_name||' to '||user_name;
end loop;
end grant_on_tablespace;