19c pdb如何儲存啟動狀態
我們要儲存pdb狀態,首先要了解檢視DBA_PDB_SAVED_STATES顯示了當前CDB中儲存的pdb狀態資訊。
This view is a data link, so the data is also available within the PDB.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
The ID of the PDB |
|
|
|
Name of the PDB |
|
|
|
Name of the instance for which the state is saved |
|
|
|
Unique ID assigned to the PDB at creation time |
|
|
Globally unique immutable ID assigned to the PDB at creation time | |
|
|
Open state of the PDB | |
|
|
Restricted mode of the PDB |
預設情況,啟停CDB,觀察pdb狀態
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 READ WRITE NO 4 PDB2 MOUNTED 5 PDB3 MOUNTED
SQL> alter pluggable database all open; Pluggable database altered.
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 READ WRITE NO 4 PDB2 READ WRITE NO 5 PDB3 READ WRITE NO
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 2348810240 bytes
Fixed Size 8795376 bytes
Variable Size 855640848 bytes
Database Buffers 1476395008 bytes
Redo Buffers 7979008 bytes
Database mounted.
Database opened.
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED 5 PDB3 MOUNTED
那如果我們想讓pdb3在cdb啟動後就是open狀態,需要如何設定?
首先檢視DBA_PDB_SAVED_STATES
SQL> select * from dba_pdb_saved_states; no rows selected
單獨開啟pdb3
SQL> alter pluggable database pdb3 open; Pluggable database altered.
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED 5 PDB3 READ WRITE NO
接著儲存pdb3啟動狀態
SQL> alter pluggable database pdb3 save state; Pluggable database altered.
SQL> select * from dba_pdb_saved_states; CON_ID----------CON_NAME--------------------------------------------------------------------------------INSTANCE_NAME-------------------------------------------------------------------------------- CON_UID GUID STATE RES---------- -------------------------------- -------------- --- 5PDB3orcl11117920907 921B7939BC8C217CE053DDF0A8C04389 OPEN NO
重啟cdb驗證:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 2348810240 bytes
Fixed Size 8795376 bytes
Variable Size 855640848 bytes
Database Buffers 1476395008 bytes
Redo Buffers 7979008 bytes
Database mounted.
Database opened.
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED 5 PDB3 READ WRITE NO
參考文件:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23825935/viewspace-2747139/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 自動儲存、靜態儲存和動態儲存
- Amazon EKS 上有狀態服務啟用儲存加密加密
- 使用NAS動態儲存卷建立有狀態應用
- canvas 儲存與還原狀態Canvas
- 【PDB】Oracle資料庫如何檢查和設定pdb最大儲存大小Oracle資料庫
- Oracle 19c 利用觸發器在資料庫啟動後自動開啟 PDBOracle觸發器資料庫
- 國產儲存晶片現狀如何?晶片
- Azure Terraform(四)狀態檔案儲存ORM
- Android 元件系列-----Activity儲存狀態Android元件
- Oracle12c多租戶如何啟動關閉CDB或PDB (PDB自動啟動)Oracle
- 動態儲存過程儲存過程
- 利用Dectorator分模組儲存Vuex狀態(下)Vue
- iOS UI狀態儲存和恢復(三)iOSUI
- 利用Dectorator分模組儲存Vuex狀態(上)Vue
- OpenHarmony頁面級UI狀態儲存:LocalStorageUI
- Android中正確儲存view的狀態AndroidView
- iNeuOS工業網際網路作業系統,釋出實時儲存方式:實時儲存、變化儲存、定時儲存,增加裝置振動狀態和電能狀態監測驅動,v3.6.2作業系統
- 分散式儲存Ceph之PG狀態詳解分散式
- oracle 19c pdb遷移Oracle
- 動態表單儲存設計
- 動態呼叫儲存過程 sample:儲存過程
- 儲存過程vs.動態SQL:如何選用?PV儲存過程SQL
- windows 下 asm儲存啟動故障WindowsASM
- 使用history儲存列表頁ajax請求的狀態
- jQuery 操作checkbox翻頁儲存選中狀態jQuery
- cookie儲存使用者狀態 無session系統CookieSession
- 零程式碼儲存視窗執行狀態 (轉)
- Android Activity 重建之狀態儲存與恢復Android
- 關於有狀態BEAN如何透過關鍵字儲存使用者狀態的問題,請幫忙Bean
- oracle 19c CDB vs pdb 建立Oracle
- 海量資料儲存之動態SchemaOU
- oracle動態sql儲存過程示例OracleSQL儲存過程
- /*動態執行儲存過程DEMO*/儲存過程
- 用儲存過程動態建立表儲存過程
- 資料庫啟動的不同狀態資料庫
- MYSQL innodb buffer 狀態資料的儲存和載入MySql
- 儲存NETAPP處於takeover狀態解決方法。APP
- Activity 知識梳理(3) Activity狀態儲存和恢復