一、环境
源库一套11.2.0.4的RAC生产库,通过备份一体机备份并恢复到另外一套RAC测试环境。下面是参数文件配置
1 ncsb2.__db_cache_size=436207616 2 ncsb1.__db_cache_size=268435456 3 ncsb2.__java_pool_size=16777216 4 ncsb1.__java_pool_size=16777216 5 ncsb2.__large_pool_size=33554432 6 ncsb1.__large_pool_size=33554432 7 ncsb2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment 8 ncsb1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment 9 ncsb2.__pga_aggregate_target=503316480 10 ncsb1.__pga_aggregate_target=436207616 11 ncsb2.__sga_target=754974720 12 ncsb1.__sga_target=822083584 13 ncsb2.__shared_io_pool_size=0 14 ncsb1.__shared_io_pool_size=0 15 ncsb2.__shared_pool_size=251658240 16 ncsb1.__shared_pool_size=318767104 17 ncsb2.__streams_pool_size=0 18 ncsb1.__streams_pool_size=167772160 19 *.audit_file_dest='/u01/app/oracle/admin/ncsb/adump' 20 *.audit_trail='db' 21 *.cluster_database=true 22 *.compatible='11.2.0.4.0' 23 *.control_files='+DATA/ncsb/controlfile/control.ctl' 24 *.db_block_size=8192 25 *.db_create_file_dest='+DATA' 26 *.db_domain='' 27 *.db_name='ncsb' 28 #*.db_recovery_file_dest='+FRA' 29 #*.db_recovery_file_dest_size=6005194752 30 *.diagnostic_dest='/u01/app/oracle' 31 *.dispatchers='(PROTOCOL=TCP) (SERVICE=ncsbXDB)' 32 *.enable_goldengate_replication=TRUE 33 ncsb1.instance_number=1 34 ncsb2.instance_number=2 35 *.log_archive_config='' 36 #*.log_archive_dest_2='' 37 *.memory_target=27487790694 38 *.nls_language='AMERICAN' 39 *.open_cursors=300 40 *.processes=150 41 *.remote_listener='scan-ip:1521' 42 *.remote_login_passwordfile='exclusive' 43 #*.streams_pool_size=167772160 44 ncsb2.thread=2 45 ncsb1.thread=1 46 ncsb2.undo_tablespace='UNDOTBS2' 47 ncsb1.undo_tablespace='UNDOTBS1'
二、问题
通过Rman恢复controlfile发现报错找不到ASM磁盘组
1 RMAN> run 2 { 3 allocate channel c1 type 'sbt_tape'; 4 send 'nb_ora_serv=nchrssnbu5230,nb_ora_client= ncnewdb2'; 5 restore controlfile from '/ctrl_dNCSB_u5osv6phl_s39096_p1_t972252725'; 6 }
发现报如下错:
三、解决
经排查所有ASM磁盘组都正常挂载,用户组权限都是正常,但在数据库中查看不到磁盘信息
1 SQL> select GROUP_NUMBER,NAME,STATE,TYPE from v$asm_diskgroup; 2 3 no rows selected
后发现grid用户的ORACLE_HOME/bin/oracle没有s权限
1 grid@ncdb1:/u01/app/11.2.0/grid/bin$ls -l oracle 2 -rwxrwxr-x 1 grid oinstall 502885264 Jan 19 13:04 oracle
加上s权限,问题解决
1 grid@ncdb1:/u01/app/11.2.0/grid/bin$chmod u+s,g+s oracle 2 grid@ncdb1:/u01/app/11.2.0/grid/bin$ls -l oracle 3 -rwsrwsr-x 1 grid oinstall 502885264 Jan 19 13:04 oracle 4 5 SQL> select name from v$asm_diskgroup; 6 7 NAME 8 ------------------------------------------------------------ 9 OCR 10 DATA