[23.02.02] 70일차 [데이터베이스]

W·2023년 2월 2일
0

국비

목록 보기
103/119

System 권한

사용자 생성

시스템 권한을 회수할 때의 cascade 효과 (WITH ADMIN OPTION)

SQL> conn sys/oracle as sysdba
SQL> GRANT create table 
 TO turner 
 WITH ADMIN OPTION;
SQL> conn turner/lover
SQL> CREATE TABLE turner_table (my_column number(20));
SQL> GRANT create table 
TO ford;
SQL> conn ford/henry
SQL> CREATE TABLE ford_table (my_column number(20));
SQL> conn sys/oracle as sysdba
SQL> REVOKE create table 
 FROM turner;
SQL> conn ford/henry
SQL> CREATE TABLE my_TABLE_2 (my_column number(20));


ford create 권한 회수안됨

Object 권한

객체 권한을 회수할 때의 cascade 효과 (WITH GRANT OPTION)

SQL> conn hr/hr
SQL> GRANT select ON employees 
 TO turner 
 WITH GRANT OPTION;
SQL> conn turner/lover
SQL> SELECT last_name, job_id
FROM hr.employees
WHERE employee_id=103;
SQL> GRANT select 
ON hr.employees 
TO ford;
SQL> conn ford/henry
SQL> SELECT last_name, job_id
 FROM hr.employees
 WHERE employee_id=103;
SQL> conn hr/hr
SQL> REVOKE select 
 ON employees 
 FROM turner;
SQL> conn ford/henry
SQL> SELECT last_name, job_id
FROM hr.employees
WHERE employee_id=103;

ford의 권한까지 회수됨

정리

0개의 댓글