cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with a JDBC Adapter when connect to Instance on SQL Server

Former Member
0 Kudos

Hi,

Currently I'm setting up a communication channel with the JDBC adapter to work on a SQL Server database. When I use a string without specifying the connection instance, the JDBC driver takes the default instance and connects to a database without problems.

jdbc: sqlserver: / / Server01; databaseName = IntegraSAP1

The problem is when I need to connect to another instance of it server.

jdbc: sqlserver: / / Server01; instanceName = SAP; databaseName = IntegraSAP2

The JDBC driver, in short, send me the following error:

Cause Exception: 'Error when attempting

to get processing resources: com.sap.aii.af.lib.util.concurrent.ResourcePoolException:

Unable to create new pooled resource: DriverManagerException:

Can not establish connection:: com.microsoft.sqlserver.jdbc.SQLServerException:

The connection to the named instance has failed. Error:

java.net.UnknownHostException: .

I appreciate your help,

Regards,

Johnny

Accepted Solutions (1)

Accepted Solutions (1)

sunilchandra007
Active Contributor
0 Kudos

Hi Johnny,

Just give a try with this

> jdbc:sqlserver:/ /Server01\SAP:1433; databaseName = IntegraSAP2

Regards,

Sunil Chandra

Answers (3)

Answers (3)

Former Member

The problem was that the port was closed instance the SAP PI server. The standard port is 1433 and is the default instance. The additional instance had been assigned a different port.

Add URL which helped me solve the problem.

[Problems faced while connecting to SQL server using JDBC adapter in PI|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/14635] [original link is broken] [original link is broken] [original link is broken];

Regards,

Johnny

Former Member
0 Kudos

Hi Sunil,

Also try connecting without placing the standard port and also via the specific port of the instance and not

worked.

Johnny

Former Member
0 Kudos

just try with

jdbc: sqlserver: / / Server01; databaseName = IntegraSAP2

and see if it works, as database name is different so i dont think you need to give port or instance name.

Let me know if it doesnt work.

Thanks,

Hetal

Former Member
0 Kudos

I had already tried this alternative, like putting it as parameters the conection string and does not work.

Regards,

Johnny

sunilchandra007
Active Contributor
0 Kudos

Not sure, might be port number is not required in case using instance. Give one more try with :

jdbc:sqlserver:/ /Server01\SAP; databaseName = IntegraSAP2

A comment from http://msdn.microsoft.com/en-us/library/ms378428.aspx

"SQL Server 2000 and SQL Server 2005 allow for the installation of multiple database instances per server. Each instance is identified by a specific name. To connect to a named instance of SQL Server, you can either specify the port number of the named instance (preferred), or you can specify the instance name as a JDBC URL property or a datasource property."

Regards,

Sunil Chandra