Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top