[oracle@PTUD-S07 ~]$ cat a.sql
select 'GRANT SELECT ON OCDM_SYS.'||Table_Name||' TO OCDM_REPORT;' from All_Tables where owner='OCDM_SYS';
[oracle@PTUD-S07 ~]$ sqlplus / as sysdba @a.sql >> b.sql &
[3] 28402
[oracle@PTUD-S07 ~]$ cat b.sql | grep 'GRANT SELECT ON' >> c.sql
select 'GRANT SELECT ON OCDM_SYS.'||Table_Name||' TO OCDM_REPORT;' from All_Tables where owner='OCDM_SYS';
[oracle@PTUD-S07 ~]$ sqlplus / as sysdba @a.sql >> b.sql &
[3] 28402
[oracle@PTUD-S07 ~]$ cat b.sql | grep 'GRANT SELECT ON' >> c.sql
[oracle@PTUD-S07 ~]$ sqlplus / as sysdba @c.sql
0 komentar:
Post a Comment