当前位置:网站首页>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
边栏推荐
- Unity script API - transform transform
- L1-072 scratch lottery
- C language: implementation of daffodil number function
- Stew in disorder
- Game theory
- Software Engineer vs Hardware Engineer
- Expression #1 of ORDER BY clause is not in SELECT list, references column ‘d.dept_ no‘ which is not i
- How to save the contents of div as an image- How to save the contents of a div as a image?
- error: ‘connect‘ was not declared in this scope connect(timer, SIGNAL(timeout()), this, SLOT(up
- Hidden communication tunnel technology: intranet penetration tool NPS
猜你喜欢
Audio and video technology development weekly | 252
Interface fonctionnelle, référence de méthode, Widget de tri de liste implémenté par lambda
《吐血整理》保姆级系列教程-玩转Fiddler抓包教程(2)-初识Fiddler让你理性认识一下
Filtered off site request to
Anta is actually a technology company? These operations fool netizens
Scientific research cartoon | what else to do after connecting with the subjects?
error: ‘connect‘ was not declared in this scope connect(timer, SIGNAL(timeout()), this, SLOT(up
Stress, anxiety or depression? Correct diagnosis and retreatment
The new generation of domestic ORM framework sagacity sqltoy-5.1.25 release
Software Engineer vs Hardware Engineer
随机推荐
Unity animation day05
Scientific research cartoon | what else to do after connecting with the subjects?
Research Report on surgical otorhinolaryngology equipment industry - market status analysis and development prospect prediction
@EnableAspectAutoJAutoProxy_ Exposeproxy property
Model fusion -- stacking principle and Implementation
Communication mode based on stm32f1 single chip microcomputer
Can I "reverse" a Boolean value- Can I 'invert' a bool?
[native JS] optimized text rotation effect
Feature extraction and detection 15-akaze local matching
I let the database lock the table! Almost fired!
Research Report on market supply and demand and strategy of China's four sided flat bag industry
China's roof ladder market trend report, technological innovation and market forecast
How can floating point numbers be compared with 0?
c# 实现定义一套中间SQL可以跨库执行的SQL语句
Model fusion -- stacking principle and Implementation
Market trend report, technical innovation and market forecast of China's hair repair therapeutic apparatus
What is the catalog of SAP commerce cloud
Move, say goodbye to the past again
Common knowledge of unity Editor Extension
Four point probe Industry Research Report - market status analysis and development prospect prediction