title: Checking database mirroring status in C#
body: <p>Our C# application needs to connect to SQL 2005 and 2008 databases and check what the current status of database mirroring is (eg. is it enabled, suspended, paused, disconnected etc). Are there properties where I can check this?</p>
  
  <p>All our databases that are being mirrored have no witness and manual failover (synchronous mirroring). </p>
  
  <p>Much appreciated if anyone can help out or point me to some documentation, google searches are not turning up much on this. </p>