当前位置:网站首页>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
边栏推荐
- China Indonesia adhesive market trend report, technological innovation and market forecast
- AutoCAD - set color
- Game theory
- 2022年九大CIO趨勢和優先事項
- CMPSC311 Linear Device
- What is torch NN?
- Selenium element interaction
- How to save the contents of div as an image- How to save the contents of a div as a image?
- Research Report on plastic recycling machine industry - market status analysis and development prospect forecast
- Penetration test --- database security: detailed explanation of SQL injection into database principle
猜你喜欢
2022年九大CIO趋势和优先事项
Communication mode based on stm32f1 single chip microcomputer
AI system content recommendation issue 24
The 17 year growth route of Zhang Liang, an open source person, can only be adhered to if he loves it
Scientific research cartoon | what else to do after connecting with the subjects?
Qt---error: ‘QObject‘ is an ambiguous base of ‘MyView‘
Stress, anxiety or depression? Correct diagnosis and retreatment
Function test - knowledge points and common interview questions
函数式接口,方法引用,Lambda实现的List集合排序小工具
@EnableAspectAutoJAutoProxy_ Exposeproxy property
随机推荐
Qt---error: ‘QObject‘ is an ambiguous base of ‘MyView‘
AutoCAD - set color
Understand asp Net core - Authentication Based on jwtbearer
The content of the source code crawled by the crawler is inconsistent with that in the developer mode
Book of night sky 53 "stone soup" of Apache open source community
[native JS] optimized text rotation effect
Blood cases caused by Lombok use
[Chongqing Guangdong education] National Open University spring 2019 1396 pharmaceutical administration and regulations (version) reference questions
Dry goods | fMRI standard reporting guidelines are fresh, come and increase your knowledge
PR FAQ: how to set PR vertical screen sequence?
Lv166 turned over
Some fields of the crawler that should be output in Chinese are output as none
一图看懂ThreadLocal
Final consistency of MESI cache in CPU -- why does CPU need cache
What does IOT engineering learn and work for?
Expression #1 of ORDER BY clause is not in SELECT list, references column ‘d.dept_ no‘ which is not i
[hcie TAC] question 5 - 1
Interface test - knowledge points and common interview questions
Accounting regulations and professional ethics [8]
Big God explains open source buff gain strategy live broadcast