0% found this document useful (0 votes)
133 views5 pages

Standby Bounce Steps

This document summarizes the steps taken to shut down and restart the primary and standby databases in an Oracle Data Guard configuration. It shuts down the primary database, archives the necessary logs, and then shuts down the standby database. It then restarts the primary database, mounts and opens the database. For the standby database, it is started without mounting, the archived redo logs are applied, and the database is mounted. Finally, a script is run to check the log shipment and archive gap between the primary and standby databases.

Uploaded by

Naresh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views5 pages

Standby Bounce Steps

This document summarizes the steps taken to shut down and restart the primary and standby databases in an Oracle Data Guard configuration. It shuts down the primary database, archives the necessary logs, and then shuts down the standby database. It then restarts the primary database, mounts and opens the database. For the standby database, it is started without mounting, the archived redo logs are applied, and the database is mounted. Finally, a script is run to check the log shipment and archive gap between the primary and standby databases.

Uploaded by

Naresh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

SR 21672620.

600 *PAAHAI-DR PAAHAI* HY PMP FOR INSTINET GROUP LLC

===============================================
SHUTTING DOWN PRIMARY & STANDBY DATABASES
===============================================

============================
Shutting down Primary Database
============================
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
PAAHAI

SQL> alter system archive log current;


System altered.

SQL> archive log list


Database log mode Archive Mode
Automatic archival Enabled
Archive destination/paahai/arch
Oldest online log sequence 52761
Next log sequence to archive 52764
Current log sequence 52764

SQL> set linesize100


