Category Archives: Notes

All Articles

sys.dm_server_services

sys.dm_server_services DMV is available in SQL Server 2008 R2 SP1 and SQL Server 2012. It will return the information about the below SQL Services on the current instance.

  • SQL Server (2008 R2 SP1 and SQL Server 2012)
  • SQL Server Agent services(2008 R2 SP1 and SQL Server 2012)
  • Full-Text(SQL Server 2012)

PS

Script to check the database Properties

It is always good to have the idea about the database properties while doing the migration, performance tuning or configuration.

You can execute the below script to get the database property information.

select 
 sysDB.database_id,
 sysDB.Name as 'Database Name',
 syslogin.Name as 'DB Owner',
 sysDB.state_desc,
 sysDB.recovery_model_desc,
 sysDB.collation_name, 
 sysDB.user_access_desc,
 sysDB.compatibility_level, 
 sysDB.is_read_only,
 sysDB.is_auto_close_on,
 sysDB.is_auto_shrink_on,
 sysDB.is_auto_create_stats_on,
 sysDB.is_auto_update_stats_on,
 sysDB.is_fulltext_enabled,
 sysDB.is_trustworthy_on
from sys.databases sysDB
INNER JOIN sys.syslogins syslogin ON sysDB.owner_sid = syslogin.sid