Vagrant安装Oracle Data Guard环境示例

2024-01-21 13:44

本文主要是介绍Vagrant安装Oracle Data Guard环境示例,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

在Windows 11下,通过Vagrant安装标准的Data Guard环境(默认为non-CDB模式),耗时约26分钟,共生成2台虚机。以下为安装日志:

...host2: Welcome to DGMGRL, type "help" for information.host2: Connected to "DB193H1"host2: Connected as SYSDBA.host2: DGMGRL> Database "db193h1_stdby" addedhost2: DGMGRL> DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Jan 12 11:39:44 2024host2: Version 19.3.0.0.0host2:host2: Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.host2:host2: Welcome to DGMGRL, type "help" for information.host2: Connected to "DB193H1"host2: Connected as SYSDBA.host2: DGMGRL> Enabled.host2: DGMGRL> -----------------------------------------------------------------host2: INFO: 2024-01-12 11:40:05: Setup standby envhost2: -----------------------------------------------------------------host2:host2: SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jan 12 11:40:05 2024host2: Version 19.3.0.0.0host2:host2: Copyright (c) 1982, 2019, Oracle.  All rights reserved.host2:host2:host2: Connected to:host2: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Productionhost2: Version 19.3.0.0.0host2:host2: SQL> ORACLE instance started.host2:host2: Total System Global Area 3305108784 byteshost2: Fixed Size               8901936 byteshost2: Variable Size                  654311424 byteshost2: Database Buffers      2634022912 byteshost2: Redo Buffers             7872512 byteshost2: Database mounted.host2: SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Productionhost2: Version 19.3.0.0.0host2: DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Jan 12 11:41:18 2024host2: Version 19.3.0.0.0host2:host2: Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.host2:host2: Welcome to DGMGRL, type "help" for information.host2: Connected to "DB193H1"host2: Connected as SYSDBA.host2: DGMGRL>host2: Configuration - db_broker_confighost2:host2:   Protection Mode: MaxPerformancehost2:   Members:host2:   db193h1       - Primary databasehost2:     db193h1_stdby - Physical standby databasehost2:       Warning: ORA-16854: apply lag could not be determinedhost2:host2: Fast-Start Failover:  Disabledhost2:host2: Configuration Status:host2: WARNING   (status updated 79 seconds ago)host2:host2: DGMGRL>host2: Database - db193h1host2:host2:   Role:               PRIMARYhost2:   Intended State:     TRANSPORT-ONhost2:   Instance(s):host2:     DB193H1host2:host2: Database Status:host2: SUCCESShost2:host2: DGMGRL>host2: Database - db193h1_stdbyhost2:host2:   Role:               PHYSICAL STANDBYhost2:   Intended State:     APPLY-ONhost2:   Transport Lag:      0 seconds (computed 1 second ago)host2:   Apply Lag:          0 seconds (computed 1 second ago)host2:   Average Apply Rate: 0 Byte/shost2:   Real Time Query:    OFFhost2:   Instance(s):host2:     DB193H1host2:host2: Database Status:host2: SUCCESShost2:host2: DGMGRL> -----------------------------------------------------------------host2: INFO: 2024-01-12 11:41:20: Setup DB autostarthost2: -----------------------------------------------------------------host2: Created symlink from /etc/systemd/system/multi-user.target.wants/dbora.service to /usr/lib/systemd/system/dbora.service.host2: -----------------------------------------------------------------host2: INFO: 2024-01-12 11:41:20: Running user-defined post-setup scriptshost2: -----------------------------------------------------------------real    25m50.651s
user    0m0.015s
sys     0m0.031s

查看主备机的状态:

$ vagrant status│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│Oracle DG (Database Dataguard) Vagrant box for KVM/libVirt or VirtualBoxCopyright (c) 1982-2021 Oracle and/or its affiliates
--------------------------------------------------------------------------Author: Ruggero Citton <ruggero.citton@oracle.com>RAC Pack, Cloud Innovation and Solution Engineering Team
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│--------------------
Detected virtualbox
--------------------
getting Proxy Configuration from Host...
Current machine states:host1                     running (virtualbox)
host2                     running (virtualbox)This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

使用ssh登录host1,即Primary host:

