JDBC: SQL Server and Named Instances
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.
jdbc:hyperion:sqlserver://<server>:<port>;DatabaseName=<database>...
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.
In my settings i find:
IP1:
Active: yes
Enabled: No
IP: fe80::f100:32bb:b7cf:c16e%9
TCP Dynamic Port: 0
TCP Port:
where is my port no?
Kabindra
March 23, 2010 at 15:48
Hope this KB article can help you: How to configure an instance of SQL Server to listen on a specific TCP port or dynamic port
Tom
April 7, 2010 at 14:48