当前位置:网站首页>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
边栏推荐
- [flask] ORM one to many relationship
- Interface fonctionnelle, référence de méthode, Widget de tri de liste implémenté par lambda
- [hcie TAC] question 5 - 1
- Stew in disorder
- I let the database lock the table! Almost fired!
- Nine CIO trends and priorities in 2022
- TypeError: not enough arguments for format string
- Accounting regulations and professional ethics [8]
- Communication mode based on stm32f1 single chip microcomputer
- Using celery in projects
猜你喜欢

2022年九大CIO趨勢和優先事項

科普达人丨一文看懂阿里云的秘密武器“神龙架构”

MySQL learning notes - data type (2)
Application of clock wheel in RPC

Using celery in projects

Big God explains open source buff gain strategy live broadcast

Interface test - knowledge points and common interview questions

In today's highly integrated chips, most of them are CMOS devices

Dry goods | fMRI standard reporting guidelines are fresh, come and increase your knowledge

AI system content recommendation issue 24
随机推荐
Four point probe Industry Research Report - market status analysis and development prospect prediction
What should ABAP do when it calls a third-party API and encounters garbled code?
函数式接口,方法引用,Lambda实现的List集合排序小工具
Interface fonctionnelle, référence de méthode, Widget de tri de liste implémenté par lambda
Hair and fuzz interceptor Industry Research Report - market status analysis and development prospect forecast
Accounting regulations and professional ethics [7]
TypeError: not enough arguments for format string
《吐血整理》保姆级系列教程-玩转Fiddler抓包教程(2)-初识Fiddler让你理性认识一下
Selenium element interaction
2022年九大CIO趨勢和優先事項
Common knowledge of unity Editor Extension
Understand asp Net core - Authentication Based on jwtbearer
Stew in disorder
Dry goods | fMRI standard reporting guidelines are fresh, come and increase your knowledge
How was MP3 born?
Accounting regulations and professional ethics [8]
Vscode prompt Please install clang or check configuration 'clang executable‘
Talking about Net core how to use efcore to inject multiple instances of a context annotation type for connecting to the master-slave database
Market trend report, technical innovation and market forecast of electrochromic glass and devices in China and Indonesia
Nine CIO trends and priorities in 2022