SlideShare a Scribd company logo
1 of 3
Verify standby environment
Physical standby database
Count the existing archived logs n the standby database:
select count(*) from v$archived_log;
Then archive the current log on the primary database:
Alter system archive log current;
Then, count the archived logs on the standby database again. It should have been increased by
one.
Level of synchronization
To see if there is a problem with the archiving destinations (such as that destination that
transmits logs), query v$archive_dest_status.
Select archived_thread#, archived_seq#, applied_thread#,
applied_seq# from v$archive_dest_status;
Show received logs
On a physical standby database, the received archived redo logs can be displayed like this:
Select registrar, creator, thread#, sequence#, first_change#,
next_change# from v$archived_log;
Show applied archived redo log
select thread#, sequence#, first_change#, next_change# from
v$log_history;
Show messages
Use v$dataguard_status to display messages. Dest_id refers to what is configured with
log_archive_dest_n.
select message from v$dataguard_status where dest_id = 2;
The query was executed on the primary database, and it shows that the destination 2 cannot
deliver its logs.
ARCH: Error 12535 Creating archive log file to 'to_standby'
ARCH: Error 12535 Creating archive log file to 'to_standby'
ARCH: Error 12535 Creating archive log file to 'to_standby'
Broken network connections: If the network connection is broken, the standby database writes
RFS: Possible network disconnect with primary database. The primary database writes: Network
asynch I/O wait error 3114 log 3 service 'to_standby'.
Archived logs that are not transmitted
The following query assumes that the archives are locally stored on destination 1 and sent to the
remote server on destination 2.
select
substr(local.name,1,50) "Archive Name",
case when remote.sequence# is null then 'NOT TRANSMITTED'
else 'transmitted'
end,
local.sequence#,
local.thread#
from
(select * from v$archived_log where dest_id = 1) local
left join
(select * from v$archived_log where dest_id = 2) remote
on local.sequence# = remote.sequence# and
local.thread# = remote.thread#
order by local.sequence#;
Is standby database performing managed recovery
Select process, status from v$managed_standby;
If there is a MRP or a MRP0 process, the database is performing managed recovery.
Monitoring the recovery process
select process, status, thread#, sequence#, block#, blocks from
v$managed_standby;
alter database recover managed standby database disconnect from
session;
alter database recover managed standby database cancel;
alter system set log_archive_dest_state_2=defer;

More Related Content

What's hot

Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklistpraveen_01236
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsRoo Wall
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Rupak Roy
 
Oracle 11g dataguard configuration in aix
Oracle 11g dataguard configuration in aixOracle 11g dataguard configuration in aix
Oracle 11g dataguard configuration in aixSanjiv Ranjit
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Recvivaankumar
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Rupak Roy
 
From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019Enno Runne
 
Trace File Database admanistartion and manegment
Trace File Database admanistartion and manegmentTrace File Database admanistartion and manegment
Trace File Database admanistartion and manegmentKainat Ilyas
 
Cassandra - Deep Dive ...
Cassandra - Deep Dive ...Cassandra - Deep Dive ...
Cassandra - Deep Dive ...sameiralk
 
Introduction to hadoop ecosystem
Introduction to hadoop ecosystem Introduction to hadoop ecosystem
Introduction to hadoop ecosystem Rupak Roy
 
Apache Con NA 2013 - Cassandra Internals
Apache Con NA 2013 - Cassandra InternalsApache Con NA 2013 - Cassandra Internals
Apache Con NA 2013 - Cassandra Internalsaaronmorton
 
Manipulating Data using DPLYR in R Studio
Manipulating Data using DPLYR in R StudioManipulating Data using DPLYR in R Studio
Manipulating Data using DPLYR in R StudioRupak Roy
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed FilesAnar Godjaev
 

What's hot (20)

Dial Tone Portability
Dial Tone PortabilityDial Tone Portability
Dial Tone Portability
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windows
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode
 
Oracle 11g dataguard configuration in aix
Oracle 11g dataguard configuration in aixOracle 11g dataguard configuration in aix
Oracle 11g dataguard configuration in aix
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Les 09 Tspitr
Les 09 TspitrLes 09 Tspitr
Les 09 Tspitr
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export
 
From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019
 
Sas classes in mumbai
Sas classes in mumbaiSas classes in mumbai
Sas classes in mumbai
 
Trace File Database admanistartion and manegment
Trace File Database admanistartion and manegmentTrace File Database admanistartion and manegment
Trace File Database admanistartion and manegment
 
Cassandra - Deep Dive ...
Cassandra - Deep Dive ...Cassandra - Deep Dive ...
Cassandra - Deep Dive ...
 
