Synonym privilege issue in oracle after creation?

Viewed 71

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.

1 Answers

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
Related