今天做一下切换,备库出现ORA-00344这个错误
SQL> alter database commit to switchover to primary;
alter database commit to switchover to primary
*
ERROR at line 1:
ORA-00344: unable to re-create online log
'opt/ora10g/racdb/onlinelog/group_1.257.819733349'
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory
查了一下原来是convert的地址设错了
SQL> show parameter log_file
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_file_name_convert string +RAC_DISK/RACDB/ONLINELOG, opt
/ora10g/racdb/onlinelog
opt前面少了了‘/’
SQL> alter system set log_file_name_convert='+RAC_DISK/RACDB/ONLINELOG','/opt/ora10g/racdb/onlinelog' scope=spfile;
System altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 62916852 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter database commit to switchover to primary;
Database altered.
成功切换,看来还是不仔细啊,设置的时候要多检查几遍才行
转载于:https://blog.51cto.com/xutt1986/1254683