Hide SQL Server database engine instances from network discovery | Cluster Instances | Availability Groups name
SQL Server Browser listens for incoming requests for Microsoft SQL Server resources and provides information about SQL Server instances installed on the computer. To prevent exposing an instance of the database engine to client computers that try to locate, we can use the following steps to hide the instance from SQL Server browser service. By using SQL Server Configuration Manager we can hide the instances.
- Open SQL Server Configuration Manager (SSCM).
- Expand SQL Server Network Configuration.
- Right-click on "Protocols for <instance_name>"( instance you want to hide) and then select Properties.
- On the Flags tab, in the HideInstance box, select Yes, and then click OK to close the dialog box. The change takes effect immediately for new connections.
Clustered Instances / Availability Group Name
If you hide a clustered instance or availability group name, cluster service may not be able to connect to SQL Server. This will cause the cluster instance IsAlive check to fail and SQL Server will go offline.
To avoid this, create an alias in all the nodes of the clustered instance or all instances that host availability group replicas to reflect the static port that you configured for the instance. For example, on an availability group with two replicas, on node-one, create an alias for the node-two instance, like node-two\instancename. On node-two, create an alias called node-one\instancename. The aliases are required for successful failover. Follow the below steps to create an alias.
- Open SQL Server Configuration Manager (SSCM).
- Expand SQL Server Native Client Configuration
- Right-click on Aliases, and then click New Alias.
- In the Alias Name box, type the name of the alias. Client applications use this name when they connect.
- In the Server box, type the name or IP address of a server. For a named instance append the instance name.
- In the Protocol box, select the protocol used for this alias. Selecting a protocol changes the title of the optional properties box to Port No, Pipe Name, or Connection String.
If you hide a clustered named instance, cluster service may not be able to connect to SQL Server if the LastConnect registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SNI11.0\LastConnect) has a different port than the port that SQL Server is listening on. If the cluster service is unable to make a connection to the SQL Server, you might see an error similar to the following:
Event ID: 1001: Event Name: Failover clustering resource deadlock.
References:
Thanks for your time. If you have any suggestions or queries, please comment below.
0 comments:
Post a Comment