当前位置:网站首页>Oracle监听器Server端与Client端配置实例
Oracle监听器Server端与Client端配置实例
2022-07-04 14:53:00 【全栈程序员站长】
Listener.ora、tnsnames.ora这两个文件常常因为格式问题而不好用,我平时都是配置好了留个备份,以后都是拷贝过去改改就好了!嘿嘿~~~
因为平时使用linux的时候较多,所以有时还会遇到sqlnet.ora这个文件有问题,直接给它删了就好了~~
有时在windows下装的oracle的listener服务就启动不了,遇到这种情况,直接去oracle的bin目录下面找到lsnrctl.exe那个文件,直接给它运行,弹出来的窗口不要关闭,就可以了。
Oracle Server端Listener.ora文件(一个instance):
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1521)) //主机名或IP及端口设置 ) ) )
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = database1) // database1为数据库instance名 (ORACLE_HOME = /opt/oracle/product/10.1.0) //oracle安装目录,根据安装情况更改 (PROGRAM = extproc) ) )
Oracle Server端Listener.ora文件(两个instance): LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1521)) ) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = database1) // database1为数据库instance1名 (ORACLE_HOME = /opt/oracle/product/10.1.0) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = database2) // database2为数据库instance2名 (ORACLE_HOME = /opt/oracle/product/10.1.0) (PROGRAM = extproc) ) )
Oracle Server端监听器启动、停止、查看状态命令:
$ lsnrctl start
$ lsnrctl stop
$ lsnrctl status
Oracle Client端Tnsnames.ora文件:
ORALOCAL = //别名oralocal (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = database1) //database1为SID名 ) )
Oracle Client端检查监听器连接状态用命令:
$ tnsping 别名
例如:用oracle用户执行命令 $ tnsping oralocal
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/110861.html原文链接:https://javaforall.cn
边栏推荐
- Daily notes~
- JS to realize the countdown function
- Case sharing | integrated construction of data operation and maintenance in the financial industry
- Communication mode based on stm32f1 single chip microcomputer
- Research Report on market supply and demand and strategy of China's Sodium Tetraphenylborate (cas+143-66-8) industry
- Statistical learning: logistic regression and cross entropy loss (pytoch Implementation)
- Interface test - knowledge points and common interview questions
- Unity script lifecycle day02
- How can floating point numbers be compared with 0?
- Software Engineer vs Hardware Engineer
猜你喜欢
![[tutorial] yolov5_ DeepSort_ The whole process of pytoch target tracking and detection](/img/a7/92d670776e3fd3d5add3aa144617c7.jpg)
[tutorial] yolov5_ DeepSort_ The whole process of pytoch target tracking and detection

165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version

Book of night sky 53 "stone soup" of Apache open source community

Vscode prompt Please install clang or check configuration 'clang executable‘

What is the catalog of SAP commerce cloud

Blood cases caused by Lombok use

Interface fonctionnelle, référence de méthode, Widget de tri de liste implémenté par lambda

Functional interface, method reference, list collection sorting gadget implemented by lambda

Software Engineer vs Hardware Engineer
时钟轮在 RPC 中的应用
随机推荐
Functional interface, method reference, list collection sorting gadget implemented by lambda
C language: implementation of daffodil number function
对人胜率84%,DeepMind AI首次在西洋陆军棋中达到人类专家水平
@EnableAspectAutoJAutoProxy_ Exposeproxy property
How was MP3 born?
ECCV 2022放榜了:1629篇论文中选,录用率不到20%
China's plastic processing machinery market trend report, technological innovation and market forecast
Application and Optimization Practice of redis in vivo push platform
PR FAQ: how to set PR vertical screen sequence?
一图看懂ThreadLocal
Unity animation day05
Understand asp Net core - Authentication Based on jwtbearer
Logstash ~ detailed explanation of logstash configuration (logstash.yml)
Market trend report, technical innovation and market forecast of taillight components in China
Actual combat | use composite material 3 in application
Digital recognition system based on OpenCV
[native JS] optimized text rotation effect
Can I "reverse" a Boolean value- Can I 'invert' a bool?
Accounting regulations and professional ethics [10]
D3D11_ Chili_ Tutorial (2): draw a triangle