pb9.0连接Oracle数据库报ORA-12154错误
麻烦各位大侠帮我看看哪里没弄对,为什么连不上(plsql,sqlplus都能连上)tnsnames.ora内容为:#tnsnames.oraNetworkConfigur...
麻烦各位大侠帮我看看哪里没弄对,为什么连不上(plsql,sqlplus都能连上)
tnsnames.ora内容为:
# tnsnames.ora Network Configuration File: d:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = leo)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC))(HOST = 127.0.0.1)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
sqlnet.ora内容为:
# sqlnet.ora Network Configuration File: d:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
pb9.0内设置为: 展开
tnsnames.ora内容为:
# tnsnames.ora Network Configuration File: d:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = leo)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC))(HOST = 127.0.0.1)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
sqlnet.ora内容为:
# sqlnet.ora Network Configuration File: d:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
pb9.0内设置为: 展开
5个回答
展开全部
plsql,sqlplus都能连上,这说明码迹你在客户端迟握并都能够连上。首先确定在客户端的PL/SQL到底能不能连上,连得上说明就是tnsname文件配置对的。那么你就要看看这个软件关于连接oracle的配置方法,
我看了一下皮唯你写的,貌似是连接你本地的oracle数据库是吧。你试着吧
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = leo)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
把(HOST = leo)改为你的ip地址~~~,还不行,重启监听试试!
如果还不行,看看你的pb9.0连接的端口号对不对。网上找找关于pb9.0的配置文件
我看了一下皮唯你写的,貌似是连接你本地的oracle数据库是吧。你试着吧
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = leo)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
把(HOST = leo)改为你的ip地址~~~,还不行,重启监听试试!
如果还不行,看看你的pb9.0连接的端口号对不对。网上找找关于pb9.0的配置文件
更多追问追答
追问
1、PL/SQL确实能连上
2.是自己机器上的库
3.把(HOST = leo)改为你的ip地址 这其中的ip是指127.0.0.1 还是外网地址?
追答
改为你本地的ip,不过我们本地的一般不设为127这个,我的是192.168.15.2,你可以换ip试试,用tnsping orcl看看能不能通
展开全部
new.fmcode,
case :new.fmtype when 1 then '01' when 2 then '宏镇液蔽物02' when 3 then '03' else '旅伍01' end
from dual
case :new.fmtype when 1 then '01' when 2 then '宏镇液蔽物02' when 3 then '03' else '旅伍01' end
from dual
追问
我擦你妹 子曰:知之为知之不知为不知是知也。 你他妈不懂就别瞎发。什么乱七八糟的东西!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我扰厅也遇到了同样的问题,差枯执行源程序时没有问题,编译后就出现问题,我也用的是 pb9.0 和 oracle 10g 10.2.0,我估计是不是 pb9.0 无法正确解析 tnsnames.ora 中的内容虚李洞?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用sqlplus
追问
程序是pb9.0环境编的 sqlplus有啥用 我总不能去培训客户用sql语句直接操作数据库吧?
追答
host是主机名啊
sqlplus test@test_192.168.1.1/newtest
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在system那里有没有把它设为:ORCL,没有的话,就把它设为ORCL应该可以了
追问
改过之后还是报ORA-12154错误
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询