我试图在asp.net的LAN系统上连接到oracle 11g数据库。但我得到ORA-12541: TNS:no listener
错误。
我在文件中进行了以下更改.....
SQLNET.ORA
SQLNET.AUTHENTICATION_SERVICES= (BEQ, TCPS, NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
的tnsnames.ora
TESTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.50)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TESTDB)
)
)
LISTENER_TESTDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
的listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.50)(PORT = 1521))
)
)
请告诉我如何解决这个问题....
...谢谢
答案 0 :(得分:0)
你有没有开始听众?在服务器上:
lsnrctl status
:应该告诉你听众是否出现
lsnrctl start
:应该启动默认侦听器,假设没有密码
编辑:
由于侦听器正在运行,lsnrctl status命令会告诉您它所服务的数据库是什么?