Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Oracle Dataguard Important Command

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 02 Jan, 2020
  • 0 Comments
  • 1 Min Read

Oracle Dataguard Important Command

In this blog, We will look some important oracle dataguard command.Following command will be useful for dataguard administration

Check the Dataguard database status on primary and standby

select status,instance_name,database_role,protection_mode from v$database,v$instance;

Query to apply redo log on standby. Following command useful for real time apply

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE; 

To Start the MRP process using archive log

alter database recover managed standby database disconnect from session;

To check applied archieve logs

SELECT SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG;

Cancel the MRP Process

alter database recover managed standby database cancel;

Status of MRP Process

select process,status,client_process,thread#,sequence#,block#,blocks,delay_mins from v$managed_standby;

To get the difference between Received and applied logs.

select  MAX_RECEIVED,MAX_APPLIED,(MAX_RECEIVED - MAX_APPLIED) as "Difference" from (SELECT
ARCHIVED_THREAD#, MAX(ARCHIVED_SEQ#) as MAX_RECEIVED,
APPLIED_THREAD#, MAX(APPLIED_SEQ#) as MAX_APPLIED
FROM
V$ARCHIVE_DEST_STATUS) ARCH ;

 

To check the status of Archive log

col name for a50;
col thread# for a30;
col SEQUENCE# for a30;
select THREAD#,SEQUENCE#,name,APPLIED from v$ARCHIVED_LOG;

select THREAD#,SEQUENCE#,FIRST_TIME,NEXT_TIME,BLOCKS,BLOCK_SIZE,ARCHIVED,APPLIED,STATUS,IS_RECOVERY_DEST_FILE from v$ARCHIVED_LOG;

TO check if dataguard in synchronizing with standby.

select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;

Dataguard Error with timestamp

select message, to_char(timestamp,'HH:MI:SS') timestamp
from v$dataguard_status
where severity in ('Error','Fatal')
order by timestamp;

SELECT MESSAGE FROM V$DATAGUARD_STATUS;

select dest_name,status,error from v$archive_dest where status='ERROR';