重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 392|回复: 0
打印 上一主题 下一主题

[Oracle] Unable to connect RMAN utility from the standby database

[复制链接]
跳转到指定楼层
楼主
发表于 2025-8-31 17:32:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
现象:
The Recovery Manager (RMAN) utility is unable to establish a connection on the standby database.
Error messages indicate issues with the initialization of the internal recovery manager package and errors from the target database.
The specific errors include:

rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Mon May 12 02:48:12 2025

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

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-04068: existing state of packages has been discarded
ORA-04065: not executed, altered or dropped package body "SYS.DBMS_APPLICATION_INFO"
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_APPLICATION_INFO"
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 111
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 191
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 5093
ORA-04065: not executed, altered or dropped package body "SYS.DBMS_APPLICATION_INFO"
ORA-06508: PL/SQL: could not find program uni
RMAN-04015: error setting target database character set to US7ASCII


原因:
The issue is not specific to RMAN but is related to the SYS package DBMS_APPLICATION_INFO.

The package has recently been modified, as indicated by the last DDL (Data Definition Language) time.

The existing state of the packages has been discarded, and the package body is not executed, altered, or dropped. This leads to the RMAN utility being unable to find the necessary program unit.

SQL> col OWNER format a10
SQL> col OBJECT_NAME format a30
SQL> select OWNER, OBJECT_NAME, OBJECT_TYPE, to_char(LAST_DDL_TIME,'DD-MON-YYYY HH24:MI'), STATUS from dba_objects where OBJECT_NAME = 'DBMS_APPLICATION_INFO';

OWNER      OBJECT_NAME                    OBJECT_TYPE             TO_CHAR(LAST_DDL_ STATUS
---------- ------------------------------ ----------------------- ----------------- -------
SYS        DBMS_APPLICATION_INFO          PACKAGE                 01-MAY-2025 18:55 VALID
SYS        DBMS_APPLICATION_INFO          PACKAGE BODY            17-APR-2025 06:39 VALID
PUBLIC     DBMS_APPLICATION_INFO          SYNONYM                 26-JUN-2017 10:36 VALID



处理方法:
On the standby database, execute the following SQL command to flush the shared pool:

alter system flush SHARED_POOL;

If the above step does not resolve the issue, proceed to the primary database and compile the SYS.DBMS_APPLICATION_INFO package:

alter package SYS.DBMS_APPLICATION_INFO compile package;

After compiling the package, execute the following command on the primary database:

alter system archive log current;

Wait for the standby database to apply the latest redo logs and then check if the RMAN connection is working.

By flushing the shared pool, the modified package will be reloaded. Compiling the package will invalidate and reload it, ensuring that the necessary program unit is available for RMAN to establish a connection.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2026-4-18 03:02 , Processed in 0.451126 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表