Connecting to Named Instances


Microsoft SQL Server 2000 supports multiple instances of a SQL Server database running concurrently on the same server. An instance is identified by an instance name.

To connect to a named instance using a connection URL, use the following URL format:

jdbc:microsoft:sqlserver://server_name\\instance_name  

NOTE: The first backslash character (\) in \\instance_name is an escape character.

where:

server_name is the IP address or hostname of the server.

instance_name is the name of the instance to which you want to connect on the server.

For example, the following connection URL connects to an instance named instance1 on server1:

jdbc:microsoft:sqlserver://server1\\instance1;User=test;Password=secret 

To connect to a named instance using a data source, specify the ServerName connection property as described in the "Connection String Properties" topic.


Previous Document Previous Page Next Document Next Page Synchronize TOC Synchronize with Contents