Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Grants tables to user

560669Apr 24 2013 — edited Apr 24 2013
Hi

I have list of table say 80 - 90 tables which i need to grant for a new user , so i have created a file all_grant.sql and listed as below

grant select on dept to xxuser1;

grant select on emp to xxuser2;
..
..
..

i am calling the file as from the sql prompt

spool all_grants_spool.txt

@all_grants.sql

spool off


once i open the spool file all_grans_spool.txt i get the message


Grant succeeded.

GRANT select ON table1 TO xxuser1

*
ERROR at line 1:
ORA-00933: SQL command not properly ended


from the spool file it indicates that grant command have issue for syntax and need to look into.

my Question

as there are 80 - 90 tables and message "Grant Succeeded" it is difficult to get to know which statement successed.

I am looking like this

emp - Grant succeeded

or

emp

Grant succeeded

any help from your side will be of a great help to me.


Regards
Yram
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2013
Added on Apr 24 2013
5 comments
1,719 views