Author |
Message
|
firoj.badsa |
Posted: Tue Apr 19, 2016 6:14 am Post subject: jdbc connection issue to sql server |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
trying to connect to SQL Server from IIB9. below is the configurable service created
C:\Program Files\IBM\MQSI\9.0.0.1\bin>mqsireportproperties IB -c JDBCProviders -
o INTRANET -r
JDBCProviders
INTRANET
connectionUrlFormat='jdbc:sqlserver://[serverName]:[portNumber];DatabaseName
=[databaseName];user=[user];password=[password]'
connectionUrlFormatAttr1=''
connectionUrlFormatAttr2=''
connectionUrlFormatAttr3=''
connectionUrlFormatAttr4=''
connectionUrlFormatAttr5=''
databaseName='INTRANET'
databaseSchemaNames='useProvidedSchemaNames'
databaseType='Microsoft SQL Server'
databaseVersion='default_Database_Version'
description='default_Description'
environmentParms='default_none'
jarsURL='C:\\IIB\\jdbcjar'
jdbcProviderXASupport='jdbcProviderXASupport'
maxConnectionPoolSize='0'
portNumber='1433'
securityIdentity='EANIdentity'
serverName='sqlservername'
type4DatasourceClassName='com.microsoft.sqlserver.jdbc.SQLServerXADataSource
'
type4DriverClassName='com.microsoft.sqlserver.jdbc.SQLServerDriver'
BIP8071I: Successful command completion.
I received below error --
Text:CHARACTER:jdbc:sqlserver://default_Database_Server_Name:1433;DatabaseName=default_Database_Name;user=LocalSystem;password=xxxxxxxx
Insert
Type:INTEGER:5
Text:CHARACTER: error message: The TCP/IP connection to the host default_Database_Server_Name, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port."., SQLState value: 08S01, stack trace: [com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1033) |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 19, 2016 6:21 am Post subject: Re: jdbc connection issue to sql server |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
This is odd.
firoj.badsa wrote: |
connectionUrlFormat='jdbc:sqlserver://[serverName]:[portNumber];DatabaseName
=[databaseName];user=[user];password=[password]'
databaseName='INTRANET'
DatabaseName=default_Database_Name; |
Is that a typo? where you changed the DatabaseName property in the error message? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
firoj.badsa |
Posted: Tue Apr 19, 2016 6:24 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
I did not edit the error message.. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 19, 2016 6:26 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
... Did you set the right property on the node to use the database definition? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
firoj.badsa |
Posted: Tue Apr 19, 2016 6:29 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
I am using q database retrieve node.. so, I had to give only table name there.. did not provide any configurable details.. |
|
Back to top |
|
 |
firoj.badsa |
Posted: Tue Apr 19, 2016 6:34 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
I receive the below error while trying from a javacompute node...
Insert
Type:INTEGER:5
Text:CHARACTER:Broker 'IB'; Execution Group 'IS1'; Message Flow 'jdbcconnection_test'; Node 'InsertDB'; Node Type 'jdbcconnection_test_InsertDB
Insert
Type:INTEGER:5
Text:CHARACTER:jdbc:sqlserver://servername:1433;DatabaseName=INTRANET;user=IIB;password=xxxxxxxx
Insert
Type:INTEGER:5
Text:CHARACTER: error message: The TCP/IP connection to the host slwbeinp001, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port."., SQLState value: 08S01, stack trace: [com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1033)
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700) |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Apr 19, 2016 9:08 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Does this not tell you a lot about the problem?
Code: |
The TCP/IP connection to the host slwbeinp001, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port."
|
Have you used this connection to this DB before? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
firoj.badsa |
Posted: Wed Apr 20, 2016 2:41 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
I did not connect through any node, but I can connect to the database from toolkit. from this i feel we should be able to connect from runtime also and should not be a firewall issue. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Apr 20, 2016 3:00 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
did you create the JDBC connection properly?
This forum has many tales of woe where people have got this wrong.
Connecting from the TK is fine. If the runtime is on the same box then you know that there are no firewalls in the way.
The runtime needs to have its own connection defined. It does not use the DB config you setup in the TK (for very good reasons). _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 20, 2016 4:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
firoj.badsa wrote: |
I did not connect through any node, but I can connect to the database from toolkit. from this i feel we should be able to connect from runtime also and should not be a firewall issue. |
Only if the runtime is on the same server as the tookit. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|