일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- hyperledger
- JVM
- dynamic query
- SQL
- MongoDB
- 문법 정리
- gradle
- 파이썬 소스
- 운영체제
- 파이썬
- auto configure
- 백준 알고리즘
- 자바 프로젝트
- spring
- 학점
- 자바
- K6
- smart cast
- c#
- 알고리즘
- 프로젝트
- resilience4j
- oracle
- 티스토리
- 오라클
- 오라클 디비
- 초대장
- 리눅스
- 유사코드
- jsp
- Today
- Total
모종닷컴
Oracle 문법 정리 - 유저 엑세스 제어 본문
◆유저 액세스 제어
1.유저 생성(sys 계정으로 접속)
Create user demo identified by demo; |
2.권한 부여
grant create session , create table , create sequence ,create view to demo; |
권한 부여를 할 때 매번 위와 같이 작성하는 것에 한계를 느낌
3.롤 생성
create role manager; |
4.생성 롤에 권한 부여
grant create table, create view to manager; |
5.테스트
create user alice identified by alice;
grant manager to alice; |
6.암호 변경
Alter user demo identified by employ; |
7.객체 권한(n1으로 접속)
grant select on employees to demo; -- demo계정에게 자신의 employees테이블 select의 권한을 줌
grant update (department_name,location_id) on departments to demo,manager; -- demo계정과 manager(role)에게 department_id와location_id를 update할 수 있는 권한 부여 |
8.권한 전달 : 시스템의 모든 유저가 권한을 받도록 설정(alice 계정)
Grant select on departments to pulbic; |
9.sys의 grant 권한 주기
grant select, insert on departments to demo with grant option; -- 이 부분을 입력해주면 demo는 sys의 grant권한을 가지게 된다. -- demo계정은 다음이 가능해 진다. grant select on alice.departments to public; -- alice의 departments select의 권한을 demo가 모두에게 뿌린다. |
'Programming > 데이터베이스' 카테고리의 다른 글
Transaction Isolation Level (0) | 2018.11.08 |
---|---|
오라클xe 부팅시 자동실행 끄기 (0) | 2018.07.16 |
Oracle 문법 정리 - 스키마 객체 (0) | 2018.01.22 |
Oracle 문법 정리 - 시퀀스, 뷰 (0) | 2018.01.09 |
Oracle 문법 정리 - DDL (0) | 2018.01.08 |