oracle TNS问题 ORA-12154: TNS:could not resolve the connect identifier specified 10
listener.ora文件#listener.oraNetworkConfigurationFile:/u01/app/oracle/product/10.2.0/db...
listener.ora文件
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbs91.example.com)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
tnsnames.ora文件
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
CATDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbs91.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = catdb)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbs91.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.example.com)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
操作系统验证能登录sqlplus / as sydba
sqlplus sys/oracle@orcl as sysdba 不行
服务器与客户端同一台机 展开
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbs91.example.com)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
tnsnames.ora文件
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
CATDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbs91.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = catdb)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbs91.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.example.com)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
操作系统验证能登录sqlplus / as sydba
sqlplus sys/oracle@orcl as sysdba 不行
服务器与客户端同一台机 展开
8个回答
展开全部
1、问题 ORA-12154: TNS:could not resolve the connect identifier specified ,即无法解析指定的连接,这说明缺少了一个环境变量,TNS_ADMIN 。
2、找到PLSQL中的oracle home(主目录)和OCI library(oci.dll地址)配置。
3、核对完上述问题后如发现问题仍旧没有解决,查看tnsnames.ora文件,查看数据库配置信息前面是否有空格。
4、查看环境变量的设置是否正确,在环境变量path中添加oracle客户端的安装路径。
2016-10-22 · 知道合伙人教育行家
关注
展开全部
tns could not resolve the connect identifier specified意思是:TNS无法解决连接标指定识符的问题。可以添加环境变量,或者重新连接来解决问题。
详细解释:
resolve 英[rɪˈzɒlv] 美[rɪˈzɑ:lv]
vt. 决心; 决定;
vt. 使消释; 使分解,使解体; (指委员会或集会) 表决; 消退(炎症等);
vi. 分解; 下决定;
[例句]We must find a way to resolve these problems before it's too late.
我们必须及时找到解决这些问题的方法。
identifier 英[aɪˈdentɪfaɪə(r)]
n. 识别符; 检验人,标识符; 鉴别器; 编号;
[例句]Another common mistake is to confuse a prefix with an identifier.
另一种常见的错误是混淆了前缀和标识符。
specified 英['spesɪfaɪd] 美['spesɪfaɪd]
v. 指定( specify的过去式和过去分词 ); 详述; 提出…的条件; 使具有特性;
[例句]They specified a spacious entrance hall.
他们专门指定要一个宽敞的大门厅。
详细解释:
resolve 英[rɪˈzɒlv] 美[rɪˈzɑ:lv]
vt. 决心; 决定;
vt. 使消释; 使分解,使解体; (指委员会或集会) 表决; 消退(炎症等);
vi. 分解; 下决定;
[例句]We must find a way to resolve these problems before it's too late.
我们必须及时找到解决这些问题的方法。
identifier 英[aɪˈdentɪfaɪə(r)]
n. 识别符; 检验人,标识符; 鉴别器; 编号;
[例句]Another common mistake is to confuse a prefix with an identifier.
另一种常见的错误是混淆了前缀和标识符。
specified 英['spesɪfaɪd] 美['spesɪfaɪd]
v. 指定( specify的过去式和过去分词 ); 详述; 提出…的条件; 使具有特性;
[例句]They specified a spacious entrance hall.
他们专门指定要一个宽敞的大门厅。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
应该是环境变量出错,几天前我也是一直报这个错,后来找身边弄好了的拷了一个
path==
D:\oracle\product\10.2.0\db_1\bin;D:\oracle\product\10.2.0\client_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
由于我是oracle初学者,不能给你太多的帮助,谅解下
path==
D:\oracle\product\10.2.0\db_1\bin;D:\oracle\product\10.2.0\client_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
由于我是oracle初学者,不能给你太多的帮助,谅解下
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
XP系统下面安装了oracle11g 数据库以及PLSQL Developer7.0的数据库客户端
当我连接到远程服务器上面的oracle9数据库时,先是出现“could not load E:\app\Administrator\product\11.2.0\client_1\oci.dll”等一系列问题,
E:\app正是我oracle11g的安装目录,根据提示我查看了E:\app\Administrator\product\11.2.0目录下不存在client_1目录,
于是我又安装了一个10.0oracle客户端,再从该客户端的安装路径找到一个client_1目录将其拷贝到E:\app\Administrator\product\11.2.0目录下面,
本以为一切OK了,没想到出现了新的错误提示“could not resolve the connect identifier specified”,于是我添加环境变量后问题解决解决。
TNS_ADMIN ->> E:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN
当我连接到远程服务器上面的oracle9数据库时,先是出现“could not load E:\app\Administrator\product\11.2.0\client_1\oci.dll”等一系列问题,
E:\app正是我oracle11g的安装目录,根据提示我查看了E:\app\Administrator\product\11.2.0目录下不存在client_1目录,
于是我又安装了一个10.0oracle客户端,再从该客户端的安装路径找到一个client_1目录将其拷贝到E:\app\Administrator\product\11.2.0目录下面,
本以为一切OK了,没想到出现了新的错误提示“could not resolve the connect identifier specified”,于是我添加环境变量后问题解决解决。
TNS_ADMIN ->> E:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
listener.ora文件
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
最后一行改成
(SID_NAME = orcl)
lsnrctl status 看一下监听状态,重启一下
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
最后一行改成
(SID_NAME = orcl)
lsnrctl status 看一下监听状态,重启一下
追问
试过了,侦听器正常的
追答
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbs91.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.example.com)
)
(SERVICE_NAME = orcl.example.com) 改成 (SERVICE_NAME = orcl)试试
把lsnrctl service 结果放上来看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询