今天在Oracle 12.1.0.2.0 版本中RMAN 连接PDB 用户时和连接CDB 显示提示信息一样connected to target database: CNDBA (DBID=215559030)怀疑自己是不是做错了,检查tnsname.ora 有以下内容并没有错,于是查视图 v$pdbs 结果是对的,于是同样的操作 在 Oracle 12.2.0.1.0 测试结果RMAN 连接PDB 目标库是提示 connected to target database: CNDBA:PDBCNDBA (DBID=4271691857) 检查 v$pdbs也是对的,Oracle 12.2.0.1.0 做了改进,可以直接提示连接PDB,不会误导操作。
pdbcndba=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.11)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=pdbcndba)
(SERVER=DEDICATED)
)
)
说明:以下实验test 具有sysdba 权限,pdbcndba 是tnsname.ora 文件配置的连接PDB 的网络服务名。
1) Oracle 12.1.0.2.0 数据库中RMAN 连接CDB,PDB 目标库操作,连接提示信息一样。
[oracle@host1 ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 9 16:02:01 2017
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: CNDBA (DBID=215559030)
RMAN> select con_id,dbid,name from v$pdbs;
using target database control file instead of recovery catalog
CON_ID DBID NAME
---------- ---------- ------------------------------
2 3250260069 PDB$SEED
3 766063609 PDBCNDBA
[oracle@host1 ~]$ rman target test/test@pdbcndba
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 9 16:03:29 2017
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: CNDBA (DBID=215559030)
RMAN> select con_id,dbid,name from v$pdbs;
using target database control file instead of recovery catalog
CON_ID DBID NAME
---------- ---------- ------------------------------
3 766063609 PDBCNDBA
2) Oracle 12.2.0.1.0 数据库中RMAN 连接CDB,PDB 目标库操作,连接成功的提示信息有区别,连接PDB 时提示 CDB 后面跟着PDB (CNDBA:PDBCNDBA)很明显的知道连接到PDB
[oracle@dg2 admin]$ rman target /
Recovery Manager: Release 12.2.0.1.0 - Production on Wed Aug 9 16:05:21 2017
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
connected to target database: CNDBA (DBID=209386493)
RMAN> select con_id,dbid,name from v$pdbs;
using target database control file instead of recovery catalog
CON_ID DBID NAME
---------- ---------- ------------------------------
2 3932609193 PDB$SEED
3 4271691857 PDBCNDBA
[oracle@dg2 ~]$ rman target test/test@pdbcndba
Recovery Manager: Release 12.2.0.1.0 - Production on Wed Aug 9 16:07:26 2017
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
connected to target database: CNDBA:PDBCNDBA (DBID=4271691857)
RMAN> select con_id,dbid,name from v$pdbs;
using target database control file instead of recovery catalog
CON_ID DBID NAME
---------- ---------- ------------------------------
3 4271691857 PDBCNDBA
版权声明:本文为博主原创文章,未经博主允许不得转载。