Home Database Mysql Tutorial Oracle 双机热备:Oracle dataguard 和Oracle rac的区别和联系

Oracle 双机热备:Oracle dataguard 和Oracle rac的区别和联系

Jun 07, 2016 pm 04:46 PM

Data Guard 是Oracle的远程复制技术,它有物理和逻辑之分,但是总的来说,它需要在异地有一套独立的系统,这是两套硬件配置可以不

Data Guard 是Oracle的远程复制技术,它有物理和逻辑之分,但是总的来说,它需要在异地有一套独立的系统,这是两套硬件配置可以不同的系统,但是这两套系统的软件结构保持一致,包括软件的版本,目录存储结构,以及数据的同步(其实也不是实时同步的),这两套系统之间只要网络是通的就可以了,是一种异地容灾的解决方案。而对于RAC,则是本地的高可用集群,每个节点用来分担不用或相同的应用,以解决运算效率低下,单节点故障这样的问题,它是几台硬件相同或不相同的服务器,加一个SAN(共享的存储区域)来构成的。

相关阅读:Oracle listener 详解(“DEDICATED” established:0 refused:0)

Data Guard由两个多两个以上的独立的数据库构成,他们各自有各自的存储,Oracle负责他们之间的切换和数据同步
双机热备由两台计算机和一个共享存储设备构成,通过第三方软件(HA Rose等)实现切换,不需要做数据同步

建议应用RAC+Dataguard ,RAC保证可用性,Dataguard在RAC组独立磁盘上和另外一台主机上,保证可靠性。

双机就是人们所说的双机热备,数据库放在共享设备上,同一时刻只能有一台主机接管,,另一台待用,这种方式只能保护实例,不能保护db,而且备机长期处于闲置,对资源是一种极大的浪费!

如果原本是双机,建议转换为RAC
规划好应用,DML操作从一个节点跑,查询操作从另一个节点跑,通常不需要太多调优就可以利用闲置的另外一台机器了

RAC服务器共用一套存储,同时提供服务,没有主备之分.宕一个其它的可以继续服务.
双机热备,共用一套存储,一个提供服务一个备份,主机宕了切换到备份服务器提供服务.
data guard 完全两套系统,存储是单独的,用日志同步.

RAC: 实例层冗余
DG :数据库层冗余
热备:仅仅只是数据冗余

个人理解:
RAC :实例冗余,而且还可以做到数据库的loadbalance。
DG :多份数据,所以能做到数据冗余,但是只有主节点提供服务。
热备:与RAC最大的差异可能就是RAC有多个实例,一个数据库。而热备只是一个实例,一个数据库。所以做不了并发和loadbalance。

Oracle RAC只是做Oracle的应用,rose,legato还可以做其它的

HA:是High Availability 的首字母组合,翻译过来,可以叫做高可用,或高可用性,高可用(环境)。我觉得应该说HA是一个观念而不是一项或一系列具体技术,就象网格一样。作过系统方案就知道了,评价系统的性能当中就有一项高可用。广义的高可用涉及到系统的各个方面,简单来说,让系统不会中断 运行,就是高可用。包括软件的高可用,硬件的高可用,网络的高可用等等。具体实现的方案包括操作系统的集群,数据库的集群,硬件的冗余,网络的冗余等等。做HA方面的软件,有IBM的HACMP(很多常用AIX的人,常说的HA就指HACMP,乱啊)、SUN的Sun Cluster、HP的MC/SG等。

在2000年以前,大家谈HA,大部分时候说的是操作系统一级的双机热备,主流产品当时有IBM HACMP4.1,HP的MC/SG啥版本忘了,sun的系统很多人不用VCS,用的是一个叫dataware的东西。现在很多人眼中的HA也还是这样。时至今日,HA包括的东西可就多了,先不说其他方面,单就数据库,单就Oracle,与HA相关的产品先后有:高级复制(AdvanceRepication)、OPS/RAC(Real Application Cluster)、数据卫士(Data Guard)、oracle流(Oracle Streams)、分区(Oracle Partition)这样数款产品。照这么说,RAC只是HA这个概念下的一个具体产品而已!目前为止,只有RAC和分区是Oracle要收取licence的,其他的,只要给经验丰富的第三方实施方付一定的规划/设计及部署费用就可以了;当然,也可以自己照着文档依葫芦画瓢,但是这样弄出的环境是否能达到高可用就难说了。事实上,大部分人所说的HA,还是狭义上的HA,也就是OS一级的双机热备。

RAC:是real application cluster的简称,它是在多个主机上运行一个数据库的技术,即是一个db多个instance。它的好处是 可以由多个性能较差的机器构建出一个整体性能很好的集群,并且实现了负载均衡,那么当一个节点出现故障时,其上的服务会自动转到另外的节点去执行,用户甚 至感觉不到什么。

双机热备(HA)和RAC有啥区别呢?

1、对于硬件来说,基本上一样,共享存储、光纤线(也有还用SCSI线的)、多台小型机(可以做多节点的相互热备,也可以做多节点的RAC)、光纤交换机(如果是用光纤卡的话);但做RAC,在主机之间,最好使用高带宽网络交换机(虽然不用也可以做成);因此硬件成本相差不大。
2、软件呢,差别可不小。如果是双机热备,必须买操作系统级的双机管理软件;如果是RAC,目前还是建议购买双机管理软件(尽管10g的crs+asm可以摆脱双机软件了,但ASM目前实在太难伺候了),当然还得买RAC license。
3、日常维护。RAC要求的技术含量更高,也应该更勤快。最关键的是得买oracle服务,否则遇到有些问题(bug),你就比单机还不高可用了。
4、优缺点。这个,看看RAC的官方论述吧。如果能用好,确实是很有好处的。目前我们的40多个客户的使用情况来看,RAC确实大大降低了他们的downtime,另一方面可以说就是提高了生产力咯。

Dataguard:一般是出于容灾的目的。是主数据库的备用库(standby 库)通过自动传送和接受archivelog,并且在dataguard库自动apply 这些log,从而达到和主数据库同步的目的,可能dataguard 库是建立的异地的,当主库所在的区域出现了致命性的灾难时(火灾、地震等),主库没法修复时,这时可以切换dataguard 为主库的模式,对外提供服务,而它的数据基本是当前最新的。目前可能大家对于 dataguard 库的使用已经拓展出了其他更多的用途,比如备份,跑报表等等。

linux

Statement of this Website
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

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

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
MySQL's Role: Databases in Web Applications MySQL's Role: Databases in Web Applications Apr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Explain the role of InnoDB redo logs and undo logs. Explain the role of InnoDB redo logs and undo logs. Apr 15, 2025 am 12:16 AM

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL's Place: Databases and Programming MySQL's Place: Databases and Programming Apr 13, 2025 am 12:18 AM

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

MySQL vs. Other Programming Languages: A Comparison MySQL vs. Other Programming Languages: A Comparison Apr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL: From Small Businesses to Large Enterprises MySQL: From Small Businesses to Large Enterprises Apr 13, 2025 am 12:17 AM

MySQL is suitable for small and large enterprises. 1) Small businesses can use MySQL for basic data management, such as storing customer information. 2) Large enterprises can use MySQL to process massive data and complex business logic to optimize query performance and transaction processing.

How does MySQL index cardinality affect query performance? How does MySQL index cardinality affect query performance? Apr 14, 2025 am 12:18 AM

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

See all articles