Oracle 建立PDB-本地克隆
Oracle 建立PDB- 本地克隆
一:本地克隆
--- 連線cjcpdb02
SQL > conn sys / oracle @ cjcpdb02 as sysdba
Connected.
--- 授權
SQL > grant connect , resource , dba to cjc ;
Grant succeeded.
--- 連線cjcpdb02建立測試資料
SQL > conn cjc / oracle @ cjcpdb02
Connected.
SQL > create table t1 as select level as id from dual connect by level <= 10 ;
Table created.
SQL > select * from t1 ;
ID
----------
1
2
3
4
5
6
7
8
9
10
10 rows selected.
--- 建立目錄
[oracle @ cjcos oradata]$ pwd
/ u01 / app / oracle12 / oradata
[oracle @ cjcos oradata]$ mkdir cjcpdb03
---clone pdb
SQL > conn / as sysdba
Connected.
SQL >
CREATE PLUGGABLE DATABASE cjcpdb03 FROM cjcpdb02
FILE_NAME_CONVERT = ( '/u01/app/oracle12/oradata/cjcpdb02/' ,
'/u01/app/oracle12/oradata/cjcpdb03/' );
--- 對應告警日誌
---alert
2020 - 03 - 30 T09 : 33 : 13.671843 + 08 : 00
CREATE PLUGGABLE DATABASE cjcpdb03 FROM cjcpdb02
FILE_NAME_CONVERT = ( '/u01/app/oracle12/oradata/cjcpdb02/' ,
'/u01/app/oracle12/oradata/cjcpdb03/' )
2020 - 03 - 30 T09 : 33 : 14.246808 + 08 : 00
CJCPDB02 ( 4 ): AUDSYS.AUD$UNIFIED ( SQL_TEXT ) - CLOB populated
2020 - 03 - 30 T09 : 34 : 19.768496 + 08 : 00
CJCPDB03 ( 5 ): Endian type of dictionary set to little
2020 - 03 - 30 T09 : 34 : 21.685283 + 08 : 00
****************************************************************
Pluggable Database CJCPDB03 with pdb id - 5 is created as UNUSABLE.
If any errors are encountered before the pdb is marked as NEW ,
then the pdb must be dropped
local undo - 1 , localundoscn - 0 x00000000000000e1
****************************************************************
CJCPDB03 ( 5 ): Media Recovery Start
2020 - 03 - 30 T09 : 34 : 21.972065 + 08 : 00
CJCPDB03 ( 5 ): Serial Media Recovery started
CJCPDB03 ( 5 ): max_pdb is 5
2020 - 03 - 30 T09 : 34 : 22.336660 + 08 : 00
CJCPDB03 ( 5 ): Recovery of Online Redo Log : Thread 1 Group 1 Seq 91 Reading mem 0
CJCPDB03 ( 5 ): Mem# 0 : / u01 / app / oracle12 / oradata / cjcdb01 / redo01.log
2020 - 03 - 30 T09 : 34 : 22.575875 + 08 : 00
CJCPDB03 ( 5 ): Incomplete Recovery applied until change 6667097 time 03 / 30 / 2020 09 : 34 : 16
2020 - 03 - 30 T09 : 34 : 22.693447 + 08 : 00
CJCPDB03 ( 5 ): Media Recovery Complete ( cjcdb01 )
CJCPDB03 ( 5 ): Autotune of undo retention is turned on.
2020 - 03 - 30 T09 : 34 : 24.377316 + 08 : 00
CJCPDB03 ( 5 ): Undo initialization recovery : err : 0 start : 1164547948 end : 1164547980 diff : 32 ms ( 0.0 seconds )
CJCPDB03 ( 5 ): [ 10627 ] Successfully onlined Undo Tablespace 2 .
CJCPDB03 ( 5 ): Undo initialization online undo segments : err : 0 start : 1164547981 end : 1164547990 diff : 9 ms ( 0.0 seconds )
CJCPDB03 ( 5 ): Undo initialization finished serial : 0 start : 1164547948 end : 1164547993 diff : 45 ms ( 0.0 seconds )
CJCPDB03 ( 5 ): Database Characterset for CJCPDB03 is AL32UTF8
CJCPDB03 ( 5 ): JIT : pid 10627 requesting stop
CJCPDB03 ( 5 ): Buffer Cache flush started : 5
CJCPDB03 ( 5 ): Buffer Cache flush finished : 5
2020 - 03 - 30 T09 : 34 : 26.281633 + 08 : 00
Completed : CREATE PLUGGABLE DATABASE cjcpdb03 FROM cjcpdb02
FILE_NAME_CONVERT = ( '/u01/app/oracle12/oradata/cjcpdb02/' ,
'/u01/app/oracle12/oradata/cjcpdb03/' )
--- 檢視pdb狀態
SQL > show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 CJCPDB01 READ WRITE NO
4 CJCPDB02 READ WRITE NO
5 CJCPDB03 MOUNTED
---open cjcpdb03
SQL > alter session set container = cjcpdb03 ;
Session altered.
SQL > startup
Pluggable Database opened.
[oracle @ cjcos admin ]$ pwd
/ u01 / app / oracle19 / product / 19.0 .0 / dbhome_1 / network / admin
[oracle @ cjcos admin ]$ vim tnsnames.ora
......
CJCPDB03 =
( DESCRIPTION =
( ADDRESS = ( PROTOCOL = TCP )( HOST = cjcos )( PORT = 1521 ))
( CONNECT_DATA =
( SERVER = DEDICATED )
( SERVICE_NAME = cjcpdb03 )
)
)
SQL > conn cjc / oracle @ cjcpdb03
Connected.
SQL > select * from t1 ;
ID
----------
1
2
3
4
5
6
7
8
9
10
10 rows selected.
歡迎關注我的微信公眾號"IT小Chen",共同學習,共同成長!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2683289/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 建立PDB-遠端克隆Oracle
- Z002-O001-02 克隆本地 PDB
- 如何在本地克隆遠端github倉庫Github
- macOS系統 Pycharm克隆GitHub專案到本地MacPyCharmGithub
- 2.10.3 使用 Oracle Automatic Storage Management (Oracle ASM) 克隆資料庫OracleASM資料庫
- 1.3.2.1. 通過克隆Cloning方式建立PDB
- Z005-O001-05 DBCA 靜默克隆本地 PDB
- 建立NuGet本地包源
- JAVA設計模式 2【建立型】原型模式的理解與使用、理解淺克隆和深克隆Java設計模式原型
- 【BUILD_ORACLE】使用Oracle資料泵線上不停機克隆/遷移PDBUIOracle
- Oracle data link建立Oracle
- 1.3.2.1.2. 通過克隆或None-CDB方式建立CDBNone
- 我不知道如何在 JS/TS 中建立深度克隆JS
- 在本地建立docker的registryDocker
- Oracle通過rman進行克隆,你知道如何做嗎?Oracle
- 【配置上線】Linux克隆安裝Oracle資料庫軟體LinuxOracle資料庫
- 建立本地擴充套件包套件
- Oracle OCP(20):建立表Oracle
- Oracle 建立序列語句Oracle
- PL/Plus本地連線oracle配置Oracle
- js中深克隆與淺克隆JS
- 淺克隆和深克隆的用法
- 如何在Premiere Pro中建立和跟蹤蒙版及克隆教程REM
- centos同步yum源到本地,建立本地網路yum源CentOS
- Oracle 12.2 新特性:線上PDB資料庫克隆(Pluggable Hot Clone)Oracle資料庫
- php sqlite 建立本地資料庫PHPSQLite資料庫
- 【APP_ORACLE】Oracle EBS R12.1標準克隆(包括資料庫層和應用層)APPOracle資料庫
- Oracle大表快速建立索引Oracle索引
- Oracle如何建立B樹索引Oracle索引
- oracle 序列的建立與使用Oracle
- Oracle 建立PDB-from ScratchOracle
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- 淺克隆深克隆舉例解讀
- ORACLE本地磁碟備份恢復Oracle
- vue陣列的深克隆和淺克隆Vue陣列
- JAVA 基礎 – clone淺克隆與深克隆Java
- git初始化--本地建立git倉庫Git