From http://stackoverflow.com/questions/220340/how-do-i-check-sql-replication-status-via-t-sql