cancel
Showing results for 
Search instead for 
Did you mean: 

Created a View but cannot Access it

seasonfan
Explorer
0 Kudos

Hi All,
We have a table USAGE created in HANA repository by .hdbdd file, the owner of the table is _SYS_REPO.

Later we create a view USAGE_V in on this table, the creator is SYSTEM.

When we try to access USAGE_V, SELECT * FROM USAGE_V, we fail with insufficient privilege error.

Both table and view are in schema ATT and our users have privilege to SELECT on ATT.

I am wondering why our selection fails in this case? Why it happens? And how can we fix it?

Thanks and best regards,

Wenjing

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi, Season fan.

You have privilege to SELECT on ATT, but all view are on _SYS_BIC schema.

You should have privilege to select it or stuctured prrivilege for this view.

You can check privileges for your user to select USAGE_V using following script or you can use Authorization Dependency Viewer (https://blogs.sap.com/2015/07/07/authorization-dependency-viewer/).

:

SELECT
  "ROOT_SCHEMA_NAME",
  "ROOT_OBJECT_NAME",
  "USER_NAME",
  "USER_ID",
  "SCHEMA_NAME",
  "OBJECT_NAME",
  "OBJECT_OID",
  "EFFECTIVE_FILTER",
  "STRUCTURED_PRIVILEGE_NAME",
  "STRUCTURED_PRIVILEGE_ID",
  "STRUCTURED_PRIVILEGE_FILTER",
  "STRUCTURED_PRIVILEGE_DEFAULT_SCHEMA_NAME",
  "STRUCTURED_PRIVILEGE_STATUS" 
FROM "SYS"."EFFECTIVE_STRUCTURED_PRIVILEGES" 
where "ROOT_SCHEMA_NAME" = '_SYS_BIC' 
and "ROOT_OBJECT_NAME" = 'package/VIEW_NAME' 
and USER_NAME = 'USER_NAME'
seasonfan
Explorer
0 Kudos

Hi Ihor,

Thanks for your information but I didn't find my view USAGE_V on _SYS_BIC schema.

The authorization trace showed that SYSTEM is not allowed to grant privilege SELECT for TABLE ATS.USAGE.

ATS.USAGE belongs to _SYS_REPO and I don't know how to make SYSTEM have the select with grant option on this table.

So we try to re-create the view by hdbview file, this time every user has access to this view.

Thanks and best regards,

Season

former_member456023
Contributor
0 Kudos

Hi,

Troubleshoot the error "Insufficient privilege: Not Authorized" using the steps in below document.

https://help.sap.com/viewer/bed8c14f9f024763b0777aa72b5436f6/2.0.00/en-US/9a33043bc2c14981a92bf0f09c...

Hope it helps.

Thanks
Ashraf

seasonfan
Explorer
0 Kudos

Thanks, Ashraf. The trace configuration helped me identify the missing authorization.