Category: SQLServer

  • Script to generate index rebuild with PAGE compression

    For BI data warehouse databases, since the data does not change much and they typically require a lot of space, it makes a lot of sense to compress the indexes to save space. I came across some BI databases whose indexes were created without compression. We are in the process of migrating those databases to […]

  • JiMetrics now gathers SQL Server startup account

    During the last few days, I’ve refactored JiMetrics and added a new function: Used Pester to create more test cases for PowerShell functions I wrote; Enhanced the design and code so JiMetrics also gathers SQL Server instance’s startup account, which can be useful. If you don’t know what JiMetrics is, go to this page to […]

  • Removing duplicate rows in small batches based on date column

    Due to double scheduling, some duplicate rows were inserted into the Windows.TableStats table in JiMetrics. To confirm that the table has duplicates, here is the T-SQL script I used. Note that this same script should work in all other major RDBMS platforms like MySQL, Oracle, etc. Adjust table and column names to fit your needs. […]

  • Collecting Windows BIOS and Host Serial Number

    After imporving JiMetrics yesterday so it tries to determine if the host is a VM or not, I made another improvement today: collecting host server BIOS related information and serial number. I don’t know about you, in the past when I needed to gather a Windows server’s BIOS or serial number for troubleshooting, I typically […]

  • Determining if a Windows host is a VM in JiMetrics

    I’ve been using my own SQL Server metrics collection package called JiMetrics for a couple of years. It is easy to set up. All you need are just two things: SQL Server instance and an account that has admin access to both the servers and instances you care about. JiMetrics doesn’t do anything that will […]