DATAGUARD configuration is as follows:
PROD is the master database, SBDB is the slave Database
1-3 log groups are redolog files and 4-6 log groups are standby logs.
After the standby log is created, the master database closes the database and uses the cold backup tar package to transmit data to the backup database for recovery.
After the DG is configured and the slave database is started, the alert log of the slave database reports the following error:
Errors in file/u01/app/oracle/admin/SBDB/udump/sbdb_rfs_14903.trc:
ORA-00313: open failed for members of log group 7 of thread 1
ORA-00312: online log 7 thread 1: '/u01/app/oracle/oradata/PROD/disk2/log4b. Log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
.....
After reading this, I found it was not correct. The standby database path should be '/u01/app/oracle/oradata/SBDB'. How can it be PROD, it should be because an error is configured in the parameter file of the slave database. Opening the parameter file of the slave database found that the error was as follows:
LOG_FILE_NAME_CONVERT = 'sbdb', 'prod'
It should be:
LOG_FILE_NAME_CONVERT = 'prod', 'sbdb'
After the modification, close the database, recreate the spfile file, start the database, and find that the alert log of the slave database still has the following error:
RFS [3]: Assigned to RFS process 15120
RFS [3]: Identified database type as 'physical standby'
RFS [3]: No standby redo logfiles created
RFS [3]: Archived Log: '/home/oracle/arch/SBDB/4107_831568959.arc'
Mon Mar 17 11:33:28 2014
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS [4]: Assigned to RFS process 15122
RFS [4]: Identified database type as 'physical standby'
Primary database is in maximum performance mode
Primary database is in maximum performance mode
The system still prompts that no standby redo logfiles exists, but the database contains '/u01/app/oracle/oradata/PROD/disk2/log4b. for standby log, query v $ standby_log:
SYS @ SBDB> select * from v $ standby_log;
No rows selected
The prompt is that there is no standby log. Well, there is no way to re-build the original standby log:
SYS @ SBDB> alter database drop logfile group 4;
Alter database drop logfile group 4
*
ERROR at line 1:
ORA-01156: recovery in progress may need access to files
SYS @ SBDB> alter database recover managed standby database cancel;
Database altered.
SYS @ SBDB> alter database drop logfile group 4;
Alter database drop logfile group 4
*
ERROR at line 1:
ORA-00359: logfile group 4 does not exist
If this log group does not exist, delete it from the operating system and recreate it.
[Oracle @ jp2 SBDB] $ cd disk1
[Oracle @ jp2 disk1] $ ls
Control01.ctl log5a. log log7a. log redo02.log sysaux01.dbf temp01.dbf
Log4a. log log6a. log redo01.log redo03.log system01.dbf undotbs01.dbf
[Oracle @ jp2 disk1] $ rm-f * a. log
[Oracle @ jp2 disk1] $ cd ../disk2
[Oracle @ jp2 disk2] $ ls
Control02.ctl log4b. log log5b. log log6b. log log7b. log
[Oracle @ jp2 disk2] $ rm-f * B. log
On the slave database:
SYS @ SBDB> alter database add standby logfile group 4
2 ('/u01/app/oracle/oradata/SBDB/disk1/log4a. log', '/u01/app/oracle/oradata/SBDB/disk2/log4b. log') size 100 m;
Database altered.
SYS @ SBDB> alter database add standby logfile group 5 ('/u01/app/oracle/oradata/SBDB/disk1/log5a. log', '/u01/app/oracle/oradata/SBDB/disk2/log5b. log') size 100 m;
Alter database add standby logfile group 6 ('/u01/app/oracle/oradata/SBDB/disk1/log6a. log', '/u01/app/oracle/oradata/SBDB/disk2/log6b. log') size 100 m;
Alter database add standby logfile group 7 ('/u01/app/oracle/oradata/SBDB/disk1/log7a. log', '/u01/app/oracle/oradata/SBDB/disk2/log7b. log') size 100 m;
Database altered.
SYS @ SBDB>
Database altered.
SYS @ SBDB>
Database altered.
After reconstruction, switch logs on the master database:
SYS @ PROD> alter system switch logfile;
System altered.
Check the alert log of the standby database. Everything is normal, and the standby log can also be found.
RFS [5]: Successfully opened standby log 4: '/u01/app/oracle/oradata/SBDB/disk1/log4a. Log'