Monday, July 6, 2009

V$ENABLEDPRIVS

V$ENABLEDPRIVS displays which privileges are enabled. These privileges can be found in the table SYSTEM_PRIVILEGE_MAP.

Column

Datatype

Description

PRIV_NUMBER

NUMBER

Numeric identifier of enabled privileges

Note:

1. See also SYSTEM-PRIVILEGE_MAP.

2. SESSION_PRIVS also describes the privileges that are currently available to the user, and gives privilege names.

SQL> SELECT * FROM SESSION_PRIVS;

PRIVILEGE

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

ALTER SYSTEM

AUDIT SYSTEM

CREATE SESSION

ALTER SESSION

RESTRICTED SESSION

CREATE TABLESPACE

ALTER TABLESPACE

MANAGE TABLESPACE

DROP TABLESPACE

UNLIMITED TABLESPACE

CREATE USER

……

161 rows selected.

3. List the privileges enabled for the current session

SQL> SELECT A.PRIV_NUMBER, B.NAME

2 FROM V$ENABLEDPRIVS A, SYSTEM_PRIVILEGE_MAP B

3 WHERE A.PRIV_NUMBER = B.PRIVILEGE;

PRIV_NUMBER NAME

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

-3 ALTER SYSTEM

-4 AUDIT SYSTEM

-5 CREATE SESSION

-6 ALTER SESSION

-7 RESTRICTED SESSION

-10 CREATE TABLESPACE

-11 ALTER TABLESPACE

-12 MANAGE TABLESPACE

-13 DROP TABLESPACE

-15 UNLIMITED TABLESPACE

-20 CREATE USER

……

161 rows selected.

Oracle data dictionary views

Oracle dynamic performance views

Last updated: July 6, 2009

No comments:

Post a Comment