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

相关推荐
IvorySQL2 小时前
IvorySQL Agent 探索与实践
数据库·人工智能·postgresql·oracle·ivorysql
ShiXZ2138 小时前
指令集-SQL 常用指令速查手册
数据库·sql·mysql·oracle
许彰午10 小时前
从Oracle看MySQL聚簇索引的架构性缺陷与缓解之道
mysql·oracle·架构
AllData公司负责人10 小时前
数据集成管理|AIIData数据中台实现MySQL、Hive、Oracle一键接入Doris
大数据·数据库·人工智能·hive·mysql·oracle·数据分析
Jane Chiu1 天前
Oracle DBMS_REDEFINITION(在线重定义)
数据库·oracle·分区表
从此以后自律1 天前
SQL 语句从基础到高级
数据库·oracle
阿坤带你走近大数据1 天前
Oracle新老SQL写法对比
数据库·sql·oracle
自由的裙子1 天前
How-To: Using the N* Stack, part 4
java·jvm·oracle
蚁库1 天前
Oracle 11g RAC 多路径配置总搞不定?iSCSI + Multipath + ASM 磁盘组,14节视频带你完整通关
数据库·oracle
蚁库2 天前
Oracle 12c + ASM + UDEV 实战教程:从磁盘规划到日常管理,10节视频完整通关
数据库·oracle