How to connect to a SQL Server 2000 named instance with JDBC

Source: Internet
Author: User

How to connect to a SQL Server 2000 named instance with JDBC

View products that this Article applies.

Article ID

:

313225

last review

:

July 2, 2004

Revision

:

2.2

This article was previusly published under q313225


Summary

Microsoft SQL Server 2000 supports multiple instances of the SQL Server database engine that run concurrently on the same computer. the following are the two types of SQL Server database engine instances: Default and named. there can only be one default instance that runs on any computer, and it is identified by the name of the computer on which the default instance runs. the computer name and Instance name are typically specified in the following format:

Computer_name \ instance_name

To connect to a named instance through the Microsoft SQL Server 2000 driver for JDBC, you must specify the port number that is associated with the named instance, instead of the name of the named instance as shown earlier.


More information

To find the SQL server instance port number, follow these steps:

1.

On the Microsoft SQL Server 2000 Server, start the SQL server network utility.

2.

click the General tab, and then click the instance you want from the instances drop-down menu.

3.

Click TCP/IP, and then clickProperties. Note that the port number for this instance appears inPropertiesDialog box.

As soon as you have this value, you can use it in your connection URL when you connect to SQL Server through JDBC. The following is an example of a typical connection URL:

 
 

JDBC: Microsoft: sqlserver: // yourservername: 1433; user = youruser; Password = yourpwd

In this example, the default port of 1433 is used. replace this default with the port number for your named instance.

 
 

Source Document <Http://support.microsoft.com/default.aspx? SCID = KB; en-US; 313225>

 
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.