sqlplus sys@ as sysdba 1521 手动修改srv对应的pdb

++ Connecting via rman to CDBROOT and running commands fail with below error showing rman is connected to PDB instead of CDBROOT :

rman target 'sys@"<scan_name>.<domain_name>:1521/<db_unique_name>.<domain_name>:DEDICATED"'

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jun 7 13:38:56 2023

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

target database Password:

connected to target database: DBA21CDB (DBID=1393061330)

RMAN> configure compression algorithm 'low';

using target database control file instead of recovery catalog

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of configure command at 06/07/2023 13:39:23

RMAN-07536: command not allowed when connected to a Pluggable Database

Cause

++ Connecting from sqlplus using same connect string shows connections are going to PDB instead of CDB$ROOT :

sqlplus 'sys@"<scan_name>.<domain_name>:1521/<db_unique_name>.<domain_name>:DEDICATED" as sysdba'

SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED


3 PDB1 READ WRITE NO

++ Output of below query shows service is pointing to PDB (con_id=3) instead of CDB$ROOT :

select name, network_name, con_id# from cdb_service$;

<db_unique_name>.<domain_name> <db_unique_name>.<domain_name> 3 <<<<<<<<<<<<<<<<<<<service is pointing to CON_ID 3

Solution

Drop and recreate the service for CDB

OR

  1. update cdb_service$ with correct container id for PDB service -

sql> update cdb_service$ set con_id#=1 where name='<db_unique_name>.<domain_name> ';

SQL> commit;

  1. Restart CDB using srvctl

srvctl stop databsae -db <db_unique_name>

srvctl start database -db <db_unique_name>

  1. After restart again check cdb_service$ is pointing to CON_ID# 1

SQL> select name, network_name, con_id# from cdb_service$

<db_unique_name>.<domain_name> <db_unique_name>.<domain_name> 1

相关推荐
akhfuiigabv8 小时前
使用Neo4j-Cypher-FT实现自然语言查询图数据库
数据库·python·oracle·neo4j
数据最前线17 小时前
创建索引遇到这个Bug,19c中还没有修复
oracle·bug
消失在人海中19 小时前
oracle表的类型
数据库·oracle·表的类型
Casual_Lei1 天前
Neo4j
数据库·oracle·neo4j
爬山算法1 天前
Oracle(130)如何启动和关闭Oracle数据库?
数据库·oracle
Dylanioucn2 天前
【编程底层原理】亿级数据表查询最后10条记录limit 99999990,10性能为啥特慢,而且数据库都被查宕机了
数据库·oracle
缘友一世2 天前
mac系统安装最新(截止2024.9.13)Oracle JDK操作记录
java·macos·oracle
2401_858120262 天前
如何在Oracle中实现数据的加密
数据库·oracle
爬山算法2 天前
Oracle(121)如何进行数据文件的恢复?
数据库·oracle
这孩子叫逆2 天前
16. MyBatis的延迟加载机制是什么?如何配置?有哪些优缺点?
数据库·oracle·mybatis