結果 : how to check database status in sql server query