ORA-65122: Pluggable database GUID conflicts with the GUID of an existing

ORA-65122: Pluggable database GUID conflicts with the GUID of an existing

ORA-65122: Pluggable Database GUID Conflicts With The GUID Of An Existing Container (文档 ID 2416798.1)

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

SYS@CDBLHR18c> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                       READ ONLY  NO

         4 PDBLHR3                        MOUNTED

         7 PDBLHR2                        MOUNTED

SYS@CDBLHR18c> create pluggable database PDBLHR4

  2  using '/tmp/PDBLHR1.xml'

  3  nocopy tempfile reuse;

create pluggable database PDBLHR4

*

ERROR at line 1:

ORA-65122: Pluggable database GUID conflicts with the GUID of an existing

container.

SYS@CDBLHR18c> create pluggable database PDBLHR4 as clone

  2  using '/tmp/PDBLHR1.xml'

  3  nocopy tempfile reuse;

create pluggable database PDBLHR4 as clone

*

ERROR at line 1:

ORA-65139: Mismatch between XML metadata file and data file

/u08/app/oracle/oradata/CDBLHR18C/CDBLHR18C/8FF8F6081FDE6D87E053823BA8C0C041/dat

afile/o1_mf_system_go4h7gtb_.dbf for value of guid

(7A2048D2D3D3B765E053823BA8C0BE92 in the plug XML file,

8FF8F6081FDE6D87E053823BA8C0C041 in the data file)

-- 这里修改/tmp/PDBLHR1.xml文件,将<guid>7A2048D2D3D3B765E053823BA8C0BE92</guid>修改为<guid>8FF8F6081FDE6D87E053823BA8C0C041</guid>

SYS@CDBLHR18c> create pluggable database PDBLHR4 as clone

  2  using '/tmp/PDBLHR1.xml'

  3  nocopy tempfile reuse;

Pluggable database created.

SYS@CDBLHR18c> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                       READ ONLY  NO

         3 PDBLHR4                        MOUNTED

         4 PDBLHR3                        MOUNTED

         7 PDBLHR2                        MOUNTED

 

 

 

 

 

 

 

In this Document 

 Symptoms
 Cause
 Solution

 

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later 
Information in this document applies to any platform. 

SYMPTOMS

Restored Pluggable database in a different container and unplugged. Dropped existing old PDB  and trying to plug in new PDB and getting error: 
ORA-65122: Pluggable database GUID conflicts with the GUID of an existing container. 


SQL> drop pluggable database PDB1 INCLUDING DATAFILES;

Pluggable database dropped.

SQL> SET SERVEROUTPUT ON 
DECLARE 
compatible CONSTANT VARCHAR2(3) := CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY(pdb_descr_file => '/tmp/cdbrf_pdb1.xml') 
WHEN TRUE THEN 
'YES' 
ELSE 'NO' 
END; 
BEGIN 
DBMS_OUTPUT.PUT_LINE(compatible); 
END; 
/SQL> 
YES

PL/SQL procedure successfully completed.

SQL> create pluggable database PDB1 
using '/tmp/cdbrf_pdb1.xml' 
COPY FILE_NAME_CONVERT = ('+DATA', '+EON_DAT_QA'); 
; 2 3 
create pluggable database pdb1 

ERROR at line 1: 
ORA-65122: Pluggable database GUID conflicts with the GUID of an existing container.


 

CAUSE

 The same PDB had been plugged previously hence the  GUID already exists

SOLUTION

 This is expected error.

Use  AS CLONE clause.

create pluggable database .... 
AS CLONE using '.....xml' 
file_name_convert=(...,..);

Or, if you would like to move the XML file, you can use: 
create pluggable database .... 
AS CLONE using '.....xml' 
MOVE 
file_name_convert=(...,..);

AS CLONE option is used when target CDB already contains a PDB that was created using the same set of data files. And this is the case here.

Please take a look at: 
https://docs.oracle.com/database/121/SQLRF/statements_6010.htm#SQLRF55686 

AS CLONE Clause

Specify this clause only if the target CDB already contains a PDB that was created using the same set of data files. The source files remain as an unplugged PDB and can be used again. Specifying AS CLONE also ensures that Oracle Database generates new identifiers, such as DBID and GUID, for the new PDB.


 



About Me

........................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub、博客园、CSDN和个人微 信公众号( xiaomaimiaolhr )上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文博客园地址: http://www.cnblogs.com/lhrbest

● 本文CSDN地址: https://blog.csdn.net/lihuarongaini

● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群号: 230161599 (满) 、618766405

● 微 信群:可加我微 信,我拉大家进群,非诚勿扰

● 联系我请加QQ好友 ( 646634621 ) ,注明添加缘由

● 于 2019-08-01 06:00 ~ 2019-08-31 24:00 在西安完成

● 最新修改时间:2019-08-01 06:00 ~ 2019-08-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

........................................................................................................................

● 小麦苗的微店 : https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

● 小麦苗出版的数据库类丛书 : http://blog.itpub.net/26736162/viewspace-2142121/

● 小麦苗OCP、OCM、高可用网络班 : http://blog.itpub.net/26736162/viewspace-2148098/

● 小麦苗腾讯课堂主页 : https://lhr.ke.qq.com/

........................................................................................................................

使用 微 信客户端 扫描下面的二维码来关注小麦苗的微 信公众号( xiaomaimiaolhr )及QQ群(DBA宝典)、添加小麦苗微 信, 学习最实用的数据库技术。

........................................................................................................................

欢迎与我联系

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AiDBA宝典

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值