I have a parent table in schema A, when I try to select the synonym from schema B then it gives me error 'ORA-01031: insufficient privileges'. Please suggest what is the issue here? patrent table is in schema A and my synonym is in schema B.
Asked
Active
Viewed 140 times
2
-
Does schema B have select privileges on the table in schema A? – Chris Saxon May 20 '20 at 13:18
-
You have contradicting statements - `I have a synonym in schema A` and `my synonym is in schema B` – Lalit Kumar B May 20 '20 at 13:23
-
You'll get the fastest answer to your question if you provide the `CREATE` statements of the synonym, the object/table it is pointing to and the `GRANT` statements... – wolφi May 20 '20 at 13:23
-
how can i check that? Please tell I am new to oracle and also if yes then how can I grants that privilege – Himanshu Tiwari May 20 '20 at 13:23
1 Answers
1
Just creating the synonym doesn't grant any privilege on the underlying object. You need to explicitly grant required privileges on the object. Also, privilege are actually not granted on a synonym, the actual grant is made on the object referred to by the synonym.
To grant select on the table, do:
GRANT SELECT ON table TO SCHEMA2; -- do this in SCHEMA1

Lalit Kumar B
- 47,486
- 13
- 97
- 124