Thứ Hai, 30 tháng 11, 2020

Quản lý Role trong Oracle Database

ĐN: là nhóm quyền (privilege)


DBA_ROLES DS role                            
DBA_ROLE_PRIVS - Role gán cho user
USER_ROLE_PRIVS  - Role gán cho user hiện tại
ROLE_SYS_PRIVS - DS system privileges of roles

 
ROLE: PRIVILEGES:
CONNECT ALTER SESSION
CREATE CLUSTER 
CREATE DATABASE LINK
CREATE SEQUENCE
CREATE SESSION
CREATE SYNONYM
CREATE TABLE
CREATE VIEW
RESOURCE CREATE CLUSTER
CREATE PROCEDURE
CREATE SEQUENCE
CREATE TABLE
CREATE TRIGGER
DBA ALL PRIVILEGES WITH ADMIN OPTION
(allows grants to other users or roles)
EXP_FULL_DATABASE SELECT ANY TABLE, BACKUP ANY TABLE.
INSERT, DELETE, and UPDATE on the tables
SYS.INCVID, SYS.INCFIL, and SYS.INCEXP
IMP_FULL_DATABASE BECOME USER 
WRITEDOWN (trusted Oracle only)
• Select * from dba_roles;   // list all role
• SELECT * FROM SESSION_ROLES;   //Listing the Current Privilege Domain of Your Session
• Select * from DBA_ROLE_PRIVS; // Listing All Role Grants for User// 33 rows
• select * from USER_ROLE_PRIVS;   // role đã gán cho user hiện tại
•  select * from ROLE_ROLE_PRIVS

CREATE ROLE
CREATE ROLE dw_manager;
CREATE ROLE dw_manager IDENTIFIED BY warehouse; 
ALTER ROLE
• Changing Role Identification: 
ALTER ROLE warehouse_user NOT IDENTIFIED;
• Changing a Role Password
ALTER ROLE dw_manager IDENTIFIED BY data; 
• Application Roles:
ALTER ROLE dw_manager IDENTIFIED USING hr.admin;
DROP ROLE
DROP ROLE dw_manager; 
SET ROLE
• Setting Roles: 
To enable the role dw_manager identified by the password warehouse for your current session, issue the following statement:
SET ROLE dw_manager IDENTIFIED BY warehouse; 
• To enable all roles granted to you for the current session, issue the following statement:
SET ROLE ALL; 
• To enable all roles granted to you except dw_manager, issue the following statement:
SET ROLE ALL EXCEPT dw_manager;
• To disable all roles granted to you for the current session, issue the following statement:
SET ROLE NONE; 

KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH: 📧 Mail: binhoracle@gmail.com ☎️ Mobile: 0902912888 ⚡️ Skype: tranbinh48ca 👨 Facebook: https://www.facebook.com/BinhOracleMaster 👨 Inbox Messenger: https://m.me/101036604657441 (profile) 👨 Fanpage: https://www.facebook.com/tranvanbinh.vn 👨 Inbox Fanpage: https://m.me/tranvanbinh.vn 👨👩 Group FB: https://www.facebook.com/groups/OracleDBAVietNam 👨 Website: http://www.tranvanbinh.vn 👨 Blogger: https://tranvanbinhmaster.blogspot.com 🎬 Youtube: http://bit.ly/ytb_binhoraclemaster 👨 Tiktok: https://www.tiktok.com/@binhoraclemaster?lang=vi 👨 Linkin: https://www.linkedin.com/in/binhoracle 👨 Twitter: https://twitter.com/binhoracle 👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội #OracleTutorial #OracleDBA #OracleDatabaseAdministration #học oracle database #oca #ocp #oce #ocm

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master