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安装Pandas库的两种方法

《Python安装Pandas库的两种方法》本文介绍了三种安装PythonPandas库的方法,通过cmd命令行安装并解决版本冲突,手动下载whl文件安装,更换国内镜像源加速下载,最后建议用pipli... 目录方法一:cmd命令行执行pip install pandas方法二:找到pandas下载库,然后

MySQL常用字符串函数示例和场景介绍

《MySQL常用字符串函数示例和场景介绍》MySQL提供了丰富的字符串函数帮助我们高效地对字符串进行处理、转换和分析,本文我将全面且深入地介绍MySQL常用的字符串函数,并结合具体示例和场景,帮你熟练... 目录一、字符串函数概述1.1 字符串函数的作用1.2 字符串函数分类二、字符串长度与统计函数2.1

SpringBoot多环境配置数据读取方式

《SpringBoot多环境配置数据读取方式》SpringBoot通过环境隔离机制,支持properties/yaml/yml多格式配置,结合@Value、Environment和@Configura... 目录一、多环境配置的核心思路二、3种配置文件格式详解2.1 properties格式(传统格式)1.

Oracle数据库定时备份脚本方式(Linux)

《Oracle数据库定时备份脚本方式(Linux)》文章介绍Oracle数据库自动备份方案,包含主机备份传输与备机解压导入流程,强调需提前全量删除原库数据避免报错,并需配置无密传输、定时任务及验证脚本... 目录说明主机脚本备机上自动导库脚本整个自动备份oracle数据库的过程(建议全程用root用户)总结

SQL Server 中的 WITH (NOLOCK) 示例详解

《SQLServer中的WITH(NOLOCK)示例详解》SQLServer中的WITH(NOLOCK)是一种表提示,等同于READUNCOMMITTED隔离级别,允许查询在不获取共享锁的情... 目录SQL Server 中的 WITH (NOLOCK) 详解一、WITH (NOLOCK) 的本质二、工作

Linux系统中查询JDK安装目录的几种常用方法

《Linux系统中查询JDK安装目录的几种常用方法》:本文主要介绍Linux系统中查询JDK安装目录的几种常用方法,方法分别是通过update-alternatives、Java命令、环境变量及目... 目录方法 1:通过update-alternatives查询(推荐)方法 2:检查所有已安装的 JDK方

SQL Server安装时候没有中文选项的解决方法

《SQLServer安装时候没有中文选项的解决方法》用户安装SQLServer时界面全英文,无中文选项,通过修改安装设置中的国家或地区为中文中国,重启安装程序后界面恢复中文,解决了问题,对SQLSe... 你是不是在安装SQL Server时候发现安装界面和别人不同,并且无论如何都没有中文选项?这个问题也

2025版mysql8.0.41 winx64 手动安装详细教程

《2025版mysql8.0.41winx64手动安装详细教程》本文指导Windows系统下MySQL安装配置,包含解压、设置环境变量、my.ini配置、初始化密码获取、服务安装与手动启动等步骤,... 目录一、下载安装包二、配置环境变量三、安装配置四、启动 mysql 服务,修改密码一、下载安装包安装地

Redis MCP 安装与配置指南

《RedisMCP安装与配置指南》本文将详细介绍如何安装和配置RedisMCP,包括快速启动、源码安装、Docker安装、以及相关的配置参数和环境变量设置,感兴趣的朋友一起看看吧... 目录一、Redis MCP 简介二、安www.chinasem.cn装 Redis MCP 服务2.1 快速启动(推荐)2.

在macOS上安装jenv管理JDK版本的详细步骤

《在macOS上安装jenv管理JDK版本的详细步骤》jEnv是一个命令行工具,正如它的官网所宣称的那样,它是来让你忘记怎么配置JAVA_HOME环境变量的神队友,:本文主要介绍在macOS上安装... 目录前言安装 jenv添加 JDK 版本到 jenv切换 JDK 版本总结前言China编程在开发 Java