Recipe 2: Writing Extended Events to a table

Welcome to the second recipe of this Extended Events cookbook! You will find the first blog post of the series here and you can browse all recipes with the xesmarttarget tag on this blog. The problem This time, you want capture all the queries executing on your server and save the Extended Events data to a table in SQL Server. One of the things you cannot achieve easily with the standard targets in Extended Events is writing to a database table. [Read More]

Recipe 1: Writing Extended Events to a CSV file

Welcome to the first recipe of this Extended Events cookbook! You will find the first blog post of the series here and you can browse all recipes with the xesmarttarget tag on this blog. Recipes: what are the ingredients? Every recipe starts with a problem to solve and has three ingredients: A session to capture the eventsA JSON configuration file for XESmartTarget to process the eventsA client application to read the data produced by XESmartTarget The problem In this case, imagine that you wanted to observe the commands executed on a SQL Server instance and save them to a file to process them later. [Read More]

10 DBA recipes with XESmartTarget

Some time ago, I started a project called XESmartTarget. I find it super useful and you should probably know about it. It’s totally my fault if you’re not using it and I apologize for all the pain that it could have saved you, but it didn’t because I did not promote it enough. Now I want to remedy my mistake with a 10 days series of blog posts on XESmartTarget, which will show you how useful it can be and how it can be used to accomplish your daily DBA tasks using Extended Events. [Read More]

SQLSaturday is dead, long live DataSaturdays

This is a very brief post to inform you that PASS has died, killed by the for-profit company behind it. That's sad beyond words, but we, as a community, are not destined to the same fate. The community will rise again and build something new. One of the things that we don't want to lose is SQLSaturday. It's been a substantial vehicle for involving community members locally and globally. It has been the launchpad for many community speakers. [Read More]

Replaying Workloads to a different Database

One of the features I was asked to implement for WorkloadTools is the ability to replay commands to a database name different from the one recorded in the source workload. This is something that I had been planning to implement for a while and it totally makes sense. Usually, you have two identical environments for the workload capture and replay, both with the same databases. Sometimes it makes sense to have two different databases as the source and target for the workload, for some particular reasons: resources constraints, ease of testing and so on. [Read More]

Performing a real-time replay with WorkloadTools

In a previous blog post, I showed you how to use WorkloadTools to replay a workload in two different scenarios. However, there is a third scenario that is worth exploring: the real-time replay. Before we jump to how, I’d better spend some words on why a real-time replay is needed. The main reason is the complexity involved in capturing and analyzing a workload for extended periods of time. Especially when performing migrations and upgrades, it is crucial to capture the entire business cycle, in order to cover all possible queries issued by the applications. [Read More]

Collecting Diagnostic data from multiple SQL Server instances with dbatools

Keeping their SQL Server instances under control is a crucial part of the job of a DBA. SQL Server offers a wide variety of DMVs to query in order to check the health of the instance and establish a performance baseline. My favourite DMV queries are the ones crafted and maintained by Glenn Berry: the SQL Server Diagnostic Queries. These queries already pack the right amount of information and can be used to take a snapshot of the instance’s health and performance. [Read More]

Troubleshooting "Could not obtain information about Windows NT group/user"

This is one of those typical blog posts that I write for my future self, the guy who keeps fixing the same stuff over and over and forgets what he did the next minute. If you want to query information about a Windows user or group and its access path in SQLServer, you can use the extended stored procedure "xp_logininfo". Here's an example: EXEC xp_logininfo 'MyDomain\SomeUser','all'; If everything is configured correctly, you will see a list of Windows accounts and the login(s) they are mapped to in SQLServer. [Read More]

Workload replay with WorkloadTools

In my last post, I described how to capture a workload to a file, in order to run a replay against your target environment at a later time. Well, that later time has come and you’re ready to roll. Of course, WorkloadTools has got you covered. Before I show you how SqlWorkload can run the replay, reading all data from the workload file, I need to spend some time describing how to set up your target environment. [Read More]

Life behind a proxy server: downloading content for SSMS Help Viewer

Life behind a proxy server can be problematic. Not every software out there is tested correctly for proxy interaction and oftentimes the experience for the corporate user is a bit frustrating. I blogged about this before, regarding Powershell Gallery and regarding how to download and install content for the SSMS Help Viewer in SQL Server 2014 and SQL Server 2016. When I tried to update my post for SQL Server 2017, I got stuck, because my " [Read More]