• DBA,  Performance

    Perfmon Data collection – Integrate SSRS with Perfmon – Dashboard performance of database graph using SSRS Collect perfMon and automate it load to SQL database and generate reports

    DBA wants to collect metrics and analysis them and present them to management to get something done by using the data (to check performance issue, benchmark for migration etc) and it is all about data and metric nowadays. How to collect them and show as a presentation. Two parts are there: 1. You can setup only Perfmon, T-SQL and use excel 2. Setup perfmon, T-SQL and configure SSRS. Tools needed: Perfmon.msc, Relog.Exe, database engine, PowerShell & CMD. Steps: Create two notepad and save it any drive (performance.lst, server.lst). The performance notepad will have counter details and server notepad will have server name Create one CMD file called createlogs.cmd.  Createlogs cmd…

  • DBA,  Performance

    Use of SQL server statistics and how to make a query to use them

    Statistics are very important in the query optimization. This post will give you some basic idea of stats and how they are created and used. This post is to link with my performance tuning parts. What is statistics: Statistics store information about the distribution of data in the column/columns for a table. It has Header, Densities and Histogram. The Histogram stores only 200 steps, and for very large tables VLT, it is hard to hold much data only can hold up-to 200 steps, you have to create manually for the VLT. It is a lightweight and use very low storage. The only way to know the underlying tables from the…

  • DBA,  Performance

    Performance Tuning Steps Query by looking an execution plan and effectiveness of the index Part 2

    How to read execution plan to improve poorly performing queries Execution plan is optimizer’s calculation of how the query will be executed by creating the best low-cost query plan (if it is already in the cache, it will reuse).  SQL server is cost based optimizer.  Meaning, the optimizer decides based on CPU, I/O and statistics etc and creates a plan and returns the results. Up to date statistics is very important one to create a more accurate plan. We can view this in GUI and text both will be helpful, when the scenario come in.   Types:  Estimated and Actual execution plan – both will be helpful. Estimated plan: It…

  • DBA,  Performance

    Performance Tuning Steps a Query by looking an execution plan and effectiveness of the index creation Part-1

    The index is very important and powerful object in the database. It is an optional and secondary object for the table. It will speed up the data return time by navigating the B-tree structure, like a book’s index. In General, index tuning is important one, putting a right index will speed up the code.  Please read this post for finding symptoms, where you have issue at server or database or query level.  Most of the time, the query will be the issue. Once, you have long running query start tuning it. In this post, I am going to share the usage and effectiveness of index from low level to high…

  • DBA

    Microsoft SQL Server Migration plan and steps

    Migration is nothing but moving a databases from one instance to another instance. It could be a single database or all the databases. DBA will get this many times, for testing or development server new build or removing legacy/old servers In general, this will be a combination of migration and upgrade of newer version ex: existing 2012 from old server to new server 2016. Some will have two instances in same server and migrate for dev and test purpose. Types: Best backup/restore, for VLDB very large databases, you can plan SAN replication or VM level and mount point/ VMDK movements with detach attach database etc. Supported Version and Edition Upgrades,…