ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » jdbc connection issue to sql server

Post new topic  Reply to topic
 jdbc connection issue to sql server « View previous topic :: View next topic » 
Author Message
firoj.badsa
PostPosted: Tue Apr 19, 2016 6:14 am    Post subject: jdbc connection issue to sql server Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Tue Apr 19, 2016 6:21 am    Post subject: Re: jdbc connection issue to sql server Reply with quote

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
View user's profile Send private message
firoj.badsa
PostPosted: Tue Apr 19, 2016 6:24 am    Post subject: Reply with quote

Centurion

Joined: 16 Feb 2007
Posts: 104

I did not edit the error message..
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Apr 19, 2016 6:26 am    Post subject: Reply with quote

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
View user's profile Send private message
firoj.badsa
PostPosted: Tue Apr 19, 2016 6:29 am    Post subject: Reply with quote

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
View user's profile Send private message
firoj.badsa
PostPosted: Tue Apr 19, 2016 6:34 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Tue Apr 19, 2016 9:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
firoj.badsa
PostPosted: Wed Apr 20, 2016 2:41 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Wed Apr 20, 2016 3:00 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Apr 20, 2016 4:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » jdbc connection issue to sql server
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.