When input an error instance name and right port number of sql server 2016, still connect successfully

Rocky Shi 1 Reputation point
2020-09-18T09:26:21.857+00:00

![25841-error.jpg][1]![25730-ok.png][2]

[1]: /api/attachments/25841-error.jpg?platform=QnA ---- error instance name
[2]: /api/attachments/25730-ok.png?platform=QnA ---- right instance name for the same server

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,684 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-09-18T09:30:19.73+00:00

    The instance name is ignored when you connect using a port number. It is irrelevant since you have pointed to which instance to connect to using the port number. Never specify an instance name when you connect using a port number, it is only confusing - as you just have experienced.

    I would have preferred if MS decided to catch this as an error and gave us an error message when it detects a backslash and a comma (i.e., when we try to use both).

    0 comments No comments

  2. m 4,271 Reputation points
    2020-09-21T06:04:54.26+00:00

    Hi @Rocky Shi ,

    That is not one error, there are many connecting methods.

    There can be multiple SQL Server instances on a server, and you can specify multiple port numbers for an instance, and each instance uses a different port number. When you use the port number to connect, IP and Port numner are its unique identification.

    26047-20200921sqlserverconnect.jpg

    More information :configure-a-server-to-listen-on-a-specific-tcp-port

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  3. m 4,271 Reputation points
    2020-09-22T01:35:10.847+00:00

    Hi @Rocky Shi ,

    Is the reply helpful?

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  4. m 4,271 Reputation points
    2020-09-23T01:46:55.523+00:00

    Hi @Rocky Shi ,

    Is the reply helpful?

    BR,
    Mia

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.