By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,238 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,238 IT Pros & Developers. It's quick & easy.

DB2 Connection Issue

P: n/a
OK, I am trying to connect to DB2 (z/OS). I have successfully made the
connection to the database in the Server Explorer. I am also able to
successfully log in to DB2 when I am testing the "System DSN" in the ODBC
configuration tool (MS).

When In server Explorer, I click on my connection object and then select
properties to get the connection information. I then copy this connection
information and place it into a string object so that I can configure all the
connection information in my code. I add to that connection information the
"Password" as this does not show up in the properties.

When I attempt to connect to the Database, I get and error which suggest
that the user ID/Password is invalid. I know that this password and user ID
is valid, so it must be something else. A format issue or perhaps there is
somethine which is missing in the properties other then password. Below is
my connection information. I presume that I am connecting via ODBC (the
error mseeage points this out), but there is nothing in the properties for
the connection (within server explorer) which specifies that.

Dsn=DB29;uid=XXXXXX;pwd=YYYYYY,dbalias=DB29;schema list='GATSC'

Here is the error message that I am getting...
ERROR [08001] [IBM][CLI Driver] SQL30082N
Attempt to establish connection failed with security reason \"24\"
(\"USERNAME AND/OR PASSWORD INVALID\"). SQLSTATE=08001\r\n\r\nERROR [IM006]
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed"}
System.Exception {System.Data.Odbc.OdbcException}

SO what might be the problem?

Thanks in advance for your assistance!!

Jul 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

Take a look at connectionstrings.com

OLE DB, OleDbConnection (.NET) from ms
a.. TCP/IP:

"Provider=DB2OLEDB;Network Transport Library=TCPIP;Network
Address=XXX.XXX.XXX.XXX;Initial Catalog=MyCtlg;Package
Collection=MyPkgCol;Default Schema=Schema;User ID=MyUser;Password=MyPW"

b.. APPC:

"Provider=DB2OLEDB;APPC Local LU Alias=MyAlias;APPC Remote LU
Alias=MyRemote;Initial Catalog=MyCtlg;Package Collection=MyPkgCol;Default
Schema=Schema;User ID=MyUser;Password=MyPW"
ODBC
a.. Standard:

"driver={IBM DB2 ODBC
DRIVER};Database=myDbName;hostname=myServerName;po rt=myPortNum;protocol=TCPIP;
uid=myUserName; pwd=myPwd"
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"OldButStillLearning" <Ol*****************@discussions.microsoft.comwrot e
in message news:65**********************************@microsof t.com...
OK, I am trying to connect to DB2 (z/OS). I have successfully made the
connection to the database in the Server Explorer. I am also able to
successfully log in to DB2 when I am testing the "System DSN" in the ODBC
configuration tool (MS).

When In server Explorer, I click on my connection object and then select
properties to get the connection information. I then copy this connection
information and place it into a string object so that I can configure all
the
connection information in my code. I add to that connection information
the
"Password" as this does not show up in the properties.

When I attempt to connect to the Database, I get and error which suggest
that the user ID/Password is invalid. I know that this password and user
ID
is valid, so it must be something else. A format issue or perhaps there
is
somethine which is missing in the properties other then password. Below
is
my connection information. I presume that I am connecting via ODBC (the
error mseeage points this out), but there is nothing in the properties for
the connection (within server explorer) which specifies that.

Dsn=DB29;uid=XXXXXX;pwd=YYYYYY,dbalias=DB29;schema list='GATSC'

Here is the error message that I am getting...
ERROR [08001] [IBM][CLI Driver] SQL30082N
Attempt to establish connection failed with security reason \"24\"
(\"USERNAME AND/OR PASSWORD INVALID\"). SQLSTATE=08001\r\n\r\nERROR
[IM006]
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed"}
System.Exception {System.Data.Odbc.OdbcException}

SO what might be the problem?

Thanks in advance for your assistance!!

Jul 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.