Database Mirroring : How to find the TCP port being used for mirroring?

Hi,

I am interested in finding the TCP port which has been setup on a principal/witness/mirror server.

I have queried the 
sys.database_mirroring_endpoints and sys.endpoints system views but nowhere does it specify the TCP port.

I think the only way to find out is to go to one of the mirrored databases and to right click properties-->Mirroring. I think this is ugly way to find out the TCP port, so if anyones found a better way to find this do tell....


Cheers,
Priyanga


Answer this question

Database Mirroring : How to find the TCP port being used for mirroring?

  • DWood

    select * from sys.tcp_endpoints

    may be what you're looking for...

    -Keith.

  • O_er

    Thanks Keith.
  • Database Mirroring : How to find the TCP port being used for mirroring?