Query Analyzer log on to a remote SQL Server with a non-default port

Source: Internet
Author: User
Tags log odbc sql server driver client port number
server| Query Analysis


These days in the web development, often need to connect SQL Server, but SQL Server is the server on the Internet, the service provider gave a sqlconnectionstring, However, in the connection string found that the SQL Server does not use the default 1433 port, so I would like to Query Analyzer should not log on, the results verified that my idea is right. In this case, you can only write a simple SQL execution program in the program, the method is stupid not intuitive, difficult to operate, easy to happen abnormal, database maintenance difficulties. Based on so many flaws, decided to give up this clumsy way, on the internet with a lot of keywords still can not find the solution, perhaps the key word is not in place! Hey.. But inadvertently saw the word "ODBC", a flash, since the query access port can not be changed, we can configure a remote SQL Server data source, which is based on the SQL Server driver, the driver can change the port, An ODBC-configured SQL Server can be accessed by the configured query. Oh.. Not easy.

Here's the whole process:

Environment: Win2003

Start-> Settings-> Control Panel-> admin tools-> Data Source (ODBC)-> add-> Select SQL Server-> fill in the appropriate data (the server does not need to fill out the port number)-> Select Client Configuration "-> Cancel the dynamic decision port" (default is 1433, now you change it anyway)

Speaking of which, I should not talk about it. Hey.. After configuration, use Query Analyzer to see, is not more than a server let you choose landing ...

Method Two:
Use the SQL Server Client Network Utility to modify the SQL TCP/IP protocol default port. Detailed process: slightly



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.