Step by step guide – create a primary and standby database in the Cloud
作者简介:
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》
In this guide, I will show you how to create a primary and standby database in the cloud. Login to your cloud account, switch to the Oracle Database Cloud Service page and create a new service. Select “Oracle Database 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 – Extreme Performance” as a Software Edition and click Next
软件版本选择“Enterprise Edition – Extreme Performance”,点击下一步
Provide the service name, SSH public key and select “Standby Database with Data Guard” option, select “High Availability” and click Next
填写服务名,SSH公钥,然后选择“Standby Database with Data Guard”“ High Availability”选项,然后点击下一步。
Review the configuration settings and click Create to create a primary and a standby database
预览配置并确认创建。
After a few minutes the primary and standby database will be created successfully
几分钟就可以创建成功
Click on the service name (srvdg) to open the home page of both databases
点击服务名(我这里设置的是srvdg),然后打开新建的主备数据库的首页。
Now open two different Putty executables and connect to the both machines
打开不同的Putty可执行文件,分别连接到两台机器。
Connect to the both databases and check the DB_UNIQUE_NAME parameter. PRODDB_01 is set to the primary database, PRODDB_02 for the standby database. Also check LOG_ARCHIVE_DEST_2 parameter on the primary database. As you see, archived log files are shipped to the standby database using PRODDB_02 service.
分别连接到两个数据库,检查DB_UNIQUE_NAME参数,其中PRODDB_01是primary库,PRODDB_02是standby库。查看primary库上的LOG_ARCHIVE_DEST_2参数,你可以看到,归档日志通过PRODDB_02的服务传输到standby数据库。
Now let’s test the functionality of the standby 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 is applied
接下来,我们来验证standby数据库的功能,首先打开standby数据库的alert日志,在primary库上做一次日志切换,观察日志是否本正常应用。
Now perform a switchover
现在执行一次switchover
Switch the log file and see if it is applied to the new standby database
在新的primary库上执行一次日志切换,观察在standby库上是否正常应用。
It worked. Now switch back
如图所示,应用成功。然后将primary和standby的角色切换回来。
As you see, it’s very easy to create a database with its own standby database in the cloud!We hope this article can be helpful for you and see us on next article.
以上就是在云上创建standby库的过程,非常简便快捷。希望以上内容对你有帮助。
Best Regards