Standby SYNC fails with Error Code: 5036 

Follow

Read our docs  The steps in this article apply when you try to run SSD(Synchronize Standby Database and these error messages are reported: Dbvisit Standby terminated... 
Error Code: 5036 
Error: cannot obtain next change for standby database. Some standby datafiles may be 
missing or corrupted.

 Problem Details

Problem Statement

What steps are required to address the Error messages during SSD - rename of ASM to non-ASM not working

Applicable Error Code

n/a

Affected Versions

v8

Affected Platforms

ALL

 

Description

When running a SSD the following error messages are reported :

Rename from ASM to non-ASM not working properly.

file# = 1 
name = /u01/app/oracle/oradata/DEV/datafile/o1_mf_system_dm1mvt8c_.dbf 
status = SYSTEM 
bytes = 0 
checkpoint_change# = 0 
error = FILE NOT FOUND 
file# = 2 
name = +DATA/DEV/datafile/sysaux.310.874067843 
status = ONLINE 
bytes = 0 
checkpoint_change# = 0 
error = FILE NOT FOUND 
Solution

Use RMAN to create new standby controlfile on primary, then copy it to the standby server and then catalog the standby datafiles and see if they show up as a copy, then switch to them.

Steps Performed

On the Primary Server:

Step 1. On the Primary Database create a backup of the controlfile for the standby database - in the /tmp folder:

RMAN> backup current controlfile for standby format '/tmp/backup-standby.ctl';
[oracle@dbv1 ~]$ . oraenv
ORACLE_SID = [DEV] ? DEV
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@dbv1 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 20 19:29:28 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> select controlfile_type from v$database;

CONTROL
-------
CURRENT
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@dbv1 ~]$ rman
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 20 19:29:42 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target /
connected to target database: DEV (DBID=4037021512)

RMAN> backup current controlfile for standby format '/tmp/backup-standby.ctl';
Starting backup at 20/12/2017:19:29:53
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=131 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including standby control file in backup set
channel ORA_DISK_1: starting piece 1 at 20/12/2017:19:29:54
channel ORA_DISK_1: finished piece 1 at 20/12/2017:19:29:55
piece handle=/tmp/backup-standby.ctl tag=TAG20171220T192953 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20/12/2017:19:29:55
RMAN>

Step 2. Copy this file to the standby database server:

scp /tmp/backup-standby.ctl db2:/tmp/

On the Standby Server:

Step 1. Shutdown the standby database (run on standby database)

sqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown immediate;

Step 2. Restore the standby contfolfile created earlier (run on standby database)

rman
RMAN> connect target /
RMAN> startup nomount
RMAN> restore standby contfolfile from '/tmp/backup-standby.ctl';
RMAN> alter database mount;

Step 3. Catalog the datafiles (run on standby database):

rman
RMAN> connect target /
RMAN> RMAN> catalog start with '/u01/app/oracle/oradata/DEV/';

Step 4. Now show us what is listed with the following command (run on standby database):

rman
RMAN> connect target /
RMAN> RMAN> list copy;

Step 5. Now depending on what we get from the above Step 3 and Step 4, we can try to switch to the copy (which is the files on the filesystem under - /u01/app/oracle/oradata/DEV/

rman
RMAN> connect target /
RMAN> RMAN> switch database to copy;

Step 6. If the switch was successful, all datafiles in the controlfile should match what is on the filesystem. To confirm, run the following queries against the standby database.

sqlplus /nolog 
SQL> connect / as sysdba

SQL>spool /tmp/dbv.txt

SQL>set linesize 300

SQL>col name for a100

SQL>col error for a40

SQL>select file#, name, status, error, recover, bytes from v$datafile_header order by 1,2;

SQL>select file#, name, status, enabled, bytes from v$datafile order by 1,2;

SQL>spool off

Output.

Select file#, name, status, errors, recover, bytes from v$datafile_header order by 1,2;

1 /u01/app/oracle/oradata/DEV/datafile/o1_mf_system_dm1mvt8c_.dbf ONLINE 3.4295E+10
2 /u01/app/oracle/oradata/DEV/datafile/o1_mf_sysaux_dm1nspot_.dbf ONLINE 983564288
3 /u01/app/oracle/oradata/DEV/datafile/o1_mf_undotbs1_dm1nto7k_.dbf ONLINE 3.0472E+10
.....
Select file#, name, status, enabled, bytes from v$datafile order by 1,2;

1 /u01/app/oracle/oradata/DEV/datafile/o1_mf_system_dm1mvt8c_.dbf SYSTEM READ WRITE 3.4295E+10
2 /u01/app/oracle/oradata/DEV/datafile/o1_mf_sysaux_dm1nspot_.dbf ONLINE READ WRITE 983564288
3 /u01/app/oracle/oradata/DEV/datafile/o1_mf_undotbs1_dm1nto7k_.dbf ONLINE READ WRITE 3.0472E+10
.....

Step 7. Try to run the sync option again:

[oracle@dbv1 ~]$] ./dbvctl -d DEV --sync
Have more questions? Submit a request

Comments