Recreate Oracle Standby logfiles

In our company we are using Oracle Databases. For the productive Databases we use some Standby Databases as Data Guard. Apparently they worked as they should but nowadays one standby is not able to access the standby logfiles. How can I recreate those files ?
2 answers

Hi, you can try to follow the steps, I hope it will solve your problem.

1. Check status of existing standby redo logs before you start the activity
2. Stop Media Recovery of the physical standby database and change the standby_file_management
3. Try to drop existing standby redo log groups
4. Add standby redo log groups
5. Revert back the changes you did before starting the activity

First of all you need to cancel the standby recover process which will apply all the archivelogs and files on the standby side. This can be done by the following command:

SQL> recover managed stanbdy database cancel;

Afterwards you need to adjust the file management parameter to be able to manual change those files:

SQL> alter system set STANDBY_FILE_MANAGEMENT=MANUAL;

Since you already created the logfiles for the standby and the primary as pointed out. You need to shutdown the Standby database at this point, this is not a big deal incase the Standby will ask for all the missing files once it ist started up again.

SQL> shutdown immediate;

To be able to access the file that the standby thinks is in use at this moment, you need to set the following line within your init-file:

*.log_file_name_convert='dummy','dummy';

Restart your standby database.

startup mount;

And now you can drop your logfile goups like this:

SQL> ALTER DATABASE DROP LOGFILE GROUP X;

Now the file and group that has a problem should be deleted and you can recreate it:

ALTER DATABASE
ADD LOGFILE GROUP X ('$PATH/logfile1a.log', '$PATH/logfile1b.log')
SIZE XXXM REUSE;

At this point your standby database should be able to use the file again.