1 Starting Redo Apply To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement. You
1 Starting Redo Apply
To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement.
You can specify that Redo Apply runs as a foreground session or as abackground process, and enable it with real-time apply.
-
To start Redo Apply in the foreground, issue the following SQL statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;
- If you start a foreground session, control is not returned to the command prompt until recovery is canceled by another session.
-
To start Redo Apply in the background, include the DISCONNECT keyword on the SQL statement. For example:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
alterdatabase recover managed standby database disconnect from session;
- This statement starts a detached server process and immediately returns control to the user. While the managed recovery process is performing recovery in the background, the foreground process that issued the RECOVER statement can continue performing other tasks. This does not disconnect the current SQL session.
-
To start real-time apply, include the USING CURRENT LOGFILE clause on the SQL statement. For example:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;
alterdatabase recover managed standby database using current logfile disconnect fromsession;
2 Stopping Redo Apply
To stop Redo Apply, issue the following SQL statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
3 Advanced Configuration
3.1 Using Real-Time Apply to ApplyRedo Data Immediately
If the real-time apply feature is enabled, apply services can applyredo data as it is received, without waiting for the current standby redo logfile to be archived. This results in faster switchover and failover timesbecause the standby redo log files have been applied already to the standbydatabase by the time the failover or switchover begins.
Use the ALTER DATABASE statement to enable the real-time applyfeature, as follows:
- For physical standby databases, issue the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE statement.
- For logical standby databases, issue the ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE statement.
Real-time apply requires a standbydatabase that is configured with a standby redo log and that is in ARCHIVELOGmode.
The figure belowshowsa Data Guard configuration with a local destination and a standby destination.As the remote file server (RFS) process writes the redo data to standby redolog files on the standby database, apply services can recover redo from standbyredo log files as they are being filled.
3.2 Specifying a Time Delay for theApplication of Archived Redo Log Files
In some cases, you may want to create a time lag between the timewhen redo data is received from the primary site and when it is applied to thestandby database. You can specify a time interval (in minutes) to protectagainst the application of corrupted or erroneous data to the standby database.When you set a DELAY interval, it does not delay the transport of the redo datato the standby database. Instead, the time lag you specify begins when the redodata is completely archived at the standby destination.
Note:
If you define a delay for a destination that has real-time applyenabled, the delay is ignored.
Specifying a Time Delay
You can set a time delay on primary and standby databases using theDELAY=minutes attribute of theLOG_ARCHIVE_DEST_n initializationparameter to delay applying archived redo log files to the standby database. Bydefault, there is no time delay. If you specify the DELAY attribute withoutspecifying a value, then the default delay interval is 30 minutes.
Canceling a Time Delay
You can cancel a specified delay interval as follows:
-
For physical standby databases, use the NODELAY keyword of the RECOVER MANAGED STANDBY DATABASE clause:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY; -
For logical standby databases, specify the following SQL statement:
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY NODELAY;
These commands result in apply services immediately beginning toapply archived redo log files to the standby database, before the time intervalexpires.
Using Flashback Database as anAlternative to Setting a Time Delay
As an alternative to setting an apply delay, you can use FlashbackDatabase to recover from the application of corrupted or erroneous data to thestandby database. Flashback Database can quickly and easily flash back astandby database to an arbitrary point in time.
作者:xiangsir
QQ:444367417
MSN:xiangsir@hotmail.com

MySQL Index Cardinality는 쿼리 성능에 중대한 영향을 미칩니다. 1. 높은 카디널리티 인덱스는 데이터 범위를보다 효과적으로 좁히고 쿼리 효율성을 향상시킬 수 있습니다. 2. 낮은 카디널리티 인덱스는 전체 테이블 스캔으로 이어질 수 있으며 쿼리 성능을 줄일 수 있습니다. 3. 관절 지수에서는 쿼리를 최적화하기 위해 높은 카디널리티 시퀀스를 앞에 놓아야합니다.

MySQL 학습 경로에는 기본 지식, 핵심 개념, 사용 예제 및 최적화 기술이 포함됩니다. 1) 테이블, 행, 열 및 SQL 쿼리와 같은 기본 개념을 이해합니다. 2) MySQL의 정의, 작업 원칙 및 장점을 배우십시오. 3) 인덱스 및 저장 절차와 같은 기본 CRUD 작업 및 고급 사용량을 마스터합니다. 4) 인덱스의 합리적 사용 및 최적화 쿼리와 같은 일반적인 오류 디버깅 및 성능 최적화 제안에 익숙합니다. 이 단계를 통해 MySQL의 사용 및 최적화를 완전히 파악할 수 있습니다.

