Sunday, December 4, 2022

Recover standby database with Archive Log backup

Step 01

Cancel the MRP process and run the query below with sqlplus to find the required sequence.

SQL > alter database recover managed standby database cancel;

Check the archivelog required to recover the standby DB.

SQL> alter database recover standby database;

============

alter database recover standby database

*

ERROR at line 1:

ORA-00279: change 76791978408 generated at 12/01/2022 08:13:07 needed for

thread 1

ORA-00289: suggestion : +RECOC1

ORA-00280: change 76791978408 for thread 1 is in sequence #432918

 SQL>

==================

Step 02.

 In this scenario, thread 1 sequence 432918 is required to recover.

Check the max sequence generated on Primary database.

SQL> select max(SEQUENCE#),thread# from v$archived_log group by thread#;

Run the RMAN command below to take the backup accordingly.

RMAN > BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG FROM SEQUENCE 432918 UNTIL SEQUENCE 433570 THREAD 1 format '/mnt/nfs/Ora_back/RMAN/DBM01/%U';

 

Step 03.

Copy the Backup files to the Standby database server.

Step 04.

Catalog the backup files.

RMAN> catalog start with '/acfs01/Ora_back/RMAN/DBM01/Arc_T1';

Step 05.

Recover the database.

RMAN> recover database;

 --- Got below error as I've to take a thread 2 backup as well because this is a RAC Database.

RMAN-06054: media recovery requesting unknown archived log for thread 2 with sequence 545051 and starting SCN of 7679200924

------

 

Step 06.

 

Take the backup of thread 2.

 

RMAN > BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG FROM SEQUENCE 545051 UNTIL SEQUENCE 545510 THREAD 2 format '/mnt/nfs/Ora_back/RMAN/DBM01/%U';

 

Step 07.

 Copy the Files and Catalog again as thread 1.

 Step 08.

 RMAN> recover database;

 

SQL > alter database recover managed standby database disconnect from session;

 

Sunday, November 27, 2022

REP-501: The specified database cannot be connected.

Check for the "TNS_ADMIN" value in the "reports_process.xml" file in the
" /u01/app/oracle/config/domains/mydomain/system_components/ReportsServerComponent/rep_wls_reports_andrew-app/data/nodemanager ".
Change the value as per the tnsnames.ora location as per below.
ie. "/u01/app/oracle/config/domains/mydomain/config/fmwconfig"
Eventually reports_process.xml file shold looks like below.

[oracle@andrew-app nodemanager]$ cat reports_process.xml







[oracle@andrew-app nodemanager]$
[oracle@andrew-app nodemanager]$ cat reports_process.xml # [oracle@andrew-app nodemanager]$

Thursday, November 24, 2022

RMAN-06172:


RMAN> restore controlfile from '/home/oracle/dms_mount/RMAN/STB02/stb02control.ctl';

Starting restore at 26-OCT-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=6273 instance=dbm02_dg device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 10/26/2022 10:20:18

RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

Solution ->

The controlfile was on shared storage.
It is require to copy the controlfile to a local disk.

cp /home/oracle/dms_mount/RMAN/STB02/stb02control.ctl /tmp/


RMAN> restore controlfile from '/tmp/stb02control.ctl';

Starting restore at 26-OCT-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=6900 instance=dbm02_dg device type=DISK
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=3 instance=dbm02_dg device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Secure Backup

channel ORA_SBT_TAPE_1: skipped, AUTOBACKUP already found
channel ORA_DISK_1: copied control file copy
output file name=+DATA/dbm02_dg/controlfile/dbm02_stby.ctl
output file name=+REDO/dbm02_dg/controlfile/dbm02_stby.ctl
Finished restore at 26-OCT-22

RMAN>