Les 03 Catalog
Les 03 CatalogLes 03 Catalog
Les 03 Catalog
 
Rac questions
Rac questionsRac questions
Rac questions
 
Introduction to hadoop ecosystem
Introduction to hadoop ecosystem Introduction to hadoop ecosystem
Introduction to hadoop ecosystem
 
Les 08 Dupe Db
Les 08 Dupe DbLes 08 Dupe Db
Les 08 Dupe Db
 
Apache Con NA 2013 - Cassandra Internals
Apache Con NA 2013 - Cassandra InternalsApache Con NA 2013 - Cassandra Internals
Apache Con NA 2013 - Cassandra Internals
 
Manipulating Data using DPLYR in R Studio
Manipulating Data using DPLYR in R StudioManipulating Data using DPLYR in R Studio
Manipulating Data using DPLYR in R Studio
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
 

Viewers also liked

To whom it may concern
To whom it may concernTo whom it may concern
To whom it may concernRuoyang Peng
 
Montreal Urban Art 2011 - B&W Pentax K1000
Montreal Urban Art 2011 - B&W Pentax K1000Montreal Urban Art 2011 - B&W Pentax K1000
Montreal Urban Art 2011 - B&W Pentax K1000Benjamin P. MacLeod
 
M.LEPIS - Diploma Thesis (2004)
M.LEPIS - Diploma Thesis (2004)M.LEPIS - Diploma Thesis (2004)
M.LEPIS - Diploma Thesis (2004)Martin LEPIŠ
 
Lucia mancero 3
Lucia mancero 3Lucia mancero 3
Lucia mancero 3VMANCERO
 
New hampshire legacies power point final
New hampshire legacies power point finalNew hampshire legacies power point final
New hampshire legacies power point finalbettybj
 
Diktatorerna skriver historia
Diktatorerna skriver historiaDiktatorerna skriver historia
Diktatorerna skriver historiaeva13ham
 
Distrix_Software_Defined_Infrastructure_White_Paper
Distrix_Software_Defined_Infrastructure_White_PaperDistrix_Software_Defined_Infrastructure_White_Paper
Distrix_Software_Defined_Infrastructure_White_PaperThomas Mehlhorn
 

Viewers also liked (16)

Etude de la WIFI sur NS2
Etude de la WIFI sur NS2Etude de la WIFI sur NS2
Etude de la WIFI sur NS2
 
To whom it may concern
To whom it may concernTo whom it may concern
To whom it may concern
 
Montreal Urban Art 2011 - B&W Pentax K1000
Montreal Urban Art 2011 - B&W Pentax K1000Montreal Urban Art 2011 - B&W Pentax K1000
Montreal Urban Art 2011 - B&W Pentax K1000
 
M.LEPIS - Diploma Thesis (2004)
M.LEPIS - Diploma Thesis (2004)M.LEPIS - Diploma Thesis (2004)
M.LEPIS - Diploma Thesis (2004)
 
Lucia mancero 3
Lucia mancero 3Lucia mancero 3
Lucia mancero 3
 
New hampshire legacies power point final
New hampshire legacies power point finalNew hampshire legacies power point final
New hampshire legacies power point final
 
Contoh kasus
Contoh kasusContoh kasus
Contoh kasus
 
Douglas Gauld3
Douglas Gauld3Douglas Gauld3
Douglas Gauld3
 
Bangladesh labor law
Bangladesh labor lawBangladesh labor law
Bangladesh labor law
 
Documento Académico
Documento AcadémicoDocumento Académico
Documento Académico
 
2014_WQR
2014_WQR2014_WQR
2014_WQR
 
FACQUA-PRESENTATION
FACQUA-PRESENTATIONFACQUA-PRESENTATION
FACQUA-PRESENTATION
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Diktatorerna skriver historia
Diktatorerna skriver historiaDiktatorerna skriver historia
Diktatorerna skriver historia
 
GCresume
GCresumeGCresume
GCresume
 
Distrix_Software_Defined_Infrastructure_White_Paper
Distrix_Software_Defined_Infrastructure_White_PaperDistrix_Software_Defined_Infrastructure_White_Paper
Distrix_Software_Defined_Infrastructure_White_Paper
 

Similar to Dr queries

Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guideAmit87_dba
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlMoeen_uddin
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby databaseJorge Batista
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentationVimlendu Kumar
 
Technical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques NadeauTechnical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques NadeauMapR Technologies
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in DataguardJason Arneil
 
Data guard logical_r3.1
Data guard logical_r3.1Data guard logical_r3.1
Data guard logical_r3.1Ram Naani
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Featuresxiangrong
 
