I use oracle 12c. I try to grant all privileges of all tables to a user. And in future I don't need to add any privileges to that user. I need to do this. I don't want to grant system tables to that user. I wrote pl/sql command. but it gives error.
BEGIN
2 FOR t IN (select * from dba_tables where owner not like '%SYS%' AND owner not like '%ADMIN%' AND iot_type IS NULL)
3 LOOP
4 EXECUTE IMMEDIATE 'GRANT ALL PRIVILEGES ON '|| t.owner ||'.' || t.table_name ||' TO GGSTEST';
5 END LOOP;
6 END;
7 /
BEGIN
*
ERROR at line 1:
ORA-00905: missing keyword
ORA-06512: at line 4
What is the mistake? thanks.
I use dbms_print
GRANT ALL ON OUTLN.OL$ TO GGSTEST
GRANT ALL ON OUTLN.OL$HINTS TO GGSTEST
GRANT ALL ON OUTLN.OL$NODES TO GGSTEST
GRANT ALL ON DBSNMP.BSLN_BASELINES TO GGSTEST
GRANT ALL ON APEX_040200.WWV_FLOW_LOG_HISTORY TO GGSTEST
GRANT ALL ON DBSNMP.BSLN_METRIC_DEFAULTS TO GGSTEST
GRANT ALL ON XDB.XDB$ROOT_INFO TO GGSTEST
GRANT ALL ON XDB.XDB$XDB_READY TO GGSTEST
GRANT ALL ON XDB.XDB$CDBPORTS TO GGSTEST
GRANT ALL ON XDB.XDB$IMPORT_TT_INFO TO GGSTEST
GRANT ALL ON XDB.XDB$TTSET TO GGSTEST
GRANT ALL ON XDB.XDB$H_INDEX TO GGSTEST
GRANT ALL ON XDB.XDB$D_LINK TO GGSTEST
GRANT ALL ON XDB.XDB$COLUMN_INFO TO GGSTEST
GRANT ALL ON XDB.XDB$PATH_INDEX_PARAMS TO GGSTEST
GRANT ALL ON XDB.X$NM7UJB7VOLFE92KV0GUML7K0LVSF TO GGSTEST
GRANT ALL ON XDB.X$QN7UJB7VOLFE92KV0GUML7K0LVSF TO GGSTEST
GRANT ALL ON XDB.X$PT7UJB7VOLFE92KV0GUML7K0LVSF TO GGSTEST
GRANT ALL ON XDB.APP_USERS_AND_ROLES TO GGSTEST
GRANT ALL ON XDB.APP_ROLE_MEMBERSHIP TO GGSTEST
GRANT ALL ON XDB.XDB$DBFS_VIRTUAL_FOLDER TO GGSTEST
BEGIN
*
ERROR at line 1:
ORA-00905: missing keyword
ORA-06512: at line 4