• Avinash Barnwal (9/7/2011)


    The third way doesn't seem to be option to find out which of the port SQL Server is listening, since if you are already connected to the SQL server, then you already know the Port.

    Not completely true. You can connect using a named instance and never know the port you're attaching to.

    The SQL Browser service listens on port UDP 1434 and returns the port of the named instances in a datagram. The client application parses the datagram and connects to the port returned by the SQL Browser.

    -- Gianluca Sartori