2

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.

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

1 Answers1

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