dg 일상 유지 보수
DG ---oracle DG dataguard
、DG
10g alter
/opt/app/oracle/admin/moe/bdump
/u01/app/oracle/product/10.2.0/db_1/rdbms/log
11g alter
cd /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert
/u01/app/oracle/diag/rdbms/orcl/orcl/trace
: show parameter dump
、standby logfile
log
SQL> select group#,thread#,bytes/1024/1024 M,status from v$log;
standby log
SQL> select group#,thread#,bytes/1024/1024 M,status,last_change#,last_time from v$standby_log;
: standby logfile log (rac ), , log 。
、 standby DG
SQL> select process,client_process,sequence#,status from v$managed_standby;
:
ARCH、MRPO RFS ;
RFS MRP , ARCH LNS;
MRPO
alter database recover managed standby database disconnect from session
SQL> select open_mode,current_scn from v$database;
SQL> select * from v$standby_log;
select process,client_process,sequence#,status,BLOCK#,BLOCKS,THREAD# from v$managed_standby;
、 dg
SQL> select GROUP#,DBID,STATUS,LAST_CHANGE#,BYTES,LAST_TIME from v$standby_log;
: rac, status ACTIVE;LAST_CHANGE# , ;
SQL> select max(sequence#) from v$archived_log;
、
1.
SQL> recover managed standby database using current logfile disconnect from session;
SQL> alter database recover managed standby database using current logfile disconnect;
: using current logfile , standby ;disconnect , , 。
2.
SQL> select database_role,protection_mode,protection_level,open_mode from v$database;
SQL> select process,client_process,sequence#,status from v$managed_standby;
*** redo
SQL> alter database recover managed standby database cancel;
***
SQL> alter database open read only;
mount
SQL> startup mount;
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
select message from v$dataguard_status;
3.1
alter system set log_archive_dest_state_2=DEFER;
3.2
alter system set log_archive_dest_state_2 = ENABLE;
select sequence#,applied from v$archived_log;
4. 、
select sequence#,status from v$log;
5. ,
select name,SEQUENCE#,APPLIED from v$archived_log order by sequence#;
select SEQUENCE#,FIRST_TIME,NEXT_TIME ,APPLIED from v$archived_log order by 2;
6.
alter database register logfile '/opt/oracle/archive_log/1_27293_750772439.log'
standby
、 standby :
SQL> alter database add standby logfile '/oradata/orcl/standby01.log' size 50m;
SQL> alter database add standby logfile '/oradata/orcl/standby02.log' size 50m;
SQL> alter database add standby logfile '/oradata/orcl/standby03.log' size 50m;
SQL> alter database add standby logfile '/oradata/orcl/standby04.log' size 50m;
alter database add standby logfile thread 1 group 10 ('/oradata/xqdb/standby10.log') size 50M;
alter database add standby logfile thread 2 group 14 ('/oradata/xqdb/standby14.log') size 50M;
Standby Redo log :
( mount )
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP 4;
standby :
select group#,thread#,sequence#,archived,status from v$standby_log;
DG ( )
SQL > select DEST_NAME , STATUS , RECOVERY_MODE from v$archive_dest_status;
:
recover_mode MANAGED REAL TIME APPLY ;
MANAGED 。
,
SQL> alter database recover managed standby database cancel;
SQL> alter database recover managed standby database using current logfile disconnect;
:using current logfile
11g , real time apply( ), using current logfile;
12c , real time apply, using archived log,using current logfile 。
using , 11g , real time apply, 12c real time apply。
, alter LAN:
:
SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
SELECT LOCAL.THREAD#, LOCAL.SEQUENCE# FROM (SELECT THREAD#, SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=1) LOCAL WHERE LOCAL.SEQUENCE# NOT IN
(SELECT SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND THREAD# = LOCAL.THREAD#);
、Oracle Data Guard
、 dg
1) STANDBY_FILE_MANAGEMENT=auto
create tablespace fei_2 datafile ‘/u01/oradata/first/fei_02.dbf’ size 1m;
,
2) STANDBY_FILE_MANAGEMENT=MANUAL
create tablespace fei_1 datafile ‘/u01/oradata/first/fei_01.dbf’ size 1m;
select name from v$datafile;–
alter database create datafile ‘/u01/oracle/dbs/UNNAMED00006′ as ‘/u01/oradata/first/fei_01.dbf’;
RECOVER MANAGED STANDBY DATABASE DISCONNECT;
、 dg
1) STANDBY_FILE_MANAGEMENT=auto
drop tablespace fei_1 including contents and datafiles;
,
2) STANDBY_FILE_MANAGEMENT=MANUAL
drop tablespace fei_1 including contents and datafiles;
rm /u01/oradata/first/fei_01.dbf
、
STANDBY_FILE_MANAGEMENT=auto/manual
1)ALTER TABLESPACE fei_02 OFFLINE;
2)!mv /u01/oradata/first/fei_02.dbf /u01/oradata/first/xifenfei.dbf
3) alter tablespace fei_2 rename datafile ‘/u01/oradata/first/fei_02.dbf’ to ‘/u01/oradata/first/xifenfei.dbf’;
4) alter tablespace fei_2 online;
1)shutdown immediate
2)startup mount
3)!mv /u01/oradata/first/fei_02.dbf /u01/oradata/first/xifenfei.dbf
4)alter system set standby_file_management=manual;– manual
5)alter database rename file ‘/u01/oradata/first/fei_02.dbf’ to ‘/u01/oradata/first/xifenfei.dbf’;
6)alter system set standby_file_management=auto;–
7)ALTER DATABASE OPEN;–11G
8)ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
————————————————
: CSDN 「debimeng」 , CC 4.0 BY-SA , 。
:https://blog.csdn.net/debimeng/article/details/79094157
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
activemq 5.5 의 입문 은 설치, 시작, 데이터베이스 지속 화 를 포함한다Apache ActiveMQ 5.5.0 은 주로 유지보수 버 전 으로 130 개가 넘 는 문 제 를 복 구 했 으 며 대부분 bug 와 개선 이 었 다. Improved performance for offline d...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.