编辑手记:海外专家联合出品,开启你的数据库云端之旅!第一步,在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》
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”作为订阅类型,然后点击下一步。
Select a database release and click Next.
选择数据库版本,并点击下一步。
Select “Enterprise Edition – ExtremePerformance” as a Software Edition and click Next
软件版本选择“Enterprise Edition – Extreme Performance”,点击下一步
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”选项,然后点击下一步。
Reviewthe configuration settings and click Create to create a primary and a standby database
预览配置并确认创建。
Aftera few minutes the primary and standby database will be created successfully
几分钟就可以创建成功
Clickon the service name (srvdg) to open the home page of both databases
点击服务名(我这里设置的是srvdg),然后打开新建的主备数据库的首页。
Nowopen two different Putty executables and connect to the both machines
打开不同的Putty可执行文件,分别连接到两台机器。
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数据库。
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库上做一次日志切换,观察日志是否本正常应用。
Nowperform a switchover
现在执行一次switchover
Switch the log file and see if it isapplied to the new standby database
在新的primary库上执行一次日志切换,观察在standby库上是否正常应用。
It worked. Now switch back
如图所示,应用成功。然后将primary和standby的角色切换回来。
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.
希望以上内容对你有帮助。
文章转自数据和云公众号,原文链接