At SQLPASS a DBA asked how to see the memory used by each In-Memory OLTP table. The DMV sys.dm_db_xtp_table_memory_stats answers it. Here is the script.
SQL Server Backup Compression: How Much Space It Saves
Backup compression needs only the COMPRESSION option in the BACKUP statement. This post backs up a demo database twice and compares the sizes and times. It also checks the restore, explains the error that mixing compressed and plain backups raises, and covers the costs.
SQL SERVER – System Function @@IDLE to Find System Ideal Time
Running @@IDLE returns a number that is hard to read. Here is what this system function measures and how to turn it into idle time you can understand.
How to Remove Database Mail History and Stop msdb Growing
Database Mail history stays in msdb until you delete it, so the sysmail tables can grow for years. This post measures the tables, then removes the history with the two supported procedures instead of direct deletes. It also covers a month by month loop for a big backlog and a schedule.
SQL SERVER 2016 – DBCC Command Enhancement with MAXDOP
SQL Server 2016 lets you set MAXDOP on DBCC checks like CHECKDB. Here is how this DBCC Command enhancement works and how to use it.
How to Find Size of All the Indexes on the Database – Interview Question of the Week #097
Need to know how much space your indexes use? Here is a script I share with clients that lists all the indexes in a database along with their size.
SQL SERVER – How to Get List of SQL Server Instances Installed on a Machine?
There are multiple ways by which we can find a list of SQL Server instances name instances on a machine. In this blog, I would show a few ways to do it.



