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

相关推荐
远方16091 小时前
14-Oracle 23ai Vector Search 向量索引和混合索引-实操
数据库·ai·oracle
GUIQU.2 小时前
【Oracle】数据仓库
数据库·oracle
小袁搬码8 小时前
PL/SQLDeveloper中数值类型字段查询后显示为科学计数法的处理方式
oracle·oracle数据库·pl.sqldeveloper
文牧之9 小时前
Oracle 审计参数:AUDIT_TRAIL 和 AUDIT_SYS_OPERATIONS
运维·数据库·oracle
betazhou12 小时前
有没有 MariaDB 5.5.56 对应 MySQL CONNECTION_CONTROL 插件
linux·数据库·mysql·oracle·mariadb
王小小鸭14 小时前
【Oracle APEX开发小技巧12】
数据库·oracle
远方160915 小时前
16-Oracle 23 ai-JSON-Relational Duality-知识准备
数据库·oracle·json
Wooden-Flute15 小时前
七、数据库的完整性
数据库·oracle
珹洺15 小时前
数据库系统概论(十七)超详细讲解数据库规范化与五大范式(从函数依赖到多值依赖,再到五大范式,附带例题,表格,知识图谱对比带你一步步掌握)
java·数据库·sql·安全·oracle
为中华崛起而奋斗18 小时前
Oracle 19c RAC集群ADG搭建
数据库·oracle