How to configure multiple instance of MS_SQL for web applications

satyam mehrotra 21 Reputation points
2022-02-07T10:10:24.913+00:00

Hi Guys,

I am using SQL 2016 for my web applications till now and everything was working great, but because of some scenarios, I needed SQL 2019 for two web applications.

So, I installed SQL 2019 on the same server, so now I have SQL 2016 and SQL 2019.

But the problem is, both the new apps which are using SQL 2019 are not accessible from the internet. DO I need to make any specific changes?

One thing I noticed, in the SQL config manager the new SQL server network setting port numbers are empty, meaning they are not showing 1433 in from of ports.

SQL Server | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,441 Reputation points
    2022-02-07T11:23:28.7+00:00

    If you have installed 2 SQL Server instances on one machine, then is at least one a "named instance" and you have to additional add the instance name to server name in your connection string,
    e.g.
    Server=MachineName\InstanceName;Database=...

    SQL server network setting port numbers are empty

    That means, the instance uses dynamically ports and the port can change on every restart. You can assign a fix port, see
    https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-server-to-listen-on-a-specific-tcp-port?view=sql-server-ver15

    1 person found this answer helpful.
    0 comments No comments

  2. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2022-02-08T06:46:07.123+00:00

    Hi @satyam mehrotra ,

    Did you specify the SQL server instance name in connection string as Olaf mentioned? Such as below;

    Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;

    > in the SQL config manager the new SQL server network setting port numbers are empty, meaning they are not showing 1433 in from of ports.

    Agree with Olaf. You are using dynamically port. You can follow the MS document that Olaf offered to set the fixed port for named instance.In addition, TCP port 1433 is for SQL server default instance.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.