How To Connect to a SQL Server 2000 Named Instance with JDBC

來源:互聯網
上載者:User

How To Connect to a SQL Server 2000 Named Instance with JDBC

View products that this article applies to.

Article ID

:

313225

Last Review

:

July 2, 2004

Revision

:

2.2

This article was previously 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 click Properties. Note that the port number for this instance appears in the Properties dialog 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.

 
 

來源文件 <http://support.microsoft.com/default.aspx?scid=kb;en-us;313225>

 
 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.