Oracle 11gR2 DataGuard环境BROKER配置Fast-Start Failover
FAST-START failover 就是在当主数据库出现故障时,能快速与可靠的把standby切换成主数据库,在整个过程中不需要人来干预。fast-
FAST-START failover 就是在当主数据库出现故障时,能快速与可靠的把standby切换成主数据库,在整个过程中不需要人来干预。fast-start failover只能通过dgmgrl与Enterprise Managerg来配置。
只有maximum availability mode or maximum performance mode才能启用fast-start failover模式。在maximum availability模式下面,在切换时可以保证无数据丢失,在maximum performance mode下面,会有数据丢失,丢失多少数据由 FastStartFailoverLagLimit这个参数来配置。
只要observer进程启动过,我们就不需要人为的干预。当observer与指定的备数据库与主数据库失去连接的时间超过FastStartFailoverThreshold后,,observer就会启动fast-start failover 到备数据库。如果配置了FastStartFailoverPmyShutdown为true,此时原来的主数据库将会自动的shutdown。如果配置FastStartFailoverAutoReinstate为true,当failover完成后,启动数据库时,会自动的执行Reinstate database,把原来的主数据库变成备库,并与新主库进行同步。
fast-start failover包含3个过程,如下图:
测试开始:
环境:OS RedHat 5.6 X86_64 ,DB 11.2.0.2
1,DG环境的搭建。
见Oracle 11GR2 搭建活动的物理DG/DataGuard (READ ONLY模式)
2,broker的配置
见
3,配置保护模式与日志传递方式
之前已经说了FAST-START FAILOVER只 maximum availability mode与maximum performance mode
下面我们看一下每一种保护模式对应的日志传递方式。
3.1修改保护模式:
3.2 修改日志传递方式
4 配置数据库的flashback
4.1 主库上面
4.2 备库上面
5 配置observer服务器
5.1 配置tnsnames.ora文件。
5.2 启动observer进程
6 配置fast-start failover
于fst-start failove相关的其它几个参数:
FastStartFailoverPmyShutdown
FastStartFailoverLagLimit
FastStartFailoverAutoReinstate
ObserverConnectIdentifier
这里我们都使用默认值;我们来看一下这些值的默认值;
7 启用fast-start failover
8.测试FAST-START FAILOVER是否生效
Initiating Fast-Start Failover to database "htz"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "htz"
19:03:13.24 Friday, September 07, 2012
Configuration - htz
Protection Mode: MaxAvailability
Databases:
htz - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
htzb - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
DGMGRL> connect sys/oracle@htzb
Connected.
DGMGRL> startup
ORACLE instance started.
Database mounted.
ORA-16649: possible failover to another database prevents this database from being opened
Connected.
DGMGRL> show configuration
Configuration - htz
Protection Mode: MaxAvailability
Databases:
htz - Primary database
htzb - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values and pointers to data rows, and is suitable for non-primary key column queries.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

MySQL supports four index types: B-Tree, Hash, Full-text, and Spatial. 1.B-Tree index is suitable for equal value search, range query and sorting. 2. Hash index is suitable for equal value searches, but does not support range query and sorting. 3. Full-text index is used for full-text search and is suitable for processing large amounts of text data. 4. Spatial index is used for geospatial data query and is suitable for GIS applications.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.
