Click to See Complete Forum and Search --> : System Privileges...


arumugam
10-18-2000, 11:11 AM
Hi Gurus,

What is the difference between the views DBA_SYS_PRIVS and SESSION_PRIVS ?

Can you give an example?

Thanks a lot.

brhynold
10-18-2000, 11:38 AM
DBA_SYS_PRIVS contains all system privileges held by all users or roles.

SESSION_PRIVS displays all system privileges that user has for that session whether it is from a role or from a direct grant

Ex: Say your username is USER amd you have access to a role called ROLE and it contains CREATE SESSION, CREATE USER, CREATE TABLE, CREATE INDEX. If you do a select on SESSION_PRIVS you will get a list of these privileges.

But if you do a select on DBA_SYS_PRIVS you will not see USER as having access to these privileges but you will see ROLE as having access to them

Basicaly SESSION_PRIVS is used to see what privileges you have been granted whether it be directly or by a role, and DBA_SYS_PRIVS shows all privileges granted and to what user or role

Hope Ididn't ramble too bad and this helps you out

arumugam
10-18-2000, 03:28 PM
Thanks brhynold,

That was good one.

I wanted to share with guys that I passed the first 8i OCP exam (Architecture amnd administration).

I Prepared with STS and Cramsession. They were reaally useful.