Create a Primary and Standby Database in the Cloud
编辑手记:海外专家联合出品,开启你的数据库云端之旅!第一步,在Oracle 云上搭建专家的环境。本期话题围绕“创建standby数据库展开”。
前文回顾:
Configure and Practice Backup and Recovery in Cloud1作者简介
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.
希望以上内容对你有帮助。
文章转自数据和云公众号,原文链接
我们在讲的 Database Plus,到底能解决什么样的问题? 一直以来,大一统还是碎片化,是数据库发展趋势的两种最主流预测。随着数字化进程的推进,单一场景无法满足应用多样化的需求,数据库碎片化已呈不可逆的趋势。在当前,市场占有率最高的商用数据库—— Oracle 并没有明显短板的情况下,各种全新的数据库依旧如雨后春笋般层出不穷。如今,DB-Engines 上已有超过 300 余种数据库参与排名。
相关文章
- EF中Database.SqlQuery
- RESTORE detected an error on page (0:0) in database
- Database 'xxxx' is being recovered. Waiting until recovery is finished.
- [Docker] Link the Java application and database Docker containers
- Database Crash With ORA-27063 and OS Error: 5: I/O Error
- 【Oracle 集群】ORACLE DATABASE 11G RAC 知识图文详细教程之RAC 特殊问题和实战经验(五)
- [Go] Golang defer 与 MySQL 连接关闭的陷阱 (database is closed)
- Atitti 类库 开发者 常用 api 目录 1.1. Meta anno注解元数据api1 1.2. Ref 反射api1 1.3. Database meta api1 1.4.
- Database之SQL:SQL在线编程、工作中常用SQL代码实践(以语法为导向的增、删、改、查,已基本涵盖所有语法案例)之详细攻略
- Database之SQLSever:SQLSever数据表管理(GUI法/SQL语句命令法两种方法实现建立表、修改表,以及增、删、改、查)之详细攻略
- Database:五大数据库类型的简介(NDBMS/HDBMS/OODBMS/RDBMS/NoSQL)、两大主流数据库对比—关系型数据库VS非关系型数据库(存储方式/存储结构/存储规范等)之详细攻略
- Go组件学习——database/sql数据库连接池你用对了吗
- MySQL出现Ignoring query to other database的问题
- Cloud: cloud-init: 总结
- MySQL创建数据库(CREATE DATABASE语句)
- [ Azure - Database ] What the f**k is going on Azure Database for MySQL -- Single Server ?