patternMinor
"Table or view does not exist" on synonym
Viewed 0 times
synonymexistviewdoesnottable
Problem
I have a database and a USER administrating it. Then I have an additional USER_APP to whom I granted CRUD access to all tables in my oracle data modeler (and then applied these via generated script )
I created a synonym for every table from USER_APP account, with the following syntax:
And for every table generation is successful and commit made.
But when I try to use it anyhow on that account, for example:
I get an error that CLIENTS do not exist, namely
What can I do to fix that or where should I look to determine the cause/solution?
I created a synonym for every table from USER_APP account, with the following syntax:
create synonym USER_APP.CLIENTS for USER.CLIENTS;And for every table generation is successful and commit made.
But when I try to use it anyhow on that account, for example:
select * from CLIENTS;I get an error that CLIENTS do not exist, namely
ORA-00942 : table or view does not exist.What can I do to fix that or where should I look to determine the cause/solution?
Solution
Synonyms have nothing to do with privileges. They are simply a way to simplify naming.
The error you are getting appears to indicate that
Of course, in your actual system, I'm guessing that there is a role that you would grant privileges to and that role would be granted to
The error you are getting appears to indicate that
user_app does not have privileges on the user.clients table. You'd need to grant thatGRANT SELECT, INSERT, UPDATE, DELETE
ON user.clients
TO user_app;Of course, in your actual system, I'm guessing that there is a role that you would grant privileges to and that role would be granted to
user_app.Code Snippets
GRANT SELECT, INSERT, UPDATE, DELETE
ON user.clients
TO user_app;Context
StackExchange Database Administrators Q#58077, answer score: 6
Revisions (0)
No revisions yet.