SapHanaTutorial.Com HOME     Learning-Materials Interview-Q&A Certifications Quiz Online-Courses Forum Jobs Trendz FAQs  
     Explore The World of Hana With Us     
About Us
Contact Us
 Apps
X
HANA App
>>>
Hadoop App
>>>
Tutorial App on SAP HANA
This app is an All-In-One package to provide everything to HANA Lovers.

It contains
1. Courses on SAP HANA - Basics, Modeling and Administration
2. Multiple Quizzes on Overview, Modelling, Architeture, and Administration
3. Most popular articles on SAP HANA
4. Series of Interview questions to brushup your HANA skills
Tutorial App on Hadoop
This app is an All-In-One package to provide everything to Hadoop Lovers.

It contains
1. Courses on Hadoop - Basics and Advanced
2. Multiple Quizzes on Basics, MapReduce and HDFS
3. Most popular articles on Hadoop
4. Series of Interview questions to brushup your skills
Apps
HANA App
Hadoop App
';
Search
Stay Connected
Search Topics
Topic Index
+
-
SAP HANA Overview
+
-
SAP HANA Architecture
+
-
SAP HANA Studio
+
-
Reporting in HANA
+
-
SAP HANA Text analysis
+
-
SAP BW on HANA
+
-
Miscellaneous
Grant SELECT privilege TO _SYS_REPO - Why?


If objects (tables/views) of a schema (say SCHEMA_ABC) are used to build modeling views then it’s necessary to grant _SYS_REPO the SELECT WITH GRANT privilege on this schema.

The following SQL statement must be executed before activating any such modeling views.
GRANT SELECT ON SCHEMA SCHEMA_ABC TO _SYS_REPO WITH GRANT OPTION


If you miss this step, an error will occur when you activate your views later.

Explanation: The activation of modeling views are done in the name of user _SYS_REPO.
Think of _SYS_REPO as "the activation guy". It takes your models and creates the necessary runtime objects from them. Therefore user _SYS_REPO needs the allowance to select YOUR tables/views. (If _SYS_REPO user cannot select on the tables specified in the from-clause of the view-definition, it cannot define that view)

If other users need to select this view (obviously this is always the case, otherwise the views would not make sense), then _SYS_REPO needs to have the additional allowance to grant the select further (WITH GRANT OPTION).

Therefore after having activated all your models that access data in your schemas, _SYS_REPO wants to give you (and probably other users) read access to the activated models.
If NO object of the schema will be used for modeling views, then you do not need to grant select on that schema to _SYS_REPO.

If you replicate data automatically, using SAP LTR Server, this command is executed automatically in the background while creating a new schema.


Support us by sharing this article.



Explore More
Close X
Close X

8 thoughts on “GRANT SELECT ON SCHEMA TO _SYS_REPO WITH GRANT OPTION

  1. Mr M says:

    Hi,

    I am using HANA Trial cloud, for creation of schema or anything it is shwoing doesnt have privilages.

    So could you please help me?

    Regards,
    Mr M

  2. dexter says:

    Hi,

    even with the default schema i still get the below error.

    Could not execute ‘GRANT SELECT ON SCHEMA “NEO_4XYC9VN2Z3HVCPKYPOPKLM17W” TO _SYS_REPO WITH GRANT OPTION’
    SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

    • Admin says:

      Hi Dexter,
      You probably do not have privilege on the schema NEO_4XYC9VN2Z3HVCPKYPOPKLM17W. Could you please try to call the HCP”.”HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS” from HANA Studio.

      Regards,
      SAP HANA Tutorial Team

  3. Jay Malla says:

    I am having the same issue. I am trying to run the command on the new schema as the SYSTEM user that I created and then assign this to a new user.

    • Admin says:

      Hi Jay,
      Could you please provide some more information.
      1 – Is the HANA system is from HCP trial account or stand alone HANA system?
      2 – Which user was used while creating the new schema? If you have created the schema using SYSTEM user, then I believe running the GRANT query should not give any issue.

      You may also check if the current user (which is being used to run GRANT query) has privilege on the schema or not.

      Regards,
      SAPHANATutorial.com Team

    • Jay Malla says:

      If I create another schema using the SYSTEM user and then add the permissions on another DB user to work on that schema it works.

  4. Márcio says:

    Hi,
    I’m trying to follow the SAP Hana Basic Course on step 4.6, but, I’m getting the following error message while opening the “Content” folder:

    Insufficient privilege (EXECUTE on REPOSITORY_REST)

    Could you please advise?

    If I try to call the “call “HCP”.”HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS”;” command, I get the following error:

    Could not execute ‘call “HCP”.”HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS”‘
    SAP DBTech JDBC: [328]: invalid name of function or procedure: HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS: line 1 col 12 (at pos 11)

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Current day month ye@r *

 © 2017 : saphanatutorial.com, All rights reserved.  Privacy Policy