Collections:
Show Privileges of the Current User in Oracle
How To Find Out What Privileges a User Currently Has in Oracle?
✍: 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".
⇒ Managing Oracle Database Tables
⇐ Privilege to Delete Rows in Another Schema in Oracle
2019-06-11, 4700🔥, 0💬
Popular Posts:
How To Use DATEADD() Function in SQL Server Transact-SQL? DATEADD() is a very useful function for ma...
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension...
Where to find SQL Server Transact-SQL language references? You can find SQL Server Transact-SQL lang...
What Is Program Global Area (PGA) in Oracle? A Program Global Area (PGA) is a memory buffer that is ...
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...