MySQL의 실제 응용 프로그램에는 기본 데이터베이스 설계 및 복잡한 쿼리 최적화가 포함됩니다. 1) 기본 사용 : 사용자 정보 삽입, 쿼리, 업데이트 및 삭제와 같은 사용자 데이터를 저장하고 관리하는 데 사용됩니다. 2) 고급 사용 : 전자 상거래 플랫폼의 주문 및 재고 관리와 같은 복잡한 비즈니스 로직을 처리합니다. 3) 성능 최적화 : 인덱스, 파티션 테이블 및 쿼리 캐시를 사용하여 합리적으로 성능을 향상시킵니다.

MySQL의 SQL 명령은 DDL, DML, DQL 및 DCL과 같은 범주로 나눌 수 있으며 데이터베이스 및 테이블을 작성, 수정, 삭제, 삽입, 업데이트, 데이터 삭제 및 복잡한 쿼리 작업을 수행하는 데 사용됩니다. 1. 기본 사용에는 CreateTable 생성 테이블, InsertInto 삽입 데이터 및 쿼리 데이터 선택이 포함됩니다. 2. 고급 사용에는 테이블 조인, 하위 쿼리 및 데이터 집계에 대한 GroupBy 조인이 포함됩니다. 3. 구문 검사, 데이터 유형 변환 및 권한 관리를 통해 구문 오류, 데이터 유형 불일치 및 권한 문제와 같은 일반적인 오류를 디버깅 할 수 있습니다. 4. 성능 최적화 제안에는 인덱스 사용, 전체 테이블 스캔 피하기, 조인 작업 최적화 및 트랜잭션을 사용하여 데이터 일관성을 보장하는 것이 포함됩니다.

Innodb는 잠금 장치 및 MVCC를 통한 Undolog, 일관성 및 분리를 통해 원자력을 달성하고, Redolog를 통한 지속성을 달성합니다. 1) 원자력 : Undolog를 사용하여 원래 데이터를 기록하여 트랜잭션을 롤백 할 수 있는지 확인하십시오. 2) 일관성 : 행 수준 잠금 및 MVCC를 통한 데이터 일관성을 보장합니다. 3) 격리 : 다중 격리 수준을지지하고 반복적 인 방사선이 기본적으로 사용됩니다. 4) 지속성 : Redolog를 사용하여 수정을 기록하여 데이터가 오랫동안 저장되도록하십시오.

데이터베이스 및 프로그래밍에서 MySQL의 위치는 매우 중요합니다. 다양한 응용 프로그램 시나리오에서 널리 사용되는 오픈 소스 관계형 데이터베이스 관리 시스템입니다. 1) MySQL은 웹, 모바일 및 엔터프라이즈 레벨 시스템을 지원하는 효율적인 데이터 저장, 조직 및 검색 기능을 제공합니다. 2) 클라이언트 서버 아키텍처를 사용하고 여러 스토리지 엔진 및 인덱스 최적화를 지원합니다. 3) 기본 사용에는 테이블 작성 및 데이터 삽입이 포함되며 고급 사용에는 다중 테이블 조인 및 복잡한 쿼리가 포함됩니다. 4) SQL 구문 오류 및 성능 문제와 같은 자주 묻는 질문은 설명 명령 및 느린 쿼리 로그를 통해 디버깅 할 수 있습니다. 5) 성능 최적화 방법에는 인덱스의 합리적인 사용, 최적화 된 쿼리 및 캐시 사용이 포함됩니다. 모범 사례에는 거래 사용 및 준비된 체계가 포함됩니다

MySQL은 소규모 및 대기업에 적합합니다. 1) 소기업은 고객 정보 저장과 같은 기본 데이터 관리에 MySQL을 사용할 수 있습니다. 2) 대기업은 MySQL을 사용하여 대규모 데이터 및 복잡한 비즈니스 로직을 처리하여 쿼리 성능 및 트랜잭션 처리를 최적화 할 수 있습니다.

InnoDB는 팬텀 읽기를 차세대 점화 메커니즘을 통해 효과적으로 방지합니다. 1) Next-Keylocking은 Row Lock과 Gap Lock을 결합하여 레코드와 간격을 잠그기 위해 새로운 레코드가 삽입되지 않도록합니다. 2) 실제 응용 분야에서 쿼리를 최적화하고 격리 수준을 조정함으로써 잠금 경쟁을 줄이고 동시성 성능을 향상시킬 수 있습니다.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

SublimeText3 Linux 새 버전
SublimeText3 Linux 최신 버전

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

ZendStudio 13.5.1 맥
강력한 PHP 통합 개발 환경

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음
