ORA-12541: TNS: 无监听程序
1.虚拟机安装oracle报错:ORA-12541: TNS: 无监听程序 ,(每个人遇到的问题不一样,具体看是否适用),不建议安装本机oracle
2.当修改过.ora文件时,也会出类似的问题
具体可以参考文章:https://blog.csdn.net/LJ_0514/article/details/79565197
具体和三个文件有关,listener.ora(监听) sqlnet.ora tnsnames.ora(监听实例?),具体例子可到C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\SAMPLE 中复制修改
原始文件
回退一布文件夹中的内容
tnsnames.ora 需要修改的内容 监听ip地址,端口,实例名称
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.80.10)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listener.ora 如下 oracle_home的环境变量配置SID 以及listener 的TCP的ip和端口
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.80.10)(PORT = 1521))
)
)
sqlnet.ora 具体如下
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
用你的instantclient 连接试试 ,注意实例名称不要错,就是安装oracle的用户名称
D:\soft\instantclient_12_1>sqlplus system/[email protected]:1521/orcl