You are on page 1of 2

select recovery_mode from v$archive_dest_status;

select sequence#,applied from v$archived_log order by sequence#;


select sequence#,first_time,next_time from v$archived_log order by sequence#;
alter session set nls_date_format='YYYY-MON-DD HH24:MI:SS';
alter database recover managed standby database cancel;
select sequence#,archived,applied from v$archived_log;
select process,status from v$managed_standby;
select dest_id,valid_type,valid_role,valid_now from gv$archive_dest;
rman target sys/sys@proda auxiliary /
alter database recover managed standby database using current logfile disconnect
from session;
alter database add standby logfile group 4 'c:\oracle\product\10.2.0\oradata\pro
da\redo4s.log' size 4m;
alter database recover managed standby database disconnect from session;
alter database recover managed standby database nodelay;

select process, status,sequence#,block#,blocks, delay_mins from v$managed_standb


y;

-------------
The following example shows how to configure the maximum availability mode:
-------------
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=chicago
2> OPTIONAL LGWR SYNC AFFIRM
3> VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
4> DB_UNIQUE_NAME=chicago';

-------------
SQL Statments:
-------------
SELECT inst_id, open_resetlogs, open_mode, protection_mode, protection_level
FROM v$database;
SELECT inst_id, remote_archive, activation#, switchover#, database_role
FROM v$database;
SELECT inst_id, archivelog_compression, switchover_status, dataguard_broker, gua
rd_status
FROM v$database;
SELECT inst_id, supplemental_log_data_min, supplemental_log_data_pk, supplementa
l_log_data_ui, supplemental_log_data_fk, supplemental_log_data_all, force_loggin
g
FROM v$database;
col name format a20
col db_unique_name format a20
SELECT inst_id, current_scn, db_unique_name, name, standby_became_primary_scn
FROM v$database;
col fs_failover_observer_host format a20
SELECT fs_failover_status, fs_failover_current_target, fs_failover_observer_pres
ent, fs_failover_observer_host
FROM v$database;

--------------
Start Active Data Guard
--------------
-- on the physical standby stop the recovery process
alter database recover managed standby database cancel;
-- open the database in read-only mode
alter database open read only;
-- restart managed recovery
alter database recover managed standby database disconnect;
SELECT inst_id, open_resetlogs, open_mode, protection_mode, protection_level
FROM v$database;
SELECT inst_id, remote_archive, activation#, switchover#, database_role
FROM v$database;
SELECT inst_id, archivelog_compression, switchover_status, dataguard_broker, gua
rd_status
FROM v$database;
SELECT fs_failover_status, fs_failover_current_target, fs_failover_observer_pres
ent, fs_failover_observer_host
FROM v$database;

You might also like