Following script gives you all user database users, that do not have a server login mapped or where database user name does not match server
Tag: DBA Queries
Using sys.dm_io_virtual_file_stats DMF to get IPOS and BPS
SQL Server keeps track of all the reads and writes it submits to the operating system (OS). It records this information in sys.dm_io_virtual_file_stats DMF. We
A Microsoft SQL Server DMV/DMF Cheat-Sheet
I am asked this question by Microsoft SQL Server customers again and again: “What dynamic management views (DMV) or dynamic management functions (DMF) should I
Getting List of Top Queries by Query Hash
Starting SQL 2008, we have had Query Hash column in sys.dm_exec_query_stats. It helps group common queries together, because when SQL Server is generating execution plan
Getting List of All Files and Their Growth Information
SQL Server defaults to growing data files by 1MB and transaction logs by 10%; neither of those are best practice. If your database is small