문제

I did a select * from session_privs to find out what privledges my current user had, and it gave me a list of create privledges, including create table.

However, I'm able to insert rows into the table. Why is insert not listed in session_privs?

도움이 되었습니까?

해결책

There's a difference between privileges (CREATE TABLE, CREATE PROCEDURE, CREATE ANY SEQUENCE, etc) and grants (grant select,insert,update on tab_a to user_b, etc).

SESSION_PRIVS will display the privileges that the current session has.

DBA_TAB_PRIVS will show you what grants a user has to what tables.

Hope that helps.

다른 팁

Check view USER_TAB_PRIVS_RECD or USER_TAB_PRIVS, there you see all privileges on tables, e.g.

SELECT * FROM USER_TAB_PRIVS_RECD WHERE PRIVILEGE = 'INSERT';

The name is a bit misleading, because it also shows grants on other objects, e.g. GRANT EXECUTE ON <procedure_name>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top