当前位置:网站首页>解决虚拟机中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
边栏推荐
- decast id.var measure.var数据拆分与合并
- 22. Bracket generation
- Mysql8 installation
- JDBC connection pool
- JMeter operation redis
- (personal) sorting out system vulnerabilities after recent project development
- Teach you to quickly develop a werewolf killing wechat applet (with source code)
- nodejs + mysql 实现简单注册功能(小demo)
- (1) Openjuterpyrab comparison scheme
- mui + hbuilder + h5api模拟弹出支付样式
猜你喜欢
hbuilderx + uniapp 打包ipa提交App store踩坑记
Free and open source charging pile Internet of things cloud platform
世界读书日:我想推荐这几本书
51 single chip microcomputer stepping motor control system based on LabVIEW upper computer (upper computer code + lower computer source code + ad schematic + 51 complete development environment)
Huawei cloud MVP email
Learning notes of AMBA protocol
STM32 is connected to the motor drive, the DuPont line supplies power, and then the back burning problem
GIS practical tips (III) - how to add legend in CASS?
World Book Day: I'd like to recommend these books
Importerror after tensorflow installation: DLL load failed: the specified module cannot be found, and the domestic installation is slow
随机推荐
MySQL —— 16、索引的数据结构
JMeter operation redis
Design of body fat detection system based on 51 single chip microcomputer (51 + OLED + hx711 + US100)
[51 single chip microcomputer traffic light simulation]
Pyqt5 store opencv pictures into the built-in sqllite database and query
Wonderful review | the sixth issue of "source" - open source economy and industrial investment
初鉴canvas,展示个小小的小案例
Go language mapping operation
The accuracy and speed are perfectly balanced, and the latest image segmentation SOTA model is released!!!
How to convert opencv pictures to bytes
[Technical Specification]: how to write technical documents?
Hanlp word splitter (via spark)
The filter() traverses the array, which is extremely friendly
Free and open source intelligent charging pile SaaS cloud platform of Internet of things
Golang implements a five insurance and one gold calculator with web interface
[untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie
Servlet监听器&过滤器介绍
V-model binding value in El select, data echo only displays value, not label
Install nngraph
Byte warehouse intern interview SQL questions