||SQL Server Tips by Gama and Naughter
Use 0 as the port number
SQL Server will use the first free port between 1024 and 5000,
instead of 1433 (TCP access to the database, usually remote).
However, 1434 (UDP, to access and browse named instances) will not
change. Let us suppose the first available port was 1027, SQL Server
will take this port and used it there after. If many other programs
are listening on ports, then the port number SQL Server will use
will be the first one
it finds available. You can list the ports active on your machine by
using the "netstat -a" command line.
Select a port from 1024 to 5000
SQL Server will listen to any port selected, 1434 will not change.
Obviously, no other application should use the port and the firewall
should protect it. If the server is not always running, the port
will be free and there is the possibility that other application
might start using that port.
The above book excerpt is from:
Turbocharge Database Performance with C++ External Procedures
Joseph Gama, P. J. Naughter