Last applied log:
-------------------
SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
--- select thread#,sequence#,applied from v$archived_log where applied='NO';
Switching log in RAC environment:
--------------------------------
alter system archive log current;
MRP Process checking:
---------------------
select process,status,sequence# from v$managed_standby;
Archive applied history:
------------------------
SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
apllying redolog:
----------------
sql> alter database recover managed standby database using current logfile disconnect;
sql> alter database recover managed standby database disconnect from session;
ORA-01153: an incompatible media recovery is active
-----------------------------------------------------
first> alter database recover managed standby database cancel;
second> alter database recover managed standby database using current logfile disconnect;
disconect the redo apply:
------------------------
alter database recover managed standby database cancel;
to check all:
-------------
select name, db_unique_name,open_mode, database_role, protection_mode from v$database;
Applied log checking:
--------------------
select THREAD#,sequence# from v$archived_log where applied='YES';
select max(sequence#) from v$archived_log where applied='YES';
select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
Primary:
--------
select thread#, max(sequence#) "Last Primary Seq Generated"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
Standby:(Received)
------------------
select thread#, max(sequence#) "Last Standby Seq Received"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
Standby:(Applied)
----------------
select thread#, max(sequence#) "Last Standby Seq Applied"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
and val.applied in ('YES','IN-MEMORY')
group by thread# order by 1;
Switchover status:
----------------
select switchover_status from v$database;
General:
select sequence#,applied from v$archived_log;
select max(sequence#) from v$archived_log where applied='YES';
-------------------
SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
--- select thread#,sequence#,applied from v$archived_log where applied='NO';
Switching log in RAC environment:
--------------------------------
alter system archive log current;
MRP Process checking:
---------------------
select process,status,sequence# from v$managed_standby;
Archive applied history:
------------------------
SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
apllying redolog:
----------------
sql> alter database recover managed standby database using current logfile disconnect;
sql> alter database recover managed standby database disconnect from session;
ORA-01153: an incompatible media recovery is active
-----------------------------------------------------
first> alter database recover managed standby database cancel;
second> alter database recover managed standby database using current logfile disconnect;
disconect the redo apply:
------------------------
alter database recover managed standby database cancel;
to check all:
-------------
select name, db_unique_name,open_mode, database_role, protection_mode from v$database;
Applied log checking:
--------------------
select THREAD#,sequence# from v$archived_log where applied='YES';
select max(sequence#) from v$archived_log where applied='YES';
select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
Primary:
--------
select thread#, max(sequence#) "Last Primary Seq Generated"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
Standby:(Received)
------------------
select thread#, max(sequence#) "Last Standby Seq Received"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
Standby:(Applied)
----------------
select thread#, max(sequence#) "Last Standby Seq Applied"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
and val.applied in ('YES','IN-MEMORY')
group by thread# order by 1;
Switchover status:
----------------
select switchover_status from v$database;
General:
select sequence#,applied from v$archived_log;
select max(sequence#) from v$archived_log where applied='YES';
No comments:
Post a Comment