Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-27037 on standby after moving primary files

Mimi MiamiFeb 25 2014 — edited Feb 27 2014

I am running Oracle 11.2 with a physical primary and standby Data Guard configuration on Solaris 10.  I was asked to relocate all of the files belonging to the primary to a new mount point.  This includes datafiles, tempfiles, ORLs, SRLs, and the controlfile.  The files on the primary filesystem were located on /u07 and are now on /u03.  The files on the standby are on /u07.

Here's what I did:

     Cancelled managed recovery and shutdown standby.

     Shutdown primary.

     Did a filesystem copy on the primary from /u07 to /u03.

     Modified control_files parameter on primary's init.ora file to point to new location on /u03 and set log_archive_dest_state_2=DEFER

     Renamed the primary spfile with a ".bak" so primary would start with init.ora file.

     On primary: 

                       startup mount;

                         Ran SQL script that renamed the datafiles, tempfiles, ORLs, and SRLs to the new location on /u03.

            alter database open;

            create spfile from pfile;

            shutdown immediate;

            startup;  (so primary is started with an spfile now)

     On standby:

                         Modified these two lines in init.ora file:

               *.db_file_name_convert='/u03/oradata/MYDB/','/u07/oradata/MYDB/'

               *.log_file_name_convert='/u03/oradata/MYDB/log','/u07/oradata/MYDB/log_'

                              Note:  When the standby was first created, someone created the ORLs with a different name than the primary.  For example, the primary logs are named log1a, log2a, and log3a.  On the standby, they are named log_1a, log_2a, and log_3a. 

                         Renamed the standby spfile with a ".bak" so standby would start with init.ora file.

                         startup mount;

                           ***At this point I saw these errors in the standby alert log:

                         Errors in file /oracle/diag/rdbms/mydb_stby/MYDB/trace/MYDB_lgwr_27569.trc:

                         ORA-00313: open failed for members of log group 3 of thread 1

                         ORA-00312: online log 3 thread 1: '/u07/oradata/MYDB/log3a.dbf'

                         ORA-27037: unable to obtain file status

                         SVR4 Error: 2: No such file or directory

                         Additional information: 3

                         ARC3: Archival started

                         ARC0: STARTING ARCH PROCESSES COMPLETE

                            Here are my questions:  Why is the standby database looking for the online logs as they are named in the primary?  (Without the underscore in the name) 

                                                                Should I have set STANDBY_FILE_MANAGEMENT=MANUAL on both the primary and the standby, and renamed the ORLs in the standby?

                           What I ended up doing was shutting down the standby, and renaming the ORLs on the filesystem to match how they are named on the primary.  Next, on the standby, I did:

                                 startup mount;

                  alter database recover automatic managed standby database using current logfile disconnect from session;

                         Then, on the primary I did:  alter system set log_archive_dest_state_2=ENABLE;

                         All seems OK, meaning, logs are being shipped from the primary to the standby and being applied on the standby.

   I'm wondering, what should I have done differently so as not to have encountered this error to begin with?  Also, is my standby valid at this point?  I don't see any issues in either the primary alert log or the standby alert log. 

This post has been answered by CKPT on Feb 27 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2014
Added on Feb 25 2014
9 comments
925 views