728x90
select * from dba_users; -- 계정확인
select * from dba_role_privs -- 롤 확인
where 1=1
;
select * from dba_role_privs where grantee = 'BBB'; -- 사용자에게 부여된 롤 확인
select * from dba_tab_privs -- 객체 권한이 주어졌는지 확인
where 1=1
and grantee = 'ROLE_TTT'
and owner = 'AAA';
SELECT * FROM dba_sys_privs; -- sys 권한 확인
SELECT * FROM dba_tab_privs WHERE table_name = 'TTTTT' -- 테이블 권한
;
-- role 부여 / 회수
GRANT ROLE_TTT TO PFMOWN;
REVOKE ROLE_TTT FROM pfmown;
-- 테이블 권한을 ROLE에 부여
GRANT SELECT, INSERT,DELETE,UPDATE ON TTT TO ROLE_TTT;
-- synonym(시노님) 권한 부여/회수
GRANT CREATE SYNONYM TO BBB; --ANY synonym은 grant create any synonym to apcon;
REVOKE CREATE SYNONYM from BBB;
728x90
'RDBMS > Oracle' 카테고리의 다른 글
SQLLDR/TBLOADER CTL file (0) | 2021.03.25 |
---|---|
Tablespace sql (0) | 2021.01.28 |
Unusable index (0) | 2021.01.28 |
RAC DB 시작/종료(startup/stop (0) | 2021.01.28 |
temp tablespace (0) | 2021.01.28 |