undefine owner
set linesize 200
set heading off
set feedback off
set verify off
spool create_sequences.sql
select 'create sequence '||sequence_name||' minvalue '||min_value||' maxvalue '
       ||max_value||' '||decode(cycle_flag,'Y','CYCLE','N','NOCYCLE')||' '
       ||decode(cache_size,'0','NOCACHE','CACHE '||cache_size)||' '
       ||decode(order_flag,'Y','ORDER','N','NOORDER')||' increment by '
       ||increment_by||' start with '||to_char(last_number+1)||';'
from  dba_sequences
where sequence_owner = upper('&&owner')
order by sequence_name
/
select 'grant '||privilege||' on '||table_name||' to '||grantee
       ||decode(grantable,'Y',' with grant option;',';')
from dba_tab_privs tp,
     dba_objects o
where tp.owner      = upper('&owner')
and   tp.table_name = o.object_name
and   tp.owner      = o.owner
and   o.object_type = 'SEQUENCE'
order by object_name
/
spool off
set heading on
set feedback on
set linesize 120
