[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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20181018]Oracle Database 12c: Data Redaction.txtOracleDatabase
- ORA-65122: Pluggable database GUID conflicts with the GUID of an existingDatabaseGUI
- 【PDB】Oracle 建立pdb說明(create pluggable database)OracleDatabase
- [20181011]ORA-65086 cannot openclose the pluggable database.txtDatabase
- [20181011]ORA-44777 – Pluggable database service cannot be started.txtDatabase
- [20181009]12C FULL DATABASE CACHING.txtDatabase
- Oracle 12C Database File Mapping for Oracle ASM FilesOracleDatabaseAPPASM
- ORACLE-1Z0-060題庫(Upgrade to Oracle Database 12c)OracleDatabase
- 嚐鮮Oracle Database 12c的十二大新特性VKOracleDatabase
- npm install -save 和 -save-devNPMdev
- Oracle Database 12c RAC損壞ocr和votedisk恢復實驗OracleDatabase
- Oracle 12c DG備庫啟動報錯standby database requires recoveryOracleDatabaseUI
- npm –save-dev –save 的區別NPMdev
- canvas save()Canvas
- Save Water
- save download pdf
- Unable to save settings: Failed to save settings. Please restart PyCharm解決AIRESTPyCharm
- canvas save()和restore()CanvasREST
- docker tag save loadDocker
- save() create()區別
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST
- F. Magic Will Save the World
- Oracle Database Cloud - Database as a Service Quick StartOracleDatabaseCloudUI
- Error querying database. XXXXXXXXXXXXX, No database selected。ErrorDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- 【Lintcode】1601. Boats to Save People
- Database TimeoutDatabase
- Database OverallDatabase
- database no shardingDatabase
- Linux基礎命令---iptables-saveLinux
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- ORACLE database vaultOracleDatabase
- Relationship Database DesignDatabase
- 3.4 Quiescing a DatabaseUIDatabase
- idea--DatabaseIdeaDatabase
- Oracle clone databaseOracleDatabase
- database的connectDatabase
- Oracle 12.2 新特性:線上PDB資料庫克隆(Pluggable Hot Clone)Oracle資料庫