Create a Primary and Standby Database in the Cloud

简介:

编辑手记:海外专家联合出品,开启你的数据库云端之旅!第一步,在Oracle 云上搭建专家的环境。本期话题围绕“创建standby数据库展开”。

前文回顾:

Configure and Practice Backup and Recovery in Cloud


1作者简介

Joel Perez:Oracle ACE总监, Maximum Availability OCM,OTN 专家,全球第一批ACE称号获得者,致力于数据库高可用、灾难恢复、升级迁移和数据复制等方向设计和实现解决方案。

Kamran Aghayev :Oracle ACE总监,OCM、OCCE、RAC实施专家。在AzerCell Telecom LLC担任DBA团队主管。出版书籍《Expert secrets for using RMAN and Data Pump》、《Oracle Certified Master 11G Exam Guide


640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy


Inthis guide, I will show you how to create a primary and standby database in thecloud.

这篇文章主要内容是如何在云上创建主-备数据库。


1

创建primary-standby数据库

Login to your cloud account, switch tothe Oracle Database Cloud Service page and create a new service. Select “OracleDatabase Cloud Service” as a subscription type and click Next.

登录云账号,跳转到Oracle Database Cloud Service页面,创建一个新服务。选择OracleDatabase Cloud Service作为订阅类型,然后点击下一步。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Select a database release and click Next.

选择数据库版本,并点击下一步。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Select “Enterprise Edition – ExtremePerformance” as a Software Edition and click Next

软件版本选择“Enterprise Edition – Extreme Performance”,点击下一步

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Provide the service name, SSH public keyand select “Standby Database with Data Guard” option, select “HighAvailability” and click Next

填写服务名,SSH公钥,然后选择“Standby Database with Data Guard”“ High Availability”选项,然后点击下一步。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Reviewthe configuration settings and click Create to create a primary and a standby database

预览配置并确认创建。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Aftera few minutes the primary and standby database will be created successfully

几分钟就可以创建成功

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Clickon the service name (srvdg) to open the home page of both databases

点击服务名(我这里设置的是srvdg),然后打开新建的主备数据库的首页。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Nowopen two different Putty executables and connect to the both machines

打开不同的Putty可执行文件,分别连接到两台机器。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Connect to the both databases and checkthe DB_UNIQUE_NAME parameter. PRODDB_01 is set to the primary database,PRODDB_02 for the standby database. Also checkLOG_ARCHIVE_DEST_2 parameter onthe primary database. As you see, archived log files are shipped to the standbydatabase using PRODDB_02 service.

分别连接到两个数据库,检查DB_UNIQUE_NAME参数,其中PRODDB_01是primary库,PRODDB_02是standby库。查看primary库上的LOG_ARCHIVE_DEST_2参数,你可以看到,归档日志通过PRODDB_02的服务传输到standby数据库。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


2

验证primary-standby的功能

Now let’s test the functionality of thestandby database. First of all, open an alert.log file of the standby database,switch the log file on the primary database and check if the log file isapplied

接下来,我们来验证standby数据库的功能,首先打开standby数据库的alert日志,在primary库上做一次日志切换,观察日志是否本正常应用。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Nowperform a switchover

现在执行一次switchover

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Switch the log file and see if it isapplied to the new standby database

在新的primary库上执行一次日志切换,观察在standby库上是否正常应用。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


It worked. Now switch back

如图所示,应用成功。然后将primarystandby的角色切换回来。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


As you see, it’s very easy to create adatabase with its own standby database in the cloud!

 以上就是在云上创建standby库的过程,非常简便快捷。


We hope this article can be helpful foryou and see us on next article.

希望以上内容对你有帮助。


文章转自数据和云公众号,原文链接

相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
11月前
|
数据库
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
115 0
|
11月前
|
存储 Oracle 关系型数据库
|
SQL 数据库
CREATE DATABASE 语句
CREATE DATABASE 语句
100 1
|
存储 SQL 关系型数据库
开发指南—DDL语句—分库分表语法—CREATE DATABASE
CREATE DATABASE语句用于创建数据库,并可以指定数据库的默认属性(如数据库默认字符集,校验规则等)。
121 0
|
存储 SQL 关系型数据库
开发指南—DDL语句—分区表语法—CREATE DATABASE
CREATE DATABASE语句用于创建数据库,并可以指定数据库的默认属性(如数据库默认字符集,校验规则等)。
111 0
|
存储 SQL 关系型数据库
开发指南—DDL语句—分区表语法—CREATE DATABASE
CREATE DATABASE语句用于创建数据库,并可以指定数据库的默认属性(如数据库默认字符集,校验规则等)。
|
存储 SQL 关系型数据库
开发指南—DDL语句—分库分表语法—CREATE DATABASE
CREATE DATABASE语句用于创建数据库,并可以指定数据库的默认属性(如数据库默认字符集,校验规则等)。
|
Java 关系型数据库 MySQL
报错:java.sql.SQLNonTransientConnectionException: Could not create connection to database server
报错:java.sql.SQLNonTransientConnectionException: Could not create connection to database server
1641 0
报错:java.sql.SQLNonTransientConnectionException: Could not create connection to database server
|
关系型数据库 MySQL 数据库
Idea 连接数据库出错Connection to xxx@localhost failed. [08001] Could not create connection to database
Idea 连接数据库出错Connection to xxx@localhost failed. [08001] Could not create connection to database
286 0
Idea 连接数据库出错Connection to xxx@localhost failed. [08001] Could not create connection to database
|
存储 关系型数据库 MySQL
开发指南—DDL语句—分区表语法—CREATE DATABASE
CREATE DATABASE语句用于创建数据库,并可以指定数据库的默认属性(如数据库默认字符集,校验规则等)。

热门文章

最新文章