Oracle 12.1, ORA-00942: table or view does not exist

This is a bug in Oracle 12.1. When you have a table in one schema (Schema1) with a sequence on some column and you want to insert in that table from another schema (Schema2), error message “ORA-00942: table or view does not exist” is displayed. This happens although you have privileges to select, insert, update or delete on the table in Schema1. To fix that, you need to grant SELECT on the sequence too. Hope Oracle find a way to display more suitable error message in such cases.

Example:

Table Event in Schema1 :

GRANT SELECT,INSERT,UPDATE,DELETE ON Event TO Schema2;
GRANT SELECT ON Event_Id_SEQ TO Schema2;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s