cancel
Showing results for 
Search instead for 
Did you mean: 

Privilege SELECT on P_USERS_ (SYS)

Former Member
0 Kudos

Hi experts!

I need get data from SYS.P_USERS_ table with limited user.

What I did:

Logon in system as SYSTEM user and created user TEST1 with System Privileges CATALOG READ.

Logon in system as TEST1 user and input SQL query:

SELECT NAME from SYS.P_USERS_

Get error:

Could not execute 'SELECT NAME from SYS.P_USERS_' in 2 ms 24 µs .

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized


Ok, go to TEST1 user properties as SYSTEM user and trying add SELECT privileges for 'P_USERS_ (SYS)'.

Get error:


Could not modify user 'TEST1'. Could not grant privilege SELECT on P_USERS_ (SYS) You are not authorized to perform the required actions


QUESTION!

How I can get data from SYS.P_USERS_ table with limited user TEST1 ????


UPD:

As an experiment, I added ALL system privileges to user TEST1

but this also did not remedy the situation.


Message was edited by: Tom Flanagan

Accepted Solutions (1)

Accepted Solutions (1)

srinivasan_vinayagam
Active Contributor
0 Kudos

Hi Kirisetti,

Try to give permission as below

grant select on schema <SCHEMA> to _SYS_REPO with grant option;

grant select on schema <SCHEMA> to <USER>;


Regards,

V Srinivasan

Former Member
0 Kudos

does not work:

Could not execute 'grant select on schema SYS to _SYS_REPO with grant option' in 1 ms 500 µs .

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

Could not execute 'grant select on schema SYS to TEST1' in 1 ms 736 µs .

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

--------------------------------------

Gets an unusual task: to give rights to a scheme SYS but with SYSTEM user

lbreddemann
Active Contributor
0 Kudos

The reason for the error code you get is: SYS.P_USERS_ really is not for you.

It's a private system table.

You can access the data via the public view USERS.

Just run

SELECT <xyz> FROM users;

and you should get the data you need.

Generally you can consider anything in the SYS schema to be taboo for direct access.

Former Member
0 Kudos

Ok, I realized


P.S. it is permissible to use only the system privilege CATALOG READ


Tnx so much, Lars

Answers (0)