<p>when an SQL Server Express DB is 'in recovery', you are unable to connect using SQL Authentication. </p>

<p>Is there a simple way of determining the stat of the DB prior to connecting to it?
(Using .Net)</p>

```
```
SELECT DATABASEPROPERTYEX ('master', 'STATUS') AS 'Status';
```
```
Replace 'master' with your database name