Looking for an easy way to know what port number your SQL Server is listening on? You can of course go to the Configuration Manager or check through the registry… but an even simpler way is to query the view
SYS.DM_EXEC_CONNECTIONS which will tell you provided you’re connected over TCP/IP
SELECT @@SERVERNAME As SqlServer,
LOCAL_NET_ADDRESS AS 'SqlServerIP',
LOCAL_TCP_PORT AS 'Port'
FROM SYS.DM_EXEC_CONNECTIONS WHERE SESSION_ID = @@SPID