Sunday, June 05, 2011

Find all the database information from sys.databases

when i connect to SQL Server 2005/2008 first time, I always run this query to find  the databases information.

SELECT name ,database_id,create_date,compatibility_level,collation_name,user_access,is_read_only,is_auto_close_on,is_auto_shrink_on,state,state_desc,recovery_model,recovery_model_desc,page_verify_option,page_verify_option_desc,is_auto_create_stats_on,is_auto_update_stats_on
FROM sys.databases

No comments: