SQL Server Multiple Instances with IP Addresses
I am running a system with SQL Server 2008 R2. Â Along with the default instance, I have a second SQL Server instance for another application. Â What we need to do is assigned the system with 2 IP Addresses, then set one instance to one IP Address and the second instance with it's own IP Address using the same port 1433/1434.
Network Configuration
In the Local Area Properties, you need to edit TCP/IP4 Properties and add the 2nd IP Address in the IP Settings tab.
In DNS tab, Uncheck 'Register this connection's addresses in DNS'
This adds the 2nd IP Address to the system. Â May require network configuration changes to forwarding or resolving the IP Address or Hostname to this systems Network Adapter. Â Also may require a /dnsflush and /registerdns.
SQL Server Configuration Manager
Assuming you already installed the default and the second database instance, you will need to go to the SQL Server Configuration Manager.
First thing is to add a new Alias. Â I chose the alias that was registered in the DNS to resolve the name to this systems 2nd IP Address. Â You can test with NSLOOKUP or PING to see if you can reach the system.
I then set the Port number to 1433, Protocol to TCP/IP and set the Server to the second IP Address.
Protocols for the DEFAULT SQL Server Instance
Select this from the menu on the left, in the right you should see Shared Memory, Named Pipes, TCP/IP and VIA. Â All except VIA should be enabled.
Open TCP/IP Properties
Protocol tab
Set Listen All to No (This disables this instance to listen for any IP requests, 127.0.0.1, 10.0.0.1)
To my understanding, when a SQL Server is listening, by default it uses the default SQL Server Instance. Â If there is a call to the 2nd instance, this network configuration will response to the client with a dynamic port on 1434, then the client makes another call with the new dynamic port. Â Typically networks with strict firewall rules will block those dynamic ports.
Next make changes the IP Addresses assigned to this instance.
IP1 Active: Yes Enabled: Yes IP Address: 1st IP Address (System IP Address) TCP Dynamic Ports: [Blank] TCP Port: 1433
The remaining IPs should all be set to Active Yes, Enabled No. Â Most IPS will be set to 192.168.1.1 or 127.0.0.1, 10.0.0.1 or ::1. Â All the TCP Dynamic Ports needs to all be cleared and TCP Port set to 1433.
Protocols for the SECOND SQL Server Instance
Everything should apply the same settings above, just ensure that the IP1 IP Address is set to the 2nd IP Address you assigned to the system.
Now test using SQL Server Management Studio (SSMS)
Test connections using the Systems Hostname and IP Address, SSMS should open the default instance. Â To compare, you should be able to also connect to the default instance using localhost or localhost IP Address.
Now test your connections to the second instance using the Alias Name and 2nd IP Address. Â SSMS should open the second instance. Â Also you can compare by connecting using the HOSTNAME/2NDINSTANCENAME.
If you can access both instances with it's own IP Address using the same port 1433. Â
Done.











