++ Connecting via rman to CDB$ROOT and running commands fail with below error showing rman is connected to PDB instead of CDB$ROOT :
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;
2. Restart CDB using srvctl
srvctl stop databsae -db <db_unique_name>
srvctl start database -db <db_unique_name>
3. 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
本站资源均来自互联网,仅供研究学习,禁止违法使用和商用,产生法律纠纷本站概不负责!如果侵犯了您的权益请与我们联系!
转载请注明出处: 免费源码网-免费的源码资源网站 » sqlplus sys@ as sysdba 1521 手动修改srv对应的pdb
发表评论 取消回复