当前位置:网站首页>解决虚拟机中Oracle每次要设置ip的问题
解决虚拟机中Oracle每次要设置ip的问题
2022-04-23 13:06:00 【ArchieSean】
博主名取自《小羊肖恩》中的小羊肖恩,名字为:肖恩,音译为Sean,自己取的姓:阿奇,为符合我们的阅读习惯,连起来组成为ArchieSean。博主志在将博客打造成为个人线上笔记的技术栈,方便自己也方便他人。如博客中有任何错误,请各位指出,谢谢大家。
我在本地虚拟机上安装了Oracle,但是使用图形化工具去链接时,每次我都需要去设置虚拟机ip到oracle的文件中去,为解决这个问题,可以使用计算机名称来替代原有ip
- 配置listener
# listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =计算机名称)(PORT = 1521))
)
)
- 配置 tnsnames
# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =计算机名称)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
另外一种解决方案
- 首先我们可以设置vm的ip为静态ip,修改步骤如下
在这张图中做一下几个操作:
(1)选中vm8,点击更改设置
(2)修改子网IP和子网掩码
(3)点击NAT设置,设置网关,如下图
此时,虚拟机的静态ip已设置完成,可以开启虚拟机,设置虚拟机的ip。我这里使用的是win7的虚拟机(安装的Oracle),修改步骤如下:
- 打开网络和共享中心
- 更改适配器设置
- 点击本地连接,右键属性
- 在属性中找到IPV4进行编辑,如下图
点击确定即可,这样做的好处是,在使用Oracle的时候,通过PL/SQL连接时,可以配置固定ip来连接,而不必每次都需要查看虚拟机的ip地址再建立连接,比较方便。
如有任何问题,请评论留言。。
版权声明
本文为[ArchieSean]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_41964942/article/details/107383984
边栏推荐
- JDBC connection pool
- Design of STM32 multi-channel temperature measurement wireless transmission alarm system (industrial timing temperature measurement / engine room temperature timing detection, etc.)
- mui picker和下拉刷新冲突问题
- 如何实现点击一下物体播放一次动画
- MySQL supports IP access
- mysql8安装
- HQL find the maximum value in a range
- 100 GIS practical application cases (52) - how to keep the number of rows and columns consistent and aligned when cutting grids with grids in ArcGIS?
- melt reshape decast 长数据短数据 长短转化 数据清洗 行列转化
- Translation of multi modal visual tracking: review and empirical comparison
猜你喜欢
Introduction to servlet listener & filter
There is no need to crack the markdown editing tool typora
拥抱机器视觉新蓝海,冀为好望开启数字经济发展新“冀”遇
Mysql8 installation
[51 single chip microcomputer traffic light simulation]
JMeter operation redis
mui + hbuilder + h5api模拟弹出支付样式
R语言中dcast 和 melt的使用 简单易懂
精度、速度完美平衡,最新图像分割SOTA模型重磅发布!!!
Navicat远程连接数据库 出现 1130- Host xxx is not allowed to connect to this MySQL server错误
随机推荐
Conflict between Mui picker and drop-down refresh
5 free audio material websites, recommended collection
Timing role in the project
Learning materials
22. Bracket generation
Golang implements a five insurance and one gold calculator with web interface
HQL statement tuning
Go language mapping operation
100 GIS practical application cases (52) - how to keep the number of rows and columns consistent and aligned when cutting grids with grids in ArcGIS?
MySQL supports IP access
mysql8安装
JDBC connection pool
The quill editor image zooms, multiple rich text boxes are used on one page, and the quill editor upload image address is the server address
Translation of multi modal visual tracking: review and empirical comparison
31. 下一个排列
教你快速开发一个 狼人杀微信小程序(附源码)
安装nngraph
filter()遍历Array异常友好
unity常见的问题(一)
mui 关闭其他页面,只保留首页面