It’s been a while since I worked with Java and especially JDBC. Today I spent a while trying to get the Oracle BI Publisher to connect to a SQL Server 2005 instance.
I found various examples of different ways to define the instance name in the connection string. After trying them all I could only conclude that defining the instance specific port number is the only way to get a connection established.
Reading the MSDN documentation a bit closer also revealed that it is the recommended way.
How do I know what the instance specific port number is? Easy!
- Fire Up the SQL Server Configuration Manager
- Expand the the SQL Server 2005 Network Configuration node
- Click on the instance you want
- Double click on the TCP/IP item
- Switch to the IP Addresses tab
The port number needed is the item named TCP Dynamic Ports.