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資料庫
- Azure Terraform(四)狀態檔案儲存ORM
- Oracle 19c 利用觸發器在資料庫啟動後自動開啟 PDBOracle觸發器資料庫
- OpenHarmony頁面級UI狀態儲存:LocalStorageUI
- iOS UI狀態儲存和恢復(三)iOSUI
- iNeuOS工業網際網路作業系統,釋出實時儲存方式:實時儲存、變化儲存、定時儲存,增加裝置振動狀態和電能狀態監測驅動,v3.6.2作業系統
- 國產儲存晶片現狀如何?晶片
- 利用Dectorator分模組儲存Vuex狀態(上)Vue
- 利用Dectorator分模組儲存Vuex狀態(下)Vue
- Android Activity 重建之狀態儲存與恢復Android
- 分散式儲存Ceph之PG狀態詳解分散式
- 動態表單儲存設計
- 儲存過程vs.動態SQL:如何選用?PV儲存過程SQL
- oracle 19c pdb遷移Oracle
- 海量資料儲存之動態SchemaOU
- 如何在Spring Data MongoDB 中儲存和查詢動態欄位SpringMongoDB
- oracle 19c CDB vs pdb 建立Oracle
- k8s動態儲存篇--NFSK8SNFS
- 物件和函式的區別就是物件可以儲存狀態物件函式
- 如何讓Notepad++自動儲存
- Win10 20H1新增功能,登出時可以自動儲存應用狀態Win10
- React-Keeper 前端路由快取 儲存狀態(大部分轉)React前端路由快取
- 【Flutter 知識集錦】從 restorationId 來說臨時狀態儲存FlutterREST
- PL/SQL中動態掉用儲存過程SQL儲存過程
- kali linux如何開啟電源狀態通知Linux
- wps自動儲存時間設定在哪裡 WPS如何設定自動儲存
- 固態硬碟儲存原理硬碟
- 如何選擇移動儲存裝置
- 如何啟用或禁用最佳化Mac儲存Mac
- Kubernetes怎麼進行NFS動態儲存遷移NFS
- MySQL儲存過程裡動態SQL的使用UXMySql儲存過程UX
- oracle 12c PDB隨CDB啟動和連結PDB的方式Oracle
- 利用結構體儲存實體狀態——2024TapTap聚光燈GameJam(二)結構體APTGAM
- 主表子表動態欄位儲存實現方式總結
- 如何週期性地統計近萬臺裝置的實時狀態?Redis時間序列儲存方案Redis