在我电脑上装了2个oracle实例,一个是orcl,一个是test。
我启动两个实例:
net start oracleserviceorcl
net start oracleservicetest
然后启动监听:
lsnrctl start
成功启动后,查看监听了几个实例:
lsnrctl status
服务摘要..
服务 "orcl" 包含 1 个例程。
例程 "orcl", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "test" 包含 1 个例程。
例程 "test", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功
以上说明这个监听器监听了2个实例,没错吧?
然后我启动isqlplus:
isqlplusctl start成功。
启动emctl:
set oracle_sid=orcl
emctl start dbconsole
set oracle_sid=test
emctl start dbconsole至此,所有的服务都已经启动完成并成功。
登录两个实例的oem,都能成功。
但是登录isqlplus,输入用户名密码,两个实例 提示ERROR - ORA-12541: TNS: 无监听程序!
用户名:system
密码 :admin
连接标识符:localhost:1521/orcl
什么原因呢?我感觉没有什么错啊。既然能登录oem,说明监听程序配置的没有问题,因为登录oem的时候是要用到监听的。不知道为什么,请大家告诉我。
谢谢大家。
对了,我的监听配置文件也贴上吧:
listener.ora
# listener.ora Network Configuration File: D:\oracle10.2.0\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(SID_NAME = orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = test)
(SID_NAME = test)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.95)(PORT = 1521))
)
tnsnames.ora
# tnsnames.ora Network Configuration File: D:\oracle10.2.0\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
CHINANTN_100 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = chinantn)
)
)
CHINANTN100_JNHHHOME =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = chinantn)
)
)
TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 493ae2c2569d45b)(PORT = 1521))
(CONNECT_DATA =