Leo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 DaysLeo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 DaysLéopold Gault
 
Tips
TipsTips
Tipsmclee
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12cuzzal basak
 
Kyle Hailey Oracle Performance IO Waits
Kyle Hailey  Oracle Performance IO WaitsKyle Hailey  Oracle Performance IO Waits
Kyle Hailey Oracle Performance IO Waitscookie1969
 
Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940gopalchsamanta
 
Standby db creation commands
Standby db creation commandsStandby db creation commands
Standby db creation commandsPiyush Kumar
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradationinfluxbob
 
Exadata - BULK DATA LOAD Testing on Database Machine
Exadata - BULK DATA LOAD Testing on Database Machine Exadata - BULK DATA LOAD Testing on Database Machine
Exadata - BULK DATA LOAD Testing on Database Machine Monowar Mukul
 
How to Replicate PostgreSQL Database
How to Replicate PostgreSQL DatabaseHow to Replicate PostgreSQL Database
How to Replicate PostgreSQL DatabaseSangJin Kang
 

Similar to Dr queries (20)

Oracle Data Guard
Oracle Data GuardOracle Data Guard
Oracle Data Guard
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guide
 
Rac nonrac clone
Rac nonrac cloneRac nonrac clone
Rac nonrac clone
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
 
Analysis of database tampering
Analysis of database tamperingAnalysis of database tampering
Analysis of database tampering
 
Technical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques NadeauTechnical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques Nadeau
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in Dataguard
 
Data guard logical_r3.1
Data guard logical_r3.1Data guard logical_r3.1
Data guard logical_r3.1
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
 
Leo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 DaysLeo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 Days
 
Tips
TipsTips
Tips
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
Kyle Hailey Oracle Performance IO Waits
Kyle Hailey  Oracle Performance IO WaitsKyle Hailey  Oracle Performance IO Waits
Kyle Hailey Oracle Performance IO Waits
 
Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940
 
Standby db creation commands
Standby db creation commandsStandby db creation commands
Standby db creation commands
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 
Exadata - BULK DATA LOAD Testing on Database Machine
Exadata - BULK DATA LOAD Testing on Database Machine Exadata - BULK DATA LOAD Testing on Database Machine
Exadata - BULK DATA LOAD Testing on Database Machine
 
How to Replicate PostgreSQL Database
How to Replicate PostgreSQL DatabaseHow to Replicate PostgreSQL Database
How to Replicate PostgreSQL Database
 

Dr queries

  • 1. Verify standby environment Physical standby database Count the existing archived logs n the standby database: select count(*) from v$archived_log; Then archive the current log on the primary database: Alter system archive log current; Then, count the archived logs on the standby database again. It should have been increased by one. Level of synchronization To see if there is a problem with the archiving destinations (such as that destination that transmits logs), query v$archive_dest_status. Select archived_thread#, archived_seq#, applied_thread#, applied_seq# from v$archive_dest_status; Show received logs On a physical standby database, the received archived redo logs can be displayed like this: Select registrar, creator, thread#, sequence#, first_change#, next_change# from v$archived_log; Show applied archived redo log select thread#, sequence#, first_change#, next_change# from v$log_history; Show messages Use v$dataguard_status to display messages. Dest_id refers to what is configured with log_archive_dest_n. select message from v$dataguard_status where dest_id = 2;
  • 2. The query was executed on the primary database, and it shows that the destination 2 cannot deliver its logs. ARCH: Error 12535 Creating archive log file to 'to_standby' ARCH: Error 12535 Creating archive log file to 'to_standby' ARCH: Error 12535 Creating archive log file to 'to_standby' Broken network connections: If the network connection is broken, the standby database writes RFS: Possible network disconnect with primary database. The primary database writes: Network asynch I/O wait error 3114 log 3 service 'to_standby'. Archived logs that are not transmitted The following query assumes that the archives are locally stored on destination 1 and sent to the remote server on destination 2. select substr(local.name,1,50) "Archive Name", case when remote.sequence# is null then 'NOT TRANSMITTED' else 'transmitted' end, local.sequence#, local.thread# from (select * from v$archived_log where dest_id = 1) local left join (select * from v$archived_log where dest_id = 2) remote on local.sequence# = remote.sequence# and local.thread# = remote.thread# order by local.sequence#; Is standby database performing managed recovery Select process, status from v$managed_standby; If there is a MRP or a MRP0 process, the database is performing managed recovery. Monitoring the recovery process select process, status, thread#, sequence#, block#, blocks from v$managed_standby;
  • 3. alter database recover managed standby database disconnect from session; alter database recover managed standby database cancel; alter system set log_archive_dest_state_2=defer;