PS C:\Users\****\Desktop\WORKSPACE\vagrant-projects\OracleDG\OL7> vagrant ssh host1│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│Oracle DG (Database Dataguard) Vagrant box for KVM/libVirt or VirtualBoxCopyright (c) 1982-2021 Oracle and/or its affiliates
--------------------------------------------------------------------------Author: Ruggero Citton <ruggero.citton@oracle.com>RAC Pack, Cloud Innovation and Solution Engineering Team
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│--------------------
Detected virtualbox
--------------------
getting Proxy Configuration from Host...Welcome to Oracle Linux Server release 7.9 (GNU/Linux 5.4.17-2136.325.5.el7uek.x86_64)The Oracle Linux End-User License Agreement can be viewed here:* /usr/share/eula/eula.en_USFor additional packages, updates, documentation and community help, see:* https://yum.oracle.com/[vagrant@primary ~]$

占用空间25.2GB,其实包含了ORCL_software目录下5.54GB的软件,即Oracle DB和GI软件(GI软件实际并没有用到,我只是放在那里而已)。
在这里插入图片描述
虚机启动时的情况,两个虚机实际占用内存约10G:
在这里插入图片描述
使用SQL Developer连接时,请注意需要再端口转发中新增tcp1521条目。例如primary的1521端口映射为15211,而standby的1521端口映射为15212:
在这里插入图片描述

SQL Developer中的管理界面:
在这里插入图片描述

这篇关于Vagrant安装Oracle Data Guard环境示例的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/629737

相关文章

python使用库爬取m3u8文件的示例

《python使用库爬取m3u8文件的示例》本文主要介绍了python使用库爬取m3u8文件的示例,可以使用requests、m3u8、ffmpeg等库,实现获取、解析、下载视频片段并合并等步骤,具有... 目录一、准备工作二、获取m3u8文件内容三、解析m3u8文件四、下载视频片段五、合并视频片段六、错误

HTML5 getUserMedia API网页录音实现指南示例小结

《HTML5getUserMediaAPI网页录音实现指南示例小结》本教程将指导你如何利用这一API,结合WebAudioAPI,实现网页录音功能,从获取音频流到处理和保存录音,整个过程将逐步... 目录1. html5 getUserMedia API简介1.1 API概念与历史1.2 功能与优势1.3

gitlab安装及邮箱配置和常用使用方式

《gitlab安装及邮箱配置和常用使用方式》:本文主要介绍gitlab安装及邮箱配置和常用使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1.安装GitLab2.配置GitLab邮件服务3.GitLab的账号注册邮箱验证及其分组4.gitlab分支和标签的

spring中的ImportSelector接口示例详解

《spring中的ImportSelector接口示例详解》Spring的ImportSelector接口用于动态选择配置类,实现条件化和模块化配置,关键方法selectImports根据注解信息返回... 目录一、核心作用二、关键方法三、扩展功能四、使用示例五、工作原理六、应用场景七、自定义实现Impor

MySQL MCP 服务器安装配置最佳实践

《MySQLMCP服务器安装配置最佳实践》本文介绍MySQLMCP服务器的安装配置方法,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下... 目录mysql MCP 服务器安装配置指南简介功能特点安装方法数据库配置使用MCP Inspector进行调试开发指

在Windows上使用qemu安装ubuntu24.04服务器的详细指南

《在Windows上使用qemu安装ubuntu24.04服务器的详细指南》本文介绍了在Windows上使用QEMU安装Ubuntu24.04的全流程:安装QEMU、准备ISO镜像、创建虚拟磁盘、配置... 目录1. 安装QEMU环境2. 准备Ubuntu 24.04镜像3. 启动QEMU安装Ubuntu4

mysql中insert into的基本用法和一些示例

《mysql中insertinto的基本用法和一些示例》INSERTINTO用于向MySQL表插入新行,支持单行/多行及部分列插入,下面给大家介绍mysql中insertinto的基本用法和一些示例... 目录基本语法插入单行数据插入多行数据插入部分列的数据插入默认值注意事项在mysql中,INSERT I

python常见环境管理工具超全解析

《python常见环境管理工具超全解析》在Python开发中,管理多个项目及其依赖项通常是一个挑战,下面:本文主要介绍python常见环境管理工具的相关资料,文中通过代码介绍的非常详细,需要的朋友... 目录1. conda2. pip3. uvuv 工具自动创建和管理环境的特点4. setup.py5.

OpenCV实现实时颜色检测的示例

《OpenCV实现实时颜色检测的示例》本文主要介绍了OpenCV实现实时颜色检测的示例,通过HSV色彩空间转换和色调范围判断实现红黄绿蓝颜色检测,包含视频捕捉、区域标记、颜色分析等功能,具有一定的参考... 目录一、引言二、系统概述三、代码解析1. 导入库2. 颜色识别函数3. 主程序循环四、HSV色彩空间

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/