Get That Profiler Feel in Extended Events

SQL Server, SQL Server 2016, SQL Server 2017
I know. You love Profiler. I hear you. You're wrong, but that's OK. Kidding... mostly. Unfortunately though, I think a lot of what passes for issues and problems with Extended Events is actually a lack of knowledge about how they work. Let's take an example and run with it. No Grid in Extended Events One of the pushbacks I hear about using Extended Events is that the Live Data GUI just doesn't have that neat Profiler grid output. Instead you see a list of events in the top pane and then you have to look at the details in the bottom pane. It looks like this out of the gate: You're right. That's a royal pain. That's it. Toss Extended Events. Back to Profiler. Well, hang on a second. Let's…
Read More

Extended Events and Profiler: XE Profiler

SQL Server 2017
There's a war on in the SQL Server world. On the one side is Profiler (although, really, everyone uses Trace Events). On the other, the "new" (they came out in 2008 with a full GUI in 2012, so...) Extended Events. Lots of people have picked sides on this, including Microsoft. New Trace Events There are none. All the new functionality of every sort from Availability Groups to Query Store to R & Python, have Extended Events created for them. Trace Events, and the technologies supporting them in the form of Profiler, are a dead end. Don't fear. While Trace is on the deprecation list, there doesn't appear to be any fear of that technology being removed completely. At least it won't be removed in the foreseeable future. A future which,…
Read More

Database Fundamentals #14: Modifying Data Through SSMS

Database Fundamentals
I've said it before, but I feel I should repeat myself. Using the SSMS GUI for data entry and data manipulation is not the preferred mechanism. T-SQL is the right way to manipulate the data in your database. For purposes of completion though, I will show the GUI methods in this blog series. Information doesn’t go into the database and stay there, unchanged, forever. Data is modified. This occurs because information changes, such as when a person marries and changes their name, or information was incorrectly entered, in which case you need to fix it, or just about anything else. You have to have a mechanism for modifying existing information. Modifying Data You start modifying data in the tables the same way you did the insert, by taking advantage of…
Read More

Database Fundamentals #13: Data Entry Through T-SQL

Database Fundamentals
T-SQL provides lots of functions that help to make data entry through T-SQL much more powerful. Over time you won’t be typing everything into T-SQL directly as we’ll do here. You’ll be able to use stored procedures and parameters to automate the use of scripts. These will also be generated or used by applications. To  start using T-SQL, you need to open a query window. You can do this by right clicking on a database and selecting the “New Query” command from the context menu. This will open a new query window in the main window on your screen. This is basically just a big, open text box into which you can type commands. The INSERT Statement To add rows using T-SQL, the principal statement is the INSERT statement. The…
Read More

Database Fundamentals #12: Adding Data with SSMS GUI

Database Fundamentals
In the previous Database Fundamentals, I argued that you should be learning T-SQL, yet the very next post I'm showing you how to use the GUI. What's up? Why the GUI? It's a very simple reason. I want to show you what it is so that I'm not hiding things. However, showing it to you will quickly expose the weaknesses inherent in using the SSMS GUI for direct data manipulation. It's a poor choice. However, we'll understand how it works at the end of this post. I'll also cover it in other posts, showing how to UPDATE and DELETE data using the GUI. They will further illustrate the weaknesses. You will however know how it works. Data Entry through the GUI If you are not already connected to the server,…
Read More

Database Fundamentals #11: Why Learn T-SQL

Database Fundamentals
If you've been following along with the previous 10 Database Fundamentals blog posts, you have a SQL Server installed and a database with a table in it. You may have more if you've been practicing. Now would be the time to start adding data to the database, but first, I want to talk about the importance of T-SQL Why T-SQL? The way SQL Server accepts information is very different than most programs you’re used to using. Most programs focus on the graphical user interface as a mechanism for enabling data entry. While there is a GUI within SQL Server that you can use for data entry, and I will do a blog post on it, the primary means of manipulating data within SQL is the Transact Structured Query Language, or…
Read More

Database Fundamentals #10: Modifying Tables

Database Fundamentals
Invariably, either while building a new database, or while maintaining old ones, you will find that the business needs change or that you’ve made a mistake. Either way, you will need to modify the tables that you’ve created. Change is inevitable and luckily SQL Server takes that into account, providing you with mechanisms to modify structures after you’ve created them. Important Warning One of the fundamental concepts of databases is that the data is stored. You can’t simply throw data away when you need to make a change to a table. There are two levels of changes you can make to a table. The first, is a change that won’t affect data in the table. These are simple changes and we’ll cover them in this blog post. The second level…
Read More

Database Fundamentals #9: Schemas As Containers

Database Fundamentals
Schemas are a very useful tool for managing the objects in your database. From security through process, through placement, schemas provide you with another tool to control how your database behaves. Schemas The tables created so far in this blog series have all been attached to a schema, dbo. Depending on how you login to the server and the security settings for your user, this is usually the default schema. A schema is simply a container in which you place objects. Once placed there, a schema is a method for managing the objects it contains. Schemas give you a simple way to control placement of the objects on filegroups. Schemas are a very easy way to manage security. The use of schemas becomes extremely important as your database becomes more…
Read More

Luck and the PASS Summit

PASS
I recently read an article asking the question whether or not we downplay the role that luck plays in our lives and I immediately thought of the PASS Summit. Obscenely Lucky I am, quite frankly, embarrassingly, obscenely, stupidly lucky. I just am. I married WAY over my head. I stumbled into an amazing career. I can safely say that I've arrived where I am through a great amount of luck. I am quite grateful for it all too. I will only suggest a single point of agency on my part that has put me in this wonderful situation. I showed up. PASS Summit 2005 I went to the PASS Summit in 2005 in Grapevine. Mostly, I attended sessions and then went back to my hotel. However, one night, after talking…
Read More