SELECT * FROM GV$STANDBY_LOG order by 2
select * from GV$LOGSTDBY
--select * from V$ARCHIVED_LOG where dest_id = 1 order by 2 desc
select * from GV$LOGFILE order by group#
select * from GV$LOG order by 1,2
--select * from V$ARCHIVE_DEST
--SELECT TIMESTAMP, MESSAGE FROM V$DATAGUARD_STATUS;
--SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;
--ALTER SYSTEM SWITCH LOGFILE
--ALTER SYSTEM CHECKPOINT
ALTER DATABASE ADD LOGFILE THREAD 3 ('+DATA_ASM_DG') SIZE 300M;
ALTER DATABASE DROP LOGFILE GROUP 26;
ALTER DATABASE ADD LOGFILE GROUP 1 ('/u02/vs01/redo/RedoLog01B.log', '/u01/vs01/redo/RedoLog01A.log') SIZE 250M reuse;
ALTER DATABASE ADD LOGFILE GROUP 2 ('/u02/vs01/redo/RedoLog02B.log', '/u01/vs01/redo/RedoLog02A.log') SIZE 250M reuse;
ALTER DATABASE ADD LOGFILE GROUP 3 ('/u02/vs01/redo/RedoLog03B.log', '/u01/vs01/redo/RedoLog03A.log') SIZE 250M reuse;
ALTER DATABASE ADD LOGFILE GROUP 4 ('/u02/vs01/redo/RedoLog04B.log', '/u01/vs01/redo/RedoLog04A.log') SIZE 250M reuse;
ALTER DATABASE ADD LOGFILE GROUP 5 ('/u02/vs01/redo/RedoLog05B.log', '/u01/vs01/redo/RedoLog05A.log') SIZE 250M reuse;
ALTER DATABASE ADD LOGFILE GROUP 6 ('/u02/vs01/redo/RedoLog06B.log', '/u01/vs01/redo/RedoLog06A.log') SIZE 250M reuse;
ALTER DATABASE DROP LOGFILE GROUP 1;
ALTER DATABASE DROP LOGFILE GROUP 2;
ALTER DATABASE DROP LOGFILE GROUP 3;
ALTER DATABASE DROP LOGFILE GROUP 4;
ALTER DATABASE DROP LOGFILE GROUP 5;
ALTER DATABASE DROP LOGFILE GROUP 6;
--CRIA MAIS MEMBROS PARA OS GRUPOS DE REDO - CRIAR APÓS MIGRAÇÃO
/*
ALTER DATABASE ADD LOGFILE MEMBER '/u01/vs01/redo/RedoLog01B.log' TO GROUP 1;
ALTER DATABASE ADD LOGFILE MEMBER '/u01/vs01/redo/RedoLog02B.log' TO GROUP 2;
ALTER DATABASE ADD LOGFILE MEMBER '/u01/vs01/redo/RedoLog03B.log' TO GROUP 3;
ALTER DATABASE ADD LOGFILE MEMBER '/u01/vs01/redo/RedoLog04B.log' TO GROUP 4;
ALTER DATABASE ADD LOGFILE MEMBER '/u01/vs01/redo/RedoLog05B.log' TO GROUP 5;
*/
-- drop os standby redo logs
ALTER DATABASE DROP STANDBY LOGFILE GROUP 7;
ALTER DATABASE DROP STANDBY LOGFILE GROUP 8;
ALTER DATABASE DROP STANDBY LOGFILE GROUP 9;
ALTER DATABASE DROP STANDBY LOGFILE GROUP 10;
ALTER DATABASE DROP STANDBY LOGFILE GROUP 11;
-- Cria no dia da migração para fazer o standby
ALTER DATABASE ADD STANDBY LOGFILE GROUP 7 ('/u02/vs01/redo/stby_RedoLog07A.log') SIZE 250M reuse;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 8 ('/u02/vs01/redo/stby_RedoLog08A.log') SIZE 250M reuse;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 9 ('/u02/vs01/redo/stby_RedoLog09A.log') SIZE 250M reuse;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 10 ('/u02/vs01/redo/stby_RedoLog10A.log') SIZE 250M reuse;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 11 ('/u02/vs01/redo/stby_RedoLog11A.log') SIZE 250M reuse;
-- Criar logfle stby
ALTER DATABASE ADD STANDBY LOGFILE ('+DATA_ASM_DG') SIZE 300M;
ALTER DATABASE ADD STANDBY LOGFILE ('+DATA_ASM_DG') SIZE 300M;
ALTER DATABASE ADD STANDBY LOGFILE ('+DATA_ASM_DG') SIZE 300M;
ALTER DATABASE ADD STANDBY LOGFILE ('+DATA_ASM_DG') SIZE 300M;
ALTER DATABASE ADD STANDBY LOGFILE ('+DATA_ASM_DG') SIZE 300M;
ALTER DATABASE ADD STANDBY LOGFILE ('+DATA_ASM_DG') SIZE 300M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 3 ('+DATA_ASM_DG') SIZE 300M;