linux操作系统下oracle数据库如何配置监听
发布网友
发布时间:2022-04-22 07:27
我来回答
共5个回答
热心网友
时间:2022-04-07 20:31
1. 修改*配置文件
Linux下Oracle*配置文件在:$ ORACLE_HOME/network/admin/listerer.ora, 如:
/bank/oracle/oracle10g/proct/10.2.0/network/admin/listener.ora
修改并配置要监听SID的相关信息,如:
#listener.ora Network Configuration File: /bank/oracle/oracle10g/proct/10.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /bank/oracle/oracle10g/proct/10.2.0)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL DBNAME = bkserver)
(SID_NAME = bkserver)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))
)
)
2. 启动*
(1). 切换至oracle安装用户(一般为oracle)
su - oracle
(2). 启动*
lsnrctl start
另:停止*
lsnrctl stop
3. 测试*是否运行正常
在客户端修改tnsnames.ora配置文件就访问Oracle数据库,如:
BKSERVER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = BKSERVER)
)
)
通过命令tnsping测试是否能访问到*,如:
M:\>tnsping bkserver
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Proction on 12-8月 -
2010 17:11:04
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
D:\oracle\proct\10.2.0\client_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 10.7.13.242)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVIC
E_NAME = BKSERVER)))
OK (20 毫秒)
注意: *是否能被tnsping通跟数据库的开启/关闭无关,所以就算可以tnsping通*但未必能连接到数据库,这时请检查listener.ora文件配置信息是否正确,还有数据库是否已经被开启。
热心网友
时间:2022-04-07 21:49
可以在图形管理界面配置,一般是选择这样的方式,在linux桌面上,邮件在命令输入终端 中 键入 netca 回车就会弹出监听配置向导了
热心网友
时间:2022-04-07 23:23
找到配置文件,直接修改,然后重启监听
热心网友
时间:2022-04-08 01:15
/ora/oracle/10g/network/admin/samples
下
listener.ora tnsnames.ora
热心网友
时间:2022-04-08 03:23
命令行中输入netca,选择创建一个监听,然后下一步就可以了