I want to create a view in SCHEMA_A using columns from a table LICENSE in SCHEMA_B.
create view SCHEMA_B.V_TEST as
SELECT LICENSE_NUMBER FROM SCHEMA_A.LICENSE L
then
select * from SCHEMA_B.V_TEST
This is giving me "ORA-01031: insufficient privileges" when I try to select from the view as the admin account. (Edit: admin account has SELECT ANY TABLE privileges.) What am I missing?
There is a similar question but the solution has to do with one user granting select to another. Since I'm admin I should have select privilege on both schemas already? However I have tried adding the line "GRANT SELECT ON SCHEMA_A.LICENSE TO admin_account WITH GRANT OPTION" and get the same error.
schema_a? Are you saying that some third account does not have privileges to query the view that you have created inschema_a? Or are you saying something else? What is the statement that causes the error to be raised? - Justin Caveschema_bdoes have select privileges onschema_a.license, which is necessary. An error from theselectsuggests your 'admin account' does not haveselect any tableprivileges, so you'd need to look at what privileges you do have and need. Why do you think you have select privileges on both schemas already? You might have explicit permissions for existing objects, but not automatically be able to see something new. (It isn't obvious that you need to be able to query the view from that account?). - Alex Pooleschema_badmin user, or the admin user? Does the admin user have its privileges granted directly or through roles? Can you also confirm whether you can select from the view when actually connected asschema_b? - Alex Poole