“Grant option does not exist for view” error in Oracle

I had an MVC project that was using Entity Framework (or THE Entity Framework, if you prefer, Ohio State fans) against an Oracle database. I was jumping into the project and had just created a new Oracle user to limit access the only the tables I needed instead of using a more powerful account that could do whatever it wanted. So I was granting SELECT access to those tables, and also some views. I hit one particular view that gave me this error:

 ORA-01720: grant option does not exist for 'Parks.Coaster_View'

Trying to grant permissions first to the tables that the view referenced, then granting them to the view, didn’t work either. What I had to do, as explained in this article, was to grant select access to the schema owner of the view to the table itself:

grant select on OtherSchema.TableThatViewReferences to Parks with grant option;

After that, my grant statement on the view worked.

Advertisements
  1. Leave a comment

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: