PL/SQ连接oracle数据库的问题,ORA-12154: TNS:could not resolve the connect identifier specified 错误
来源:互联网 发布:电脑有些什么软件 编辑:程序博客网 时间:2024/06/11 21:46
PL/SQ连接oracle数据库的问题
(1)下载Oracle Client Package
文件名为:instantclient-basic-nt-xx.x.x.x.x
解压:例如路径为:D:\instantclient-basic-nt-xx.x.x.x.x
(2)安装PL/SQ
(3)启动PL/SQ —> 取消登录 —> 工具(tools) —> 首选项(preference)
设置:
Oracle主目录名: D:\instantclient-basic-nt-xx.x.x.x.x
OCI 库: D:\oracle_client\instantclient-basic-nt-xx.x.x.x.x\oci.dll
(4)设置实例数据库TNS
找到实录数据库中的tnsnames.ora文件:例如:
D:\app\zqh\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
填入TNS例如:
REPORTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 目标数据库的ip)(PORT = 端口号))
)
(CONNECT_DATA =
(SERVICE_NAME = 数据库名)
)
)
多个IP的TNS
REPORTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 目标数据库的ip)(PORT = 端口号))
(ADDRESS = (PROTOCOL = TCP)(HOST = 目标数据库的ip)(PORT = 端口号))
)
(CONNECT_DATA =
(SERVICE_NAME = 数据库名)
)
)
注意:每个TNS名(例如REPORTDB)前不要有空格
(5)设置TNS_ADMIN环境变量
我的电脑 —> 属性 —> 高级系统设置 —> 高级 —> 环境变量 —> 点击最下方的 新建 —> 变量名(变量名不可变)设置为:TNS_ADMIN —> 变量值(tnsnames.ora文件所在文件夹路径):例如D:\app\zqh\product\11.2.0\dbhome_1\NETWORK\ADMIN
设置完之后就可以再PL/SQL登录空中找到数据库实例名了。
否则出现:ORA-12154: TNS:could not resolve the connect identifier specified 错误
- PL/SQ连接oracle数据库的问题,ORA-12154: TNS:could not resolve the connect identifier specified 错误
- PL/SQL developer连接oracle出现“ORA-12154:TNS:could not resolve the connect identifier specified”问题的解决
- 用PL/SQL连接oracle遇到的问题及解决方法:ORA-12154:TNS:could not resolve the connect identifier specified。。
- PL/SQL developer连接oracle出现“ORA-12154:TNS:could not resolve the connect identifier specified”问题的解决
- pl/sql ORA-12154: TNS:could not resolve the connect identifier specified的问题
- PL/SQL Developer 中的另一个问题:ORA-12154: TNS:could not resolve the connect identifier specified
- 出现ORA-12154: TNS:could not resolve the connect identifier specified 连接错误
- 使用sqlplus连接数据库时报"ORA-12154:TNS:could not resolve the connect identifier specified"解决办法
- hpux oracle中ORA-12154: TNS:could not resolve the connect identifier specified错误解决
- ORA-12154: TNS:could not resolve the connect identifier specified错误的可能原因
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154:TNS could not resolve the connect identifier specified
- ORA-12154: TNS: could not resolve the connect identifier specified
- ORA-12154:TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- 黑马程序员 对象序列化
- 工作中需要做的更好的事项
- Pro Android学习笔记(二八):用户界面和控制(16):GridLayout
- DispatcherServlet
- 解决ArcSDE图层名被占用的问题
- PL/SQ连接oracle数据库的问题,ORA-12154: TNS:could not resolve the connect identifier specified 错误
- python eventlet并发原理分析
- IQiyi sdk
- 007趣味——微软面试海盗分宝石+飞机加油
- iOS关于数据库的操作(使用第三方类库FMDB)
- Android-ListView几个比较特别的属性
- apache https配置
- 视频刻录的简单实现
- android转型宅家研究小日记(初学者笔记)49天(结束宅家)