我正在尝试将 oracle 数据库与非 oracle 用户连接。
sqlplus user/password@sid
但它回来了
SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 12 22:34:08 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12541: TNS:no listener
Enter user-name:
但是如果我尝试连接这条线
sqlplus user/password
连接成功,所以我需要知道如何修复它。oracle 或 root 用户不会发生这种情况。
如果检查端口是否对所有用户都有效
tcp 0 0 192.168.2.5:1521 0.0.0.0:* LISTEN
更新
tnsnames.ora
DBBRM75 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.5)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbbrm75.local)
)
)
LISTENER =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.5)(PORT = 1521))
监听器.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = dbbrm75.local)
(ORACLE_HOME = /opt/app/oracle/product/11.2.0/db_1)
(SID_NAME = dbbrm75)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.5)(PORT = 1521))
)
ADR_BASE_LISTENER = /opt/app/oracle
lsnrctl 状态
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-MAR-2014 23:32:52
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.5)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-MAR-2014 23:20:49
Uptime 0 days 0 hr. 12 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/vilya/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.5)(PORT=1521)))
Services Summary...
Service "dbbrm75.local" has 1 instance(s).
Instance "dbbrm75", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully