ITPub博客

首页 > 数据库 > Oracle > 1219 ORA-15021 remote_dependencies_mode

1219 ORA-15021 remote_dependencies_mode

Oracle 作者:lfree 时间:2014-12-19 09:05:51 0 删除 编辑

[20141219]ORA-15021与参数remote_dependencies_mode.txt

--我们生产系统有1个dataguard,里面的archivelog我一般半年清除一次。而且这些信息已经不记录在控制文件中,必须使用asmcmd进入直接删除。
--昨天遇到一个奇怪的情况,当然解决也很简单做一个记录:

在执行rman时报:

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Dec 19 08:43:18 2014

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-12001: could not open channel default
RMAN-10008: could not create channel context
RMAN-10002: ORACLE error: ORA-15021: parameter "remote_dependencies_mode" is not valid in asm instance
RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature

--奇怪我从来没有见过这种情况,打入sqlplus才发现我进入的asm实例。上面的提示也是指向asm实例。原来我前面使用asmcmd维护,没有切换实例,
--切换回来后正常。

$ oerr ora 15021
15021, 00000, "parameter \"%s\" is not valid in %s instance"
// *Cause: The specified parameter was not supported when starting an
//         instance of this type.
// *Action: Delete the specified parameter from the INIT.ORA file.


SYS@+ASM> show parameter remote_dependencies_mode

NAME                       TYPE     VALUE
-------------------------- -------- ---------
remote_dependencies_mode   string   TIMESTAMP


$ export ORACLE_SID=orcl

SYS@orcl> show parameter remote_dependencies_mode
NAME                       TYPE      VALUE
-------------------------- --------- ----------------
remote_dependencies_mode   string    TIMESTAMP


--实际上面的提示无法在asm实例上执行这个操作。手工执行如下:

SYS@+ASM> alter system set remote_dependencies_mode=signature scope=memory;
alter system set remote_dependencies_mode=signature scope=memory
*
ERROR at line 1:
ORA-15021: parameter "remote_dependencies_mode" is not valid in asm instance

--remote_dependencies_mode是做什么的呢?找到一个链接,里面有一个例子:
http://arjudba.blogspot.com/2009/01/ora-04062-timestamp-of-procedure-has.html

REMOTE_DEPENDENCIES_MODE = Timestamp

If the dependency mode is set to TIMESTAMP, the local PL/SQL block can only execute the remote PL/SQL block if the
timestamp on the remote procedure matches the timestamp stored in the locally compiled PL/SQL block. If the timestamps
do not match, the local PL/SQL must be recompiled.

REMOTE_DEPENCIES_MODE = Signature

If the dependency mode is set to SIGNATURE, the local PL/SQL block can still execute the remote PL/SQL block if its
"signature" is the same, even if the timestamp has changed.

The term "signature" basically means the interface (procedure name, parameter types or modes) is the same, even if the
underlying implementation has changed.

The error "ORA-04062: timestamp of procedure has been changed" is reported if the local PL/SQL block cannot call the
remote procedure, since the timestamp or signature has changed on the remote end. A local recompilation may be required
to make the call.

In the case of server to server calls, the local PL/SQL block is implicitly recompiled on the next call after an
ORA-4062 error. In the case of client tools to server calls, the client Form or Report usually needs to be recompiled
explicitly.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-1372867/,如需转载,请注明出处,否则将追究法律责任。

全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2696
  • 访问量
    6466017