본문 바로가기

DBMS/ORACLE

[ORACLE] Pluggable Database 관리

반응형

개요

pluggable 데이터베이스 관리

구성환경

oacle 19.3 / CentOS 7.6

 

1. Container DB 모드 확인 방법

SQL> select cdb from v$database ;

CDB
---
YES

SQL>

 

2. PDB 상태 조회

SQL> SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM V$PDBS;

NAME            OPEN_MODE  RES OPEN_TIME
--------------- ---------- --- ----------------------------------------
PDB$SEED        READ ONLY  NO  20/01/20 22:42:46.047 +09:00
ORCLPDB         MOUNTED

SQL>

 OR

SQL> show pdbs ;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        MOUNTED
SQL>

 

3. PDB 기동 종료

 3.1 PDB 기동(Read, Write 모드)

 Syntax) alter pluggable database pdb_name open READ,WRITE [RESTRICTED] [FORCE];

SQL> alter pluggable database ORCLPDB open READ WRITE ;

플러그인할 수 있는 데이터베이스가 변경되었습니다.

SQL> SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM V$PDBS;

NAME            OPEN_MODE  RES OPEN_TIME
--------------- ---------- --- ----------------------------------------
PDB$SEED        READ ONLY  NO  20/01/20 22:42:46.047 +09:00
ORCLPDB         READ WRITE NO  20/01/20 22:56:54.397 +09:00

SQL>

 3.2 PDB 기동 (Read Only)

 Syntax) alter pluggable database pdb_name open READ ONLY [RESTRICTED] [FORCE];

SQL>  alter  pluggable  database ORCLPDB  open  READ  ONLY ;

플러그인할 수 있는 데이터베이스가 변경되었습니다.

SQL> SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM V$PDBS;

NAME            OPEN_MODE  RES OPEN_TIME
--------------- ---------- --- ----------------------------------------
PDB$SEED        READ ONLY  NO  20/01/20 22:42:46.047 +09:00
ORCLPDB         READ ONLY  NO  20/01/20 23:02:06.055 +09:00

SQL>

 3.3 PDB 종료

 Syntax) alter pluggable database pdb_name close [IMMEDIATE] ;

SQL> alter pluggable database ORCLPDB close ;

플러그인할 수 있는 데이터베이스가 변경되었습니다.

SQL>  SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM V$PDBS;

NAME            OPEN_MODE  RES OPEN_TIME
--------------- ---------- --- ----------------------------------------
PDB$SEED        READ ONLY  NO  20/01/20 22:42:46.047 +09:00
ORCLPDB         MOUNTED        20/01/20 22:55:39.215 +09:00

SQL>

 

반응형

'DBMS > ORACLE' 카테고리의 다른 글

[ORACLE] Common 사용자  (0) 2020.01.21
[ORACLE] Pluggable Database 생성/삭제  (0) 2020.01.20
ORACLE 19C Silent Mode 설치  (2) 2019.12.21
ORACLE 19C 완전 삭제  (0) 2019.12.20
ORACLE 19C 설치 - 리눅스  (10) 2019.12.19