0

In oracle, how can i give grant to 'A' user to access 'B' schema?

Also, Is it possible to give, 'SELECT, EXECUTE AND VIEW' grant to A user on B schema?

  • you should refer to the documentation before posting such a question – Vamsi Prabhala Nov 12 '15 at 17:25
  • i did and i could not find. –  Nov 12 '15 at 17:27
  • 3
    [http://stackoverflow.com/questions/198952/correct-way-to-give-users-access-to-additional-schemas-in-oracle](http://stackoverflow.com/questions/198952/correct-way-to-give-users-access-to-additional-schemas-in-oracle) http://stackoverflow.com/questions/4220094/granting-permission-to-users-on-different-schema – Nagendra Prasad Balaka Nov 12 '15 at 17:28
  • [http://stackoverflow.com/questions/198952/correct-way-to-give-users-access-to-additional-schemas-in-oracle](http://stackoverflow.com/questions/198952/correct-way-to-give-users-access-to-additional-schemas-in-oracle) http://stackoverflow.com/questions/4220094/granting-permission-to-users-on-different-schema – Nagendra Prasad Balaka Nov 12 '15 at 17:32
  • sorry but these are not my answers. –  Nov 12 '15 at 17:33

1 Answers1

0
SELECT 'GRANT ALL ON '||table_name||' TO BOB;'
FROM   ALL_TABLES
WHERE  OWNER = 'ALICE';
  • i just want to grant 'SELECT, EXECUTE AND VIEW' not all –  Nov 12 '15 at 17:41
  • Use select or execute or view instead ALL in query – Nagendra Prasad Balaka Nov 12 '15 at 17:51
  • @sezercan accept this answer if it is usefull to you – Nagendra Prasad Balaka Nov 12 '15 at 17:59
  • you can not view or execute table. –  Nov 12 '15 at 18:08
  • Do you have the grant to the other user's table directly? Or is it via a role? You will need the privilege to be granted directly in order to create an object (view, procedure, etc.) that references the other table. As a quick test, in SQL*Plus `SQL> set role none; SQL> select count(*) from otherschema.othertable;` If that fails, then the problem is that you have been granted privileges on the table via a role. – Nagendra Prasad Balaka Nov 12 '15 at 18:11