Reputation: 63
I need to get a script working for ordinary users, within the schema of a more privileged account. I'm using set current_schema to accomplish that. However, I'm finding that public synonyms don't work once I've altered the schema - I can't access a table in a third different schema unless I qualify it:
>select count(*) from my_table;
COUNT(*)
----------
79982
>alter session set current_schema = admin_account;
Session altered.
>select count(*) from my_table;
select count(*) from my_table
*
ERROR at line 1:
ORA-00942: table or view does not exist
>select count(*) from other_account.my_table;
COUNT(*)
----------
79982
Is there any way to get the synonym working again?
Upvotes: 1
Views: 1977
Reputation: 6336
Public synonyms
are accessible to all users
. However each user must have appropriate privileges on the underlying object in order to use the synonym
.Check the priviledges for admin_account
on table my_table
Upvotes: 1