连接到DB2 [英] Connecting to DB2
问题描述
我正在尝试使用IBM.Data.DB2提供程序连接到DB2数据库并获取以下消息
错误[08001] [IBM ] SQL30081N检测到通信错误。
正在使用的通信协议:TCP / IP。正在使用的通信API:
SOCKETS。检测到错误的位置:10.100.1.69。
检测错误的通信功能:连接。特定协议
错误代码:" 10061"," *"," *"。 SQLSTATE = 08001
当我使用DB2控制中心或设置ODBC连接时,它工作正常
这是我的连接字符串:
>
数据库= mydatabase;服务器= db2server:6000; UID =测试用户; PWD =密码
有没有人有这个问题的解决方案,或者如何解决这个问题?
谢谢
彼得
I am trying to connect to a DB2 database with IBM.Data.DB2 provider and
getting the following message
ERROR [08001] [IBM] SQL30081N A communication error has been detected.
Communication protocol being used: "TCP/IP". Communication API being used:
"SOCKETS". Location where the error was detected: "10.100.1.69".
Communication function detecting the error: "connect". Protocol specific
error code(s): "10061", "*", "*". SQLSTATE=08001
When I use DB2 control center or setup a ODBC connection it works fine
Here is my connection string:
Database=mydatabase;Server=db2server:6000;UID=test user;PWD=password
Does anyone have a solution for this problem, or how to trouble shoot this?
Thank You
Peter
推荐答案
彼得,
>
偶然的机会,你在ASP.NET中运行它吗?如果是这样,ASP.NET默认运行在
本地用户ASPNET下,但没有网络访问权限。如果你的DB
在另一台机器上,这肯定是个问题。
对于你可能从互联网加载的程序也是如此
或您的网络(假设它不是来自数据库所在的机器)。
您能否提供有关错误的更多信息?
希望这会有所帮助。
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
" Peter" < PC ***** @ nospam.nospam>在消息中写道
新闻:eo ************** @ TK2MSFTNGP14.phx.gbl ...
Peter,
By chance, are you running this in ASP.NET? If so, ASP.NET runs under a
local user ASPNET by default that does not have network access. If your DB
is on another machine, this could definitely be a problem.
The same is true for a program you might have loaded from the internet
or your network (assuming it is not from the machine that the DB is on).
Can you give a little more information about the error?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Peter" <pc*****@nospam.nospam> wrote in message
news:eo**************@TK2MSFTNGP14.phx.gbl...
我正在尝试连接获取IBM.Data.DB2提供程序的DB2数据库和获取以下消息
ERROR [08] [IBM] SQL30081N检测到通信错误。
通信协议正在使用:TCP / IP。使用的通信API:SOCKETS。检测到错误的位置:10.100.1.69。
检测错误的通信功能:连接。协议特定的错误代码:10061,*,*。 SQLSTATE = 08001
当我使用DB2控制中心或设置ODBC连接时,它工作正常
这是我的连接字符串:
数据库= mydatabase; Server = db2server :6000; UID =测试用户; PWD =密码
有没有人有这个问题的解决方案,或者如何解决这个问题?
谢谢你
彼得
I am trying to connect to a DB2 database with IBM.Data.DB2 provider and
getting the following message
ERROR [08001] [IBM] SQL30081N A communication error has been detected.
Communication protocol being used: "TCP/IP". Communication API being
used: "SOCKETS". Location where the error was detected: "10.100.1.69".
Communication function detecting the error: "connect". Protocol specific
error code(s): "10061", "*", "*". SQLSTATE=08001
When I use DB2 control center or setup a ODBC connection it works fine
Here is my connection string:
Database=mydatabase;Server=db2server:6000;UID=test user;PWD=password
Does anyone have a solution for this problem, or how to trouble shoot
this?
Thank You
Peter
这与网络访问无关,不使用集成安全性
这里,连接字符串包含明确的用户凭据。
Willy。
Nicholas Paldino [.NET / C#MVP] " < mv*@spam.guard.caspershouse.com>写在
消息新闻:O
This has nothing to do with network access, integrated security is not used
here, the connection string contains explicit user credentials.
Willy.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O
************** @ TK2MSFTNGP12.phx.gbl ...
|彼得,
|
|一个偶然的机会,你在ASP.NET中运行它吗?如果是这样,ASP.NET运行在
a
|默认情况下本地用户ASPNET没有网络访问权限。如果您的
DB
|在另一台机器上,这肯定是个问题。
|
|您可能从互联网上加载的程序也是如此
|或者您的网络(假设它不是来自数据库所在的机器)。
|
|你能提供一些关于错误的更多信息吗?
|
|希望这会有所帮助。
|
|
| -
| - Nicholas Paldino [.NET / C#MVP]
| - mv*@spam.guard.caspershouse.com
|
| "彼得" < PC ***** @ nospam.nospam>在消息中写道
|新闻:eo ************** @ TK2MSFTNGP14.phx.gbl ...
| >我正在尝试使用IBM.Data.DB2提供程序连接到DB2数据库,并且
| >收到以下消息
| >
| >错误[08] [IBM] SQL30081N检测到通信错误。
| >使用的通信协议:TCP / IP。通信API是
| >使用:SOCKETS。检测到错误的位置:10.100.1.69。
| >检测错误的通信功能:连接。协议
具体
| >错误代码:" 10061"," *"," *"。 SQLSTATE = 08001
| >
| >当我使用DB2控制中心或设置ODBC连接时,它工作正常
| >这是我的连接字符串:
| >
| > Database = mydatabase; Server = db2server:6000; UID = test user; PWD = password
| >
| >有没有人有这个问题的解决方案,或如何解决问题
| >这个?
| >
| >
| >谢谢
| >
| >
| >彼得
| >
| >
|
|
**************@TK2MSFTNGP12.phx.gbl...
| Peter,
|
| By chance, are you running this in ASP.NET? If so, ASP.NET runs under
a
| local user ASPNET by default that does not have network access. If your
DB
| is on another machine, this could definitely be a problem.
|
| The same is true for a program you might have loaded from the internet
| or your network (assuming it is not from the machine that the DB is on).
|
| Can you give a little more information about the error?
|
| Hope this helps.
|
|
| --
| - Nicholas Paldino [.NET/C# MVP]
| - mv*@spam.guard.caspershouse.com
|
| "Peter" <pc*****@nospam.nospam> wrote in message
| news:eo**************@TK2MSFTNGP14.phx.gbl...
| >I am trying to connect to a DB2 database with IBM.Data.DB2 provider and
| >getting the following message
| >
| > ERROR [08001] [IBM] SQL30081N A communication error has been detected.
| > Communication protocol being used: "TCP/IP". Communication API being
| > used: "SOCKETS". Location where the error was detected: "10.100.1.69".
| > Communication function detecting the error: "connect". Protocol
specific
| > error code(s): "10061", "*", "*". SQLSTATE=08001
| >
| > When I use DB2 control center or setup a ODBC connection it works fine
| > Here is my connection string:
| >
| > Database=mydatabase;Server=db2server:6000;UID=test user;PWD=password
| >
| > Does anyone have a solution for this problem, or how to trouble shoot
| > this?
| >
| >
| > Thank You
| >
| >
| > Peter
| >
| >
|
|
这篇关于连接到DB2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!