1219 ORA-15021 remote_dependencies_mode

lfree發表於2014-12-19

[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/,如需轉載,請註明出處,否則將追究法律責任。