System Functions MSSQL Tutorial

4>  SELECT DATABASEPROPERTY('mydb', 'IsReadOnly')
5> GO
-----------
       NULL
(1 rows affected)