Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle user privileges

-- List privileges, including roles, for my_user
SELECT GRANTEE, PRIVILEGE AS PRIVILEGE_ROLE,
       NULL AS OWNER, NULL AS TABLE_NAME, NULL AS COLUMN_NAME,
       ADMIN_OPTION AS PRIVILEGE, 
       NULL AS GRANTABLE
FROM DBA_SYS_PRIVS WHERE GRANTEE = 'my_user'
UNION ALL
SELECT r.GRANTEE, r.GRANTED_ROLE AS PRIVILEGE_ROLE, p.OWNER, p.TABLE_NAME, 
	p.COLUMN_NAME, PRIVILEGE, p.GRANTABLE
FROM DBA_ROLE_PRIVS r LEFT JOIN ROLE_TAB_PRIVS p ON p.ROLE = r.GRANTED_ROLE
WHERE r.GRANTEE = 'my_user';
Comment

oracle privileges users

SELECT USERNAME,
       LOCK_DATE,
       EXPIRY_DATE
FROM DBA_USERS
WHERE USERNAME IN (SELECT GRANTEE
                   FROM DBA_SYS_PRIVS
                   WHERE PRIVILEGE = 'UNLIMITED TABLESPACE')
ORDER BY USERNAME;
Comment

PREVIOUS NEXT
Code Example
Sql :: update row in mysql 
Sql :: using distinct count in sqlite3 
Sql :: sql server date now 
Sql :: oracle asynchronous procedure 
Sql :: update query formula in excel 
Sql :: oracle tablespace datafile max size 
Sql :: install mysql 8 linux 
Sql :: mysql data types 
Sql :: sql auto timestamp 
Sql :: org.h2.jdbc.JdbcSQLSyntaxErrorException 
Sql :: mysql check db size 
Sql :: How to reset forgotten postgresql password 
Sql :: oracle limit rows 
Sql :: join to find results not in another table 
Sql :: docker mysql random root password 
Sql :: sql create table primary key autoincrement 
Sql :: buscar nombre de columna en todas las tablas sql server 
Sql :: postgresql list users 
Sql :: postgresql get last 10 records 
Sql :: media sql 
Sql :: select table column name in sql 
Sql :: get only structure database mysql 
Sql :: postgres type cast to string 
Sql :: join update query in sql 
Sql :: sql get last id 
Sql :: mysql extract month from date 
Sql :: how to rename a database in tsql 
Sql :: get all tables using like 
Sql :: command line mysql xampp 
Sql :: How to check event scheduler status mysql 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =