侦听器启动期间未读取 Oracle 数据库 listner.ora 配置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14050101/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle database listner.ora configuration is not read during listener startup
提问by KItis
I have configured following two configuration files of oracle database.
我配置了以下两个oracle数据库的配置文件。
/opt/oracle/11.2.0/network/admin/listener.ora
to have following values
/opt/oracle/11.2.0/network/admin/listener.ora
具有以下值
ADR_BASE_LISTENER = /opt/oracle
LISTENER_JIPDB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1530))
)
)
SID_LIST_LSNR_JIPDB =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DWJP02T)
(ORACLE_HOME = /opt/oracle/11.2.0)
(SID_NAME = DWJP02T)
)
)
and I have configured /opt/oracle/11.2.0/network/admin/tnsnames.ora
file to have following values
并且我已将/opt/oracle/11.2.0/network/admin/tnsnames.ora
文件配置为具有以下值
LISTENER_JIPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain )(PORT = 1530))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DWJP02T)
)
)
My question is when i try to start the oracle listner by typing following command, it is opening the DWJP02T SID instance in 1521 port, i don't know how it is getting this port or from where it is reading this port, I have configured to it to read 1530 on the .ora files.
我的问题是,当我尝试通过键入以下命令来启动 oracle 侦听器时,它正在 1521 端口中打开 DWJP02T SID 实例,我不知道它是如何获取此端口或从何处读取此端口的,我已配置以读取 .ora 文件上的 1530。
this is the output i get when i start the listner
这是我启动监听器时得到的输出
[ora112@localhost ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-DEC-2012 22:48:16
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /opt/oracle/11.2.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /opt/oracle/11.2.0/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 26-DEC-2012 22:48:16
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/11.2.0/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
Please help me to understand why it is opening database on different port than what i have configred it to start. I restarted the database and the server to see if it will read values from the listner.ora file, but still no luck.
请帮助我理解为什么它在不同的端口上打开数据库而不是我配置它启动的端口。我重新启动了数据库和服务器,看看它是否会从 listner.ora 文件中读取值,但仍然没有运气。
回答by Ajith Sasidharan
Try these steps to furnish the request:
尝试以下步骤来提供请求:
Stop the Oracle listener using the following command:
lsnrctl stop
Change the port number in the Oracle listener.ora file. For example, from the default port 1522 to 1521.
Change the port number in the tnsnames.ora file as in the following example, where
host_name
is your host name andserver_name
is your server name.Restart the Oracle listener using the following command:
lsnrctl start
Change the port to which the database is listening:
sqlplus / as sysdba > alter system set LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1522))"; > alter system register;
使用以下命令停止 Oracle 侦听器:
lsnrctl stop
更改 Oracle listener.ora 文件中的端口号。例如,从默认端口 1522 到 1521。
更改 tnsnames.ora 文件中的端口号,如下例所示,其中
host_name
是您的主机名,server_name
是您的服务器名。使用以下命令重新启动 Oracle 侦听器:
lsnrctl start
更改数据库正在侦听的端口:
sqlplus / as sysdba > alter system set LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1522))"; > alter system register;