search
HomeDatabaseMysql TutorialOracle 10g 一主多备的搭建技巧

在Oracle数据库环境中,一主一备是比较传统的使用方式,在灾难发生的时候,可以灵活的切换主备角色,依然可以保持服务的可访问性

在Oracle数据库环境中,一主一备是比较传统的使用方式,在灾难发生的时候,可以灵活的切换主备角色,依然可以保持服务的可访问性。但是一些核心系统来说还是会有更多的过滤,一主一备似乎还是不够稳妥,如果主备出现问题,如果有另外一个备库还是有可选的余地,这种情况不是不可能发生,正是因为核心业务的需要还是需要保证数据的安全。

很多场景下,一主两备会保持这样的场景,一主一备在同一个区域内,这样在出现问题的时候方便切换,如果区域出现故障,可以保证异地的机房可以顺利承接服务。

比如下面的这种方式是比较传统的一主一备的方式。因为是在10g的环境中,所以备库还是Mount,不能open在线接收数据变更。

Oracle 10g 一主多备的搭建技巧

在这种结构下,如果根据需要去添加另外一个备库节点,就需要考虑到一些负载的因素。毕竟我们不希望主库有很多的数据文件复制工作,尽管duplicate特性还是比较方便的。

这个时候我们可以只动用备库导出响应的备份数据来。如果这个时候主库出现问题,可以随时终止rman备份,直接切换环境。

[img][/img]

当然利用备库导出rman dump,在另外一个备库来做恢复,如果文件路径等等存在偏差,或者限于dump的大小和磁盘空间,可能会把dump放在不同的路径下,就可以直接设定catalog来恢复。

大体的四个步骤如下面的蓝色方框所示。这个时候主库和备库之间还是没有任何的直接关联,所以从这个地方,也把主库的负载降到了最低。

Oracle 10g 一主多备的搭建技巧

数据库恢复之后,这就是一个新的备库,我们可以通过dg broker来建立和主库的关联关系。这个时候回在三个节点间进行一些配置信息的同步,过程还是比较快的。

Oracle 10g 一主多备的搭建技巧

就这样,一主两备的环境就搭建好了。

其实我们还可以这么思考,把switchover的场景和failover都结合起来,如果在switchover出现失败的情况下,我们可以动用第二个备库来做failover.

怎么理解呢,switchover在一些外部因素的作用下还是可能会失败,比如在10g版本中,,我们把备库启动到了read only状态,结果数据变更都会延迟,如果延迟够大,rman配置可能会把一些历史的归档给删除掉,尽管RFS把归档传到了备库,但是MRP还没有开始工作,所以备库中的归档还没有使用到。这个时候主库奔溃,那个read only的备库做switchover就很可能失败。

这个时候我们还是保证另外一个备库在mount状态,我们可以直接做failover

Oracle 10g 一主多备的搭建技巧

本文永久更新链接地址

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools