Skip to Content
0
Feb 17, 2015 at 05:06 PM

Grant privilege to Select on a view

2964 Views

Hello,

I have created a view with the following SQL Statement:

Set Schema "TEST_SCHEMA";

Drop view AN_LAST_PRICE;

Create view AN_LAST_PRICE AS ...

I can do the following:

Select * from AN_LAST_PRICE;

Now my colleage didn't have the permissions to select on my view. But he could do the following as well:

Set Schema "TEST_SCHEMA";

Drop view AN_LAST_PRICE2;

Create view AN_LAST_PRICE2 AS ...

With the same sub query I have used.

Now I wanted to grant him the select privilege to my view:

GRANT SELECT ON "TEST_SCHEMA"."AN_LAST_PRICE" to S000XXXXXX;

This results in:

Could not execute 'GRANT SELECT ON "TEST_SCHEMA"."AN_LAST_PRICE" to S000XXXXXX' in 1.234 seconds .

SAP DBTech JDBC: [258] (at 36): insufficient privilege: Not authorized to grant the privilege on the view: line 1 col 37 (at pos 36)

Do you know which privilege I miss?

Or how I can grant the privilege to select on my view to another user?