zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

Create a Primary and Standby Database in the Cloud

DatabaseCloud in The and create Standby PRIMARY
2023-09-11 14:20:31 时间

编辑手记:海外专家联合出品,开启你的数据库云端之旅!第一步,在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

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

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.

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


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


我们在讲的 Database Plus,到底能解决什么样的问题? 一直以来,大一统还是碎片化,是数据库发展趋势的两种最主流预测。随着数字化进程的推进,单一场景无法满足应用多样化的需求,数据库碎片化已呈不可逆的趋势。在当前,市场占有率最高的商用数据库—— Oracle 并没有明显短板的情况下,各种全新的数据库依旧如雨后春笋般层出不穷。如今,DB-Engines 上已有超过 300 余种数据库参与排名。