"File is read only" when trying to change TCP settings in SQL Server Configuration Manager

Today I hit upon this bug that’s apparently been around for ages. In short, sometimes SQL Server Configuration Manager works as expected when it comes to enabling and disabling specific IP addresses for the instance to listen on, and sometimes you are greeted with a very irritating message telling you that “the specified file is read only”. Not very helpful, unfortunately.

Digging deeper into this, there is a fairly simple way to get around the issue, provided one is not afraid of dipping into the registry. All of the settings in the configuration manager are stored in the registry and can be edited there without the pesky error message. Go to the following key:

HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\***INST***\MSSQLServer\SuperSocketNetLib\Tcp\

where ***INST*** is the name of the instance you want to edit.

Under this registry folder in the left tree you will find subfolders for IP1, IP2 and so on - these correspond to what can be seen in the configuration manager. The next step is simply to click on folder for the IP you wish to edit and thange whatever settings you want. In my case I wanted the instance to only listen to a specific IP, so I set all the other IPs to inactive (i.e set the “Active” key to 0). A quick restart of the SQL Server service later and I was able to verify via the error log that the instance was indeed only listening on that specific IP.