I do run a sql server light 2014 version..
and after reboot somtimes dynamic port tcp is changing..
so i have to add that new port into firewall incoming rules to let sql server clients work again and
gain access to the server machine through the firewall.
my questions are:
is there any possibility to prevent this behaviour of changing daynmic ports in reboot?
is there any chance to log the current and old port into a logfile on desktop by scripting or so?
is there maybe a chance if happens.. to let the new port number directly let update firewall and
give the new port number there without interactions?
all clients are windows 10 clients and sql machine too.
I would have assumed that a fixed port not set for the first time a data is set?
Why is the port changed after Reboot without any Action by other side? Any Idea?
How to set as a fixed port? Would be nice to explain it a bit. Would be another solution!
i just found out how to read the port using reg query...
when the system is rebooted the dynamic port being used by sql is released and will be used by any other process looking for port. Making it static will reserve it for the sql server.
As ahmeds08 says, please don't change the registry directly. You can use SQL Server Configuration Manager to change the Network Configuration of the server and assign it a static port. It will require a restart of the service.