如果出现oracle提示java/j2ee iis7站长之家 - ora-12541: tns:无监听程序,那么就依照下列步骤做,这是因为你的分配的地址不对。
查看oracleproduct10.2.0db_1networkadmintnsnames.ora文件,用记事本打开,显示oracle值:
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =自动分配的IP地址)(PORT =1521))
(SERVICE_NAME = oracle)
)
)
主机名输入localhost或127.0.0.1都会提示无监听程序。由于自动分配的IP地址会有变动,所以将oracle值中的host改成本机的计算机名,保存修改后的tnsnames.ora。再次新建数据库,出错问题解决。
# tnsnames.ora Network Configuration
File:G:oracleproduct10.2.0db_1networkadmintnsnames.ora
# Generated by Oracle configuration tools.
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =计算机名称)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)