[20181018]12c Pluggable Database save state.txt
[20181018]12c Pluggable Database save state.txt
--//我最早使用版本12.1.0.1不支援這個特性,每次open cdb後,都要手工執行:
# ALTER PLUGGABLE DATABASE ALL OPEN;
--//現在使用的版本12.2.0.1支援這個特性,簡單測試看看:
1.環境:
SCOTT@test01p> @ ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.2.0.1.0 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0
SYS@test> startup
ORACLE instance started.
Total System Global Area 805306368 bytes
Fixed Size 8924064 bytes
Variable Size 297796704 bytes
Database Buffers 490733568 bytes
Redo Buffers 7852032 bytes
Database mounted.
Database opened.
SYS@test> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
------ -------- ---------- ----------
2 PDB$SEED READ ONLY NO
3 TEST01P MOUNTED
SYS@test> alter pluggable database test01p SAVE STATE;
Pluggable database altered.
SYS@test> SELECT * FROM DBA_PDB_SAVED_STATES;
no rows selected
--//沒有開啟pdb,沒用.
--//# ALTER PLUGGABLE DATABASE ALL OPEN;
SYS@test> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
------ -------- ---------- ----------
2 PDB$SEED READ ONLY NO
3 TEST01P READ WRITE NO
2.現在可以儲存當前狀態,下次啟動cdb時自動啟動:
SYS@test> alter pluggable database test01p SAVE STATE;
Pluggable database altered.
--//如果rac環境,加入INSTANCES=ALL;例子:
--// ALTER PLUGGABLE DATABASE test03p SAVE STATE INSTANCES=ALL;
3.檢視DBA_PDB_SAVED_STATES檢視記錄了save states:
SYS@test> SELECT * FROM DBA_PDB_SAVED_STATES;
CON_ID CON_NAME INSTANCE_NAME CON_UID GUID STATE RES
---------- -------------------- -------------------- ---------- -------------------------------- -------------------- ---
3 TEST01P test 2923790755 C287357CE3D5470AA01668B945336F73 OPEN NO
--//關閉資料庫,測試看看:
SYS@test> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@test> startup
ORACLE instance started.
Total System Global Area 805306368 bytes
Fixed Size 8924064 bytes
Variable Size 297796704 bytes
Database Buffers 490733568 bytes
Redo Buffers 7852032 bytes
Database mounted.
Database opened.
SYS@test> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
------ -------- ---------- ----------
2 PDB$SEED READ ONLY NO
3 TEST01P READ WRITE NO
--//當然你可以移除:
SYS@test> SELECT * FROM DBA_PDB_SAVED_STATES;
CON_ID CON_NAME INSTANCE_NAME CON_UID GUID STATE RES
---------- -------------------- -------------------- ---------- -------------------------------- -------------------- ---
3 TEST01P test 2923790755 C287357CE3D5470AA01668B945336F73 OPEN NO
SYS@test> alter pluggable database test01p discard state;
Pluggable database altered.
SYS@test> SELECT * FROM DBA_PDB_SAVED_STATES;
no rows selected
--//也可以執行如下儲存全部PDBs的SAVE STATE:
--//alter pluggable database all save state;
--//After that all PDBs will stay UP when the container started.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2216854/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12C pluggable database自啟動OracleDatabase
- 小丸子學Oracle 12c系列之——Oracle Pluggable DatabaseOracleDatabase
- [20181018]Oracle Database 12c: Data Redaction.txtOracleDatabase
- clone oracle 12c pluggable databasesOracleDatabase
- 12c-RECOVER PLUGGABLE DATABASEDatabase
- 【PDB】Oracle 建立pdb說明(create pluggable database)OracleDatabase
- 12C-ORA-65086: cannot open/close the pluggable databaseDatabase
- 12c in-database archiveDatabaseHive
- 12c EM Database ExpressDatabaseExpress
- 【新炬網路名師大講堂】clone oracle 12c pluggable databasesOracleDatabase
- Oracle Database 12C New FeatureOracleDatabase
- Connecting To 12CR2 RAC Pluggable Database With ORA-1033Database
- ORA-65122: Pluggable database GUID conflicts with the GUID of an existingDatabaseGUI
- oracle12c新特點之可插拔資料庫(Pluggable Database,PDB)Oracle資料庫Database
- [20181011]ORA-65086 cannot openclose the pluggable database.txtDatabase
- 解析Oracle Database Concepts 12c(4)OracleDatabase
- 解析Oracle Database Concepts 12c(2)OracleDatabase
- 解析Oracle Database Concepts 12c(1)OracleDatabase
- 【OH】Deprecated and Desupported Features for Oracle Database 12cOracleDatabase
- 12c multitenant database 的使用者管理NaNDatabase
- 解析Oracle Database Concepts 12c(5)OracleDatabase
- 解析Oracle Database Concepts 12c(3)OracleDatabase
- Oracle 12c Enterprise Manager Database ExpressOracleDatabaseExpress
- Oracle Database 12c十二大新特性OracleDatabase
- Seed Database (pdb$seed) - Read Write OR Read Only Mode in Oracle Database 12cDatabaseOracle
- npm install -save 和 -save-devNPMdev
- npm –save-dev –save 的區別NPMdev
- Oracle Database 12c新特性 In-Database Archiving資料庫內歸檔OracleDatabase資料庫
- Oracle 12c RMAN Duplicating a Subset of the Source Database TablespacesOracleDatabase
- Oracle Database 12c可插拔資料庫案例OracleDatabase資料庫
- canvas save()Canvas
- [20181011]ORA-44777 – Pluggable database service cannot be started.txtDatabase
- Oracle 12C Database File Mapping for Oracle ASM FilesOracleDatabaseAPPASM
- Oracle 12C Transport a Database to a Different Platform Using Backup SetsOracleDatabasePlatform
- ENTERPRISE MANAGER 12C DATABASE AS A SERVICE (DBaaS) SNAP CLONEDatabase
- save() create()區別
- canvas save()和restore()CanvasREST
- save download pdf