亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

CDB與PDB的連接

發布時間:2020-07-21 12:40:39 來源:網絡 閱讀:1279 作者:whshurk 欄目:關系型數據庫

1.連接
sqlplus system/xxxxx@10.8.5.206:1521/pdbtest
ALTER SESSION SET CONTAINER = PDB$SEED;
2.再CDB中切換連接
C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on 星期五 12月 15 09:33:39 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.

連接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show con_name
CON_NAME

CDB$ROOT
SQL> select name from v$pdbs;
NAME

PDB$SEED
PDBTEST
CLONEPDB_PLUG
SQL> alter session set container=PDBTEST;

會話已更改。
SQL> select name from v$pdbs;

NAME
-------------------------------------------------------------------------------- PDBTEST

SQL> show con_name

CON_NAME

PDBTEST
SQL> alter session set container=CLONEPDB_PLUG;

會話已更改。

SQL> show con_name

CON_NAME
------------------------------ CLONEPDB_PLUG
3.CDB實例關閉與啟動
3.1關閉
C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on 星期五 12月 15 09:40:41 2017

Copyright (c) 1982, 2016, Oracle. All rights reserved.

連接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> shutdown immediate
數據庫已經關閉。
已經卸載數據庫
ORACLE 例程已經關閉。
3.2 啟動道nomount狀態
SQL> startup nomount ORACLE 例程已經啟動。

Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes Variable Size 704645496 bytes Database Buffers 2046820352 bytes Redo Buffers 7852032 bytes
SQL> set line 200
SQL> col con_id format A40
SQL> col name format A20
SQL> col open_mode format A20
SQL> select con_id,name,open_mode from v$pdbs;

未選定行
3.3打開到mount狀態
SQL> alter database mount;

數據庫已更改。

SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME                 OPEN_MODE                                                                               ---------- -------------------- --------------------

########## PDB$SEED MOUNTED
########## PDBTEST MOUNTED
########## CLONEPDB_PLUG MOUNTED
3.3打開數據庫
SQL> alter database open;

數據庫已更改。

SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME                 OPEN_MODE

########## PDB$SEED READ ONLY
########## PDBTEST MOUNTED
########## CLONEPDB_PLUG MOUNTED
4.PDB打開與關閉
4.1打開一個
SQL> alter pluggable database pdbtest open read write;

插接式數據庫已變更。

SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME                 OPEN_MODE

########## PDB$SEED READ ONLY
########## PDBTEST READ WRITE
########## CLONEPDB_PLUG MOUNTED
4.2關閉一個
5.SQL> alter pluggable database pdbtest close;

插接式數據庫已變更。

SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME                 OPEN_MODE

########## PDB$SEED READ ONLY
########## PDBTEST MOUNTED
########## CLONEPDB_PLUG MOUNTED
4.3全部打開/關閉
SQL> alter pluggable database all open read write;

插接式數據庫已變更。

SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME                 OPEN_MODE

########## PDB$SEED READ ONLY
########## PDBTEST READ WRITE
########## CLONEPDB_PLUG READ WRITE
SQL> alter pluggable database all close;

插接式數據庫已變更。

SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME                 OPEN_MODE

########## PDB$SEED READ ONLY
########## PDBTEST MOUNTED
########## CLONEPDB_PLUG MOUNTED
4.4排他打開
SQL> alter pluggable database all except PDBTEST open read write;

插接式數據庫已變更。

SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME                 OPEN_MODE

########## PDB$SEED READ ONLY
########## PDBTEST MOUNTED
########## CLONEPDB_PLUG READ WRITE
SQL> alter pluggable database all except PDBTEST close;

插接式數據庫已變更。

SQL> select con_id,name,open_mode from v$pdbs;
CON_ID NAME OPEN_MODE


########## PDB$SEED READ ONLY
########## PDBTEST MOUNTED
########## CLONEPDB_PLUG MOUNTED

5.改變PDB狀態
SQL> col con_id format 999999
SQL> col name format A20
SQL> col open_mode format A20
SQL> set line 100
SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME OPEN_MODE


  2 PDB$SEED             READ ONLY
  3 PDBTEST              MOUNTED
  4 CLONEPDB_PLUG        MOUNTED

SQL> alter pluggable database PDBTEST open restricted;
SQL> select con_id,name,open_mode from v$pdbs;

CON_ID NAME OPEN_MODE ------- -------------------- -------------------- 2 PDB$SEED READ ONLY 3 PDBTEST READ WRITE 4 CLONEPDB_PLUG MOUNTED
SQL> show pdbs

CON_ID CON_NAME                       OPEN MODE  RESTRICTED

     2 PDB$SEED                       READ ONLY  NO
     3 PDBTEST                        READ WRITE YES
     4 CLONEPDB_PLUG                  MOUNTED

SQL> alter pluggable database PDBTEST close;

插接式數據庫已變更。

SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED


     2 PDB$SEED                       READ ONLY  NO
     3 PDBTEST                        MOUNTED                                                                                4 CLONEPDB_PLUG                  MOUNTED
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

靖江市| 平遥县| 共和县| 衡山县| 辽源市| 屏南县| 出国| 徐水县| 石柱| 定州市| 儋州市| 南岸区| 南平市| 夏河县| 绵竹市| 柳河县| 蓬溪县| 浑源县| 镇巴县| 东山县| 广州市| 沙河市| 铜陵市| 日喀则市| 伊金霍洛旗| 阳山县| 吉木萨尔县| 云梦县| 长沙县| 龙里县| 澄城县| 苏尼特左旗| 胶州市| 湖北省| 荥经县| 临潭县| 广河县| 万源市| 东莞市| 鄂托克旗| 望奎县|