on 11-25-2014 4:56 PM
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
How I can get data from SYS.P_USERS_ table with limited user TEST1 ????
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
--------------------------------------
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.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.