Skip to main content

Connecting Glassfish to SQL Server 2005 named instance

3 replies [Last post]
alecswan
Offline
Joined: 2003-11-10

SQL Server 2005 allows multiple server instances to be installed on one machine. I am using jTDS JDBC driver and can successfully connect to a machine which runs a single SQL Server 2005 and does not use named instances.

However, I can't figure out how to configure Glassfish Connection Pool to connect to a specific SQL Server named instance which runs on my local machine.

jTDS documentation (http://jtds.sourceforge.net/faq.html#instanceName) says that I need to set "instance" JDBC property to the name of the SQL Server 2005. But when I do that and click Ping on the Connection Pool console I get an error "Unable to get information from SQL Server: localhost."

Any ideas?

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sm157516
Offline
Joined: 2005-03-28

According to the documentation, you would need to specify instance name as a separate property and not with the hostname. So in the configuration you will have

The property URL would be something like

HTH
Shalini.

alecswan
Offline
Joined: 2003-11-10

I did set "instance" property on the "Additional Properties" page of the Connection Pool Configuration. But when I did that and click Ping on the Connection Pool console I get an error "Unable to get information from SQL Server: localhost."

Sorry I was not clear about this in my previous message.

jr158900
Offline
Joined: 2005-04-13

you can refer :
http://blogs.sun.com/JagadishPrasath/entry/jdbc_connection_pool_template...

for required properties to configure pool against a particular driver.

1) Please check whether those settings work for you. If not, post your pool configuration.
2) When you ping, there may be a exception logged in server.log (GF_INSTALL/domains//logs/server.log), post the exception.

Happened to see this blog:
http://www.technowledgebase.com/2007/06/05/6/