尝试配置dblink我使用db Oracle在SUSE中损坏了oracle侦听器,撤消了对文件listener.ora和tnsnames.ora所做的更改,但是它没有用,然后我重新启动了计算机并使用了lsnrctl状态
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.3.250) (PORT = 1521)))
TNS-12541: TNS: no listener
TNS-12560: TNS: protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521)))
TNS-12541: TNS: no listener
TNS-12560: TNS: protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
我知道,如果我将所有内容保持原样,LISTENER应该会自动启动并且没有问题。
现在我使用了$ ORACLE_HOME / bin / lsnrctl start LISTENER
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 07-JAN-2019 20:35:42
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/11gR2/db/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/srvbdlnx/listener/alert/log.xml
Listening Endpoints Summary ...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.3.250) (PORT = 1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521)))
The listener supports no services
The command completed successfully
然后我重新启动了LISTENER,显然正在监听:
Listening Endpoints Summary ...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.3.250) (PORT = 1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521)))
Services Summary ...
Service "app" has 1 instance (s).
Instance "app", status READY, has 1 handler (s) for this service ...
Service "appXDB" has 1 instance (s).
Instance "app", status READY, has 1 handler (s) for this service ...
The command completed successfully
但是当我尝试远程登录应用程序时,它不起作用:
ORA-12537:TNS:connection closed
修改数据库中的local_listener参数,但该参数不起作用。
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.250)(PORT=1521))';
数据库正在运行,因为我可以在控制台的sqlplus中以SYSTEM用户身份登录。
我的listener.ora文件:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.3.250) (PORT = 1521))
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /opt/oracle
tnsnames.ora
APP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.3.250) (PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = app)
)
)
我修改的文件中是否缺少某些内容? 由于我对这些文件所做的修改,可能发生了什么变化? 我还可以使用其他哪些命令查看更多错误?
我是新来的,谢谢。
答案 0 :(得分:0)
由于某些原因,当我修改这些文件时,它们更改了/var/tmp/.oracle目录的权限,这是由于Oracle用户无法停止侦听器而被发现的。
# chown -R oracle:oinstall .oracle
# chmod -R 01777 .oracle