Posted on Leave a comment

Specifying SQL Server instance

Connecting to a SQL Server instance using jdbc drivers, you need to append ‘;instance=INSTNAME’ to the connection string like the following:

jdbc:jtds:sqlserver://<SQLServer>:<PORT>/<DBName>;instance=<SQLInstanceName>

Example:
jdbc:jtds:sqlserver://localhost:1433/mydb;instance=SQLEXPRESS

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.