Data Guard
Showing the parameters
show parameter log_archive_dest
show parameter convert
show parameter config
show parameter fal
show parameter dg
Starting Redo Apply on Database Standby
sql> alter database recover managed standby database using current logfile
disconnect from session;
Stoping Redo Apply on Database Standby
sql> alter database recover managed standby database cancel;
Verifying that Redo Apply is working
SQL> select dest_ID, status, destination, error from v$archived_dest where dest_id
<=2;
SQL> select sequence#, first_time, next_time, applied, archived from
v$archived_log where name = 'DB02' order by first_time;
SQL> select status, gap_status from v$archive_dest_status where DEST_ID = 2;
SQL> select * from v$dataguard_status order by timestamp;
Archive difference between Received and Applied
set line 400
select arch.thread# "Thread", appl.first_time "LastSeqApp1sttime",appl.sequence# "Last Sequence Applied",
arch.first_time "LastSeqRec1sttime",arch.sequence# "Last Sequence Received",
(arch.sequence# - appl.sequence#) "DiffSeq", round((arch.first_time-appl.first_time)*1440) "DiffMins"
from
(select thread# ,sequence#,first_time from v$archived_log where
(thread#,first_time ) in (select thread#,max(first_time) from v$archived_log
group by thread#)) arch,
(select thread# ,sequence#,first_time from v$log_history where
(thread#,first_time ) in
(select thread#,max(first_time) from v$log_history group by thread#)) appl
where arch.thread# = appl.thread# order by 1;
Status of Archives
SELECT THREAD#,
SEQUENCE#, APPLIED, TO_CHAR(COMPLETION_TIME, 'DD-MON-YY , HH:MI:SS AM')
HORA FROM V$ARCHIVED_LOG WHERE (COMPLETION_TIME >= sysdate - 7)
order by THREAD#, SEQUENCE#, COMPLETION_TIME;
Gap
select * from v$archive_gap;
Types of standby database in oracle
select database_role from v$database;
Dataguard Config
select * from v$dataguard_config;
Open Mode
select open_mode from v$database;
Status of Data Guard
select message, TO_CHAR(TIMESTAMP, 'DD-MON-YY , HH:MI:SS AM') HORA from
v$dataguard_status;
Open Read Only
SQL> alter database open read only;
Status of Archives
SELECT THREAD#,
SEQUENCE#, APPLIED, TO_CHAR(COMPLETION_TIME, 'DD-MON-YY , HH:MI:SS AM')
HORA FROM V$ARCHIVED_LOG WHERE (COMPLETION_TIME >= sysdate - 7)
order by THREAD#, SEQUENCE#, COMPLETION_TIME;
Gap
select * from v$archive_gap;
Types of standby database in oracle
select database_role from v$database;
select * from v$dataguard_config;
Open Mode
select open_mode from v$database;
select message, TO_CHAR(TIMESTAMP, 'DD-MON-YY , HH:MI:SS AM') HORA from
v$dataguard_status;