SQL Server/T-SQL/System/DATABASEPROPERTYEX
Displaying Database and SQL Server Settings
The DATABASEPROPERTYEX returns information about database options.
DATABASEPROPERTYEX uses the following syntax:
DATABASEPROPERTYEX ( database , property )
8>
9> SELECT DATABASEPROPERTYEX("YourDatabaseName", "Collation"),
10> DATABASEPROPERTYEX("YourDatabaseName", "Recovery"),
11> DATABASEPROPERTYEX("YourDatabaseName", "Status")
12> GO
--
NULL
NULL
NULL
(1 rows affected)