Oracle Create View issue Oracle Create View issue oracle oracle

Oracle Create View issue


Yes, you have (and always should) to explicitly grant access to objects in another schema.

GRANT SELECT ON user2.table TO user1

Though you're logged in as "the dba account" (SYS, I'm assuming), the CREATE statement is for the user1 schema specifically.


You can do CREATE OR REPLACE FORCE VIEW ...

That will create the view despite the lack of privileges, but the view would not be usable unless the privileges are granted. It is a solution that can be useful if privileges will be granted later (eg in some automated build script).


Probably because you do not have access to the table or view

Querygrant privileges on object to user;