28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

326<br />

Note: Unlike when you create a role using SQL statements, it is not possible to grant ALL<br />

PRIVILEGES when creating a role in the repository. You must model every privilege individually.<br />

a) Model system privileges using the keyword "system privilege" as follows: system privilege:<br />

PRIVILEGE;<br />

Example:<br />

role ::<br />

{<br />

// multiple privileges in one line are OK<br />

system privilege: BACKUP ADMIN, USER ADMIN;<br />

}<br />

// you can also split lists into multiple entries<br />

system privilege: LICENSE ADMIN;<br />

b) Optional: Model object privileges on the design-time objects views and procedures using the keyword<br />

"SQL object" as follows: sql object :.extension: PRIVILEGE;<br />

Example:<br />

role ::<br />

{<br />

sql object sap.example:MY_VIEW.attributeview: DROP;<br />

// object privileges can be split across lines<br />

sql object sap.example:MY_VIEW.attributeview: DROP;<br />

// a single privilege can be given on multiple objects in a<br />

single line<br />

sql object sap.example:MY_VIEW.attributeview,<br />

sap.example:MY_OTHER_VIEW.analyticview,<br />

sap.example:MY_THIRD_VIEW.analyticview: SELECT;<br />

}<br />

c) Optional: Model object privileges on catalog objects using the keyword "catalog SQL object" as follows:<br />

catalog sql object "SCHEMA"."CATALOG_OBJECT": PRIVILEGE;<br />

Example:<br />

Note: You must always qualify catalog objects with the schema name. You must also reference<br />

catalog objects within double quotes, unlike design-time objects.<br />

role ::<br />

{<br />

// catalog objects must always be qualified with the schema name<br />

catalog sql object "MY_SCHEMA"."MY_VIEW": SELECT;<br />

}<br />

d) Optional: Model schema privileges on schemas using the keywords "catalog schema" or "schema" as<br />

follows depending on whether you are referring to an activated schema or a schema in the repository:<br />

○ catalog schema "SCHEMA": PRIVILEGE;<br />

○ schema :.schema: PRIVILEGE;<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up Roles and Authorizations

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!