SELECT name, is_auto_close_on FROM sys.databases : sys.databases « System Tables Views « SQL Server / T-SQL Tutorial






3> USE master
4> GO
Changed database context to 'master'.
1>
2> SELECT name, is_auto_close_on
3> FROM sys.databases
4> GO
name                                                                                                                             is_auto_close_on
-------------------------------------------------------------------------------------------------------------------------------- ----------------
master                                                                                                                                          0
tempdb                                                                                                                                          0
model                                                                                                                                           0
msdb                                                                                                                                            0
ClubRoster                                                                                                                                      1

(5 rows affected)
1>








27.2.sys.databases
27.2.1.Query sys.databases
27.2.2.SELECT name, is_auto_close_on FROM sys.databases
27.2.3.Query sys.databases for database name