ORA-15021 parameter remote_dependencies_mode is not valid in asm instance
May062014
今天在用RMAN备份数据库的时候遇到ORA-15021错误:
RMAN> connect target * 2> run{ 3> allocate channel d1 type disk; 4> allocate channel d2 type disk; 5> allocate channel d3 type disk; 6> allocate channel d4 type disk; 7> allocate channel d5 type disk; 8> allocate channel d6 type disk; 9> allocate channel d7 type disk; 10> allocate channel d8 type disk; 11> backup as compressed backupset full database format '/backups_20140501/20140506/fulldb_%u%p%s.rmn' 12> include current controlfile plus archivelog format '/backups_20140501/20140506/arch_ctl_%u%p%s.rmn'; 13> release channel d1; 14> release channel d2; 15> release channel d3; 16> release channel d4; 17> release channel d5; 18> release channel d6; 19> release channel d7; 20> release channel d8; 21> } 22> RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== 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 Recovery Manager complete.
这个错误提示的很明显,remote_dependencies_mode参数指定的不正确,要改成signature才可以,这我就纳闷了,为什么提示的是ASM实例,后来想到,之前使用ASMCMD命令登录了ASM,查看了磁盘组信息,忘了把ORACLE_SID改回来,现在的ORACLE_SID还是+ASM呢。
-bash-3.2$ echo $ORACLE_SID +ASM -bash-3.2$ export ORACLE_SID=headdb2
将ORACLE_SID改为数据库实例名后,再次使用RMAN备份成功,问题解决。
后来经过测试,按照RMAN的提示,将remote_dependencies_mode参数的值设置为signature也是可以的。
但是将alter语句直接写在RMAN脚本里也是不行的,因为这是数据库参数,ASM实例无法修改,所以如果不修改ORACLE_SID环境变量的情况下,只能在数据库实例里修改这个参数,而且还要全局修改才可以。
-bash-3.2$ export ORACLE_SID=headdb2 -bash-3.2$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.4.0 - Production on Tue May 6 17:07:23 2014 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show parameter remote_dependencies_mode NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_dependencies_mode string TIMESTAMP SQL> alter system set remote_dependencies_mode=signature; System altered.
这样,就可以在ORACLE_SID即使指定的是ASM实例,也可以通过RMAN备份数据库了。
remote_dependencies_mode参数影响的是远程调用PL/SQL或DBLINK,修改后一般不会对数据库造成严重影响。这是动态参数,可以根据需求随时调整。
————————————————-end———————————————————