col name format a15
select name,THREAD#,SEQUENCE#,Applied,to_char(COMPLETION_TIME,'yyyy/mm/dd hh24:mi:ss')
from V$archived_log where (THREAD#,RECID) in (select THREAD#,max(RECID) from V$archived_log
where APPLIED='YES' group by THREAD#);

NAME THREAD# SEQUENCE# APP TO_CHAR(COMPLETION_


-------------------------------------------------- ---------- ---------- --- ----
PAAHAI_rmdc 1 52761 YES 2009/09/12 03:28:25

SQL> shut immediate


Database closed.
Database dismounted.
ORACLE instance shut down.

============================
Shutting down Standby Database
============================

SQL> select instance_name,status from v$instance;


INSTANCE_NAMESTATUS
---------------- ------------
PAAHAI MOUNTED
SQL> select to_char(sysdate,'DD.MM.RR HH24:MI:SS') time, a.thread#,(select max(sequence#)from
v$archived_log where archived='YES' and thread#=a.thread#) archived, max(a.sequence#)
applied, (select max(sequence#) from v$archived_log where archived='YES' and
thread#=a.thread#)-max(a.sequence#) gap from v$archived_log a where a.applied='YES' group by
a.thread#;
TIME THREAD# ARCHIVEDAPPLIEDGAP
----------------- ---------- ---------- ---------- ----------
12.09.09 05:08:34 1 52763 52761 2

SQL> !hostname
rmohsaaha04

SQL> archive log list


Database log mode Archive Mode
Automatic archival Enabled
Archive destination/paahai/arch
Oldest online log sequence 52761
Next log sequence to archive 0
Current log sequence 52764

SQL> alter database recover managed standby database cancel;


Database altered.

SQL> recover standby database until cancel;


ORA-00279: change 10322676300009 generated at 09/12/2009 03:24:50 needed for
thread 1
ORA-00289: suggestion : /paahai/arch/PAAHAI_1_52762.arc
ORA-00280: change 10322676300009 for thread 1 is in sequence #52762
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00279: change 10322676464219 generated at 09/12/2009 04:41:17 needed for
thread 1
ORA-00289: suggestion : /paahai/arch/PAAHAI_1_52763.arc
ORA-00280: change 10322676464219 for thread 1 is in sequence #52763
ORA-00278: log file '/paahai/arch/PAAHAI_1_52762.arc' no longer needed for this
recovery
ORA-00279: change 10322676493468 generated at 09/12/2009 05:04:44 needed for
thread 1
ORA-00289: suggestion : /paahai/arch/PAAHAI_1_52764.arc
ORA-00280: change 10322676493468 for thread 1 is in sequence #52764
ORA-00278: log file '/paahai/arch/PAAHAI_1_52763.arc' no longer needed for this
recovery
ORA-00308: cannot open archived log '/paahai/arch/PAAHAI_1_52764.arc'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
======
No Gap
======
SQL> set linesize100
col name format a50
select name,THREAD#,SEQUENCE#,Applied,to_char(COMPLETION_TIME,'yyyy/mm/dd hh24:mi:ss')
from V$archived_log where (THREAD#,RECID) in (select THREAD#,max(RECID) from V$archived_log
where APPLIED='YES' group by THREAD#);
NAME THREAD# SEQUENCE# APP TO_CHAR(COMPLETION_
-------------------------------------------------- ---------- ---------- --- -------------------
/paahai/arch/PAAHAI_1_52763.arc 1 52763 YES 2009/09/12 05:05:31

SQL> select to_char(sysdate,'DD.MM.RR HH24:MI:SS') time, a.thread#,(select max(sequence#)from


v$archived_log where archived='YES' and thread#=a.thread#) archived, max(a.sequence#)
applied, (select max(sequence#) from v$archived_log where archived='YES' and
thread#=a.thread#)-max(a.sequence#) gap from v$archived_log a where a.applied='YES' group by
a.thread#;
TIME THREAD# ARCHIVEDAPPLIEDGAP
----------------- ---------- ---------- ---------- ----------
12.09.09 05:14:18 1 52763 52763 0

SQL> shut immediate


ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

=========================================
STARTING PRIMARY & STANDBY DATABASES
=========================================

======================
Starting Primary Database
======================

SQL> startup
ORACLE instance started.
Total System Global Area 950605032 bytes
Fixed Size 451816 bytes
Variable Size 771751936 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
Database mounted.
Database opened.

=======================
Starting Standby Database
=======================

SQL> startup nomount


ORACLE instance started.
Total System Global Area 950605032 bytes
Fixed Size 451816 bytes
Variable Size 771751936 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes

SQL> alter database mount standby database;


Database altered.

SQL> recover managed standby database disconnect;


Media recovery complete.

SQL> select instance_name,status from v$instance;


INSTANCE_NAMESTATUS
---------------- ------------
PAAHAI MOUNTED

================================================
Checking Log Shipment using Script on RMDC(Standby)
================================================
/autofs/cmd_ctr/database/standby> ./standby_status_check.sh
DB is UP
PAAHAI:MOUNTED
STATUS OF DB LISTENER PAAHAI
DB listener is up and running
Uptime0 days 0 hr. 4 min. 50 sec
RFS process is receiving the following files from Primary database
Client_process=Arch Means ARCH process of ADC is writting archive files
Client_process=Unknown Means FAL process of RMDC is fetching archive files from ADC
no rows selected
MRP process is running
Waiting for Logfile to be shipped from ADC
no rows selected
Logfile is shipped but waiting to be applied due to delay parameter
PROCESS STATUSSEQUENCE#
--------- ------------ ----------
MRP0 WAIT_FOR_LOG 52764
Archive file being applied by MRP at this moment
no rows selected
TIMESTAMP OF LAST RECEIVED ARCHIVE FILE FOR EACH THREAD
if File_rcvd_Min_ago is > 60 then investigate why standby is not receiving the files.
NAME File_rcvd_atFile_rcvd_Min_ago
-------------------------------------------------- --------------- -----------------
/paahai/arch/PAAHAI_1_52763.arc12-sep 05:05:3152
STATUS OF ARCHIVE GAP AS OF (SYSDATE-DELAY PARAMETER), Investigate if gap is more than 15
TIME THREAD# ARCHIVEDAPPLIEDGAP
----------------- ---------- ---------- ---------- ----------
12.09.09 05:58:26 1 52762 52763 -1
thread1 52763 52763
Checking the Missing Sequences and Validating the File Size....
cat /tmp/notfound_thread1.lst to identify missing files from /paahai/arch for thread 1 in range
52763 to 52763
cat /tmp/found_thread1.lst to identify files present in /paahai/arch for thread 1 in range 52763
to 52763
/autofs/cmd_ctr/database/standby>

You might also like