Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How To Find Out What Privileges a User Currently Has
How To Find Out What Privileges a User Currently Has? - Oracle DBA FAQ - Managing Oracle User Accounts, Schema and Privileges
✍: FYIcenter.com
Privileges granted to users are listed in two system views: DBA_SYS_PRIVS, and USER_SYS_PRIVS. You can find out what privileges a user currently has by running a query on those views as shown in the tutorial exercise below:
>.\bin\sqlplus /nolog SQL> CONNECT DEV/developer SQL> SELECT username, privilege FROM USER_SYS_PRIVS; USERNAME PRIVILEGE ------------------------------ ---------------------- DEV SELECT ANY TABLE DEV INSERT ANY TABLE DEV CREATE SESSION DEV CREATE VIEW DEV DELETE ANY TABLE DEV CREATE ANY TABLE SQL> disconnect SQL> connect SYSTEM/fyicenter SQL> GRANT DELETE ANY TABLE TO dev; Grant succeeded. SQL> SELECT GRANTEE, PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE = 'HR'; GRANTEE PRIVILEGE ------------------------------ ----------------------- HR CREATE VIEW HR UNLIMITED TABLESPACE HR DEBUG CONNECT SESSION HR CREATE DATABASE LINK HR CREATE SEQUENCE HR CREATE SESSION HR DEBUG ANY PROCEDURE HR ALTER SESSION HR CREATE SYNONYM
Looks like "hr" has move privileges than "dev".
2007-05-01, 5286👍, 0💬
Popular Posts:
What is the difference between "calloc(...)" and "malloc(...)"? 1. calloc(...) allocates a block of ...
How To Decrement Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a...
How To Decrement Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a...
What are the different storage classes in C? C has three types of storage: automatic, static and all...
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able...