Articles Posted by the Author:

  • TSQL to Find Status of SQL Server Statistics

    TSQL to Find Status of SQL Server Statistics

    About two years ago, I was working on an update statistics solution for 15 TB OLTP database.   First thing I needed to know, is the status of statistics.   With a google search I landed into this blog post by Erin Stellato (blog | Twitter) from SQLskills. Which gave me a perfect head start.

    I expanded that query to add more things in the result set.

    • Separate column for schema and object name.
    • Statistics ID.
    • Is this a temporary statistics (more here) ?
    • Column names (I wanted one row per statistics even with more than one column).
    • Ability

  • Free Azure Credit

    Free Azure Credit

    There are multiple ways you can get free Azure credit, which can add up to $500 for one year. With a Microsoft account and one of these free credit options you can open an Azure account. You will be able to use this account for any Azure service based on your needs including, Virtual Machines, Websites, Cloud Services, Mobile Services, Storage, SQL Database and many more. If you discipline yourself about stop/pause/delete resources when you are not using a resource or you no longer need, free credits can go long way.


    $200 for 30 days

    You receive $200 of Azure …

  • TSQL Tuesday #88 -Communication is the Key

    TSQL Tuesday #88 -Communication is the Key

    I thank Kennie Nybo Pontoppidan (b|t) for hosting TSQL Tuesday #88. Topic for this month is daily database related WT…….


    Last week I was setting up a collection of wait statistics with five minutes interval using a while loop. I was wrapping up Paul Randal’s (b|t) code from this blog post in a loop and persisting in a table to analyze later.

    I made it a habit in my career to have my peers review my code. I sent my code to one my colleague and asked him to review. Meantime …

  • View Multiple System Health Extended Event Files

    Last week I blogged about increasing retention of System Health session files. In this post I will show how you can open multiple files at once and work with the data as one set.

    If you select multiple System Health extended event files (with extension .xel) and click open each file will open in separate window of SQL Server Management Studio (SSMS).



    You can see here 4 files opened in 4 different windows. Now you cannot sort, group, apply filter, export data from all 4 windows as one data set.



    For opening all these files in one window …

  • SQL Server system_health Session Retention

    As per Microsoft’s books online

    The system_health session is an Extended Events session that is included by default with SQL Server. This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. Therefore, we recommend that you do not stop or delete the session.

    What this article does not tell you is your individual file size is 5 MB and number of maximum rollover file is 4. Meaning you will only get 20 MB of …