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

相关文章

Java调用DeepSeek API的最佳实践及详细代码示例

《Java调用DeepSeekAPI的最佳实践及详细代码示例》:本文主要介绍如何使用Java调用DeepSeekAPI,包括获取API密钥、添加HTTP客户端依赖、创建HTTP请求、处理响应、... 目录1. 获取API密钥2. 添加HTTP客户端依赖3. 创建HTTP请求4. 处理响应5. 错误处理6.

Android 悬浮窗开发示例((动态权限请求 | 前台服务和通知 | 悬浮窗创建 )

《Android悬浮窗开发示例((动态权限请求|前台服务和通知|悬浮窗创建)》本文介绍了Android悬浮窗的实现效果,包括动态权限请求、前台服务和通知的使用,悬浮窗权限需要动态申请并引导... 目录一、悬浮窗 动态权限请求1、动态请求权限2、悬浮窗权限说明3、检查动态权限4、申请动态权限5、权限设置完毕后

在 Spring Boot 中使用 @Autowired和 @Bean注解的示例详解

《在SpringBoot中使用@Autowired和@Bean注解的示例详解》本文通过一个示例演示了如何在SpringBoot中使用@Autowired和@Bean注解进行依赖注入和Bean... 目录在 Spring Boot 中使用 @Autowired 和 @Bean 注解示例背景1. 定义 Stud

oracle DBMS_SQL.PARSE的使用方法和示例

《oracleDBMS_SQL.PARSE的使用方法和示例》DBMS_SQL是Oracle数据库中的一个强大包,用于动态构建和执行SQL语句,DBMS_SQL.PARSE过程解析SQL语句或PL/S... 目录语法示例注意事项DBMS_SQL 是 oracle 数据库中的一个强大包,它允许动态地构建和执行

Python安装时常见报错以及解决方案

《Python安装时常见报错以及解决方案》:本文主要介绍在安装Python、配置环境变量、使用pip以及运行Python脚本时常见的错误及其解决方案,文中介绍的非常详细,需要的朋友可以参考下... 目录一、安装 python 时常见报错及解决方案(一)安装包下载失败(二)权限不足二、配置环境变量时常见报错及

Python中顺序结构和循环结构示例代码

《Python中顺序结构和循环结构示例代码》:本文主要介绍Python中的条件语句和循环语句,条件语句用于根据条件执行不同的代码块,循环语句用于重复执行一段代码,文章还详细说明了range函数的使... 目录一、条件语句(1)条件语句的定义(2)条件语句的语法(a)单分支 if(b)双分支 if-else(

Python中Markdown库的使用示例详解

《Python中Markdown库的使用示例详解》Markdown库是一个用于处理Markdown文本的Python工具,这篇文章主要为大家详细介绍了Markdown库的具体使用,感兴趣的... 目录一、背景二、什么是 Markdown 库三、如何安装这个库四、库函数使用方法1. markdown.mark

PLsql Oracle 下载安装图文过程详解

《PLsqlOracle下载安装图文过程详解》PL/SQLDeveloper是一款用于开发Oracle数据库的集成开发环境,可以通过官网下载安装配置,并通过配置tnsnames.ora文件及环境变... 目录一、PL/SQL Developer 简介二、PL/SQL Developer 安装及配置详解1.下

MySQL数据库函数之JSON_EXTRACT示例代码

《MySQL数据库函数之JSON_EXTRACT示例代码》:本文主要介绍MySQL数据库函数之JSON_EXTRACT的相关资料,JSON_EXTRACT()函数用于从JSON文档中提取值,支持对... 目录前言基本语法路径表达式示例示例 1: 提取简单值示例 2: 提取嵌套值示例 3: 提取数组中的值注意

MySQL8.2.0安装教程分享

《MySQL8.2.0安装教程分享》这篇文章详细介绍了如何在Windows系统上安装MySQL数据库软件,包括下载、安装、配置和设置环境变量的步骤... 目录mysql的安装图文1.python访问网址2javascript.点击3.进入Downloads向下滑动4.选择Community Server5.