Sample Sessions Archives - SQL XEvents https://sqlxevents.com/category/xevents/sample-sessions/ Thu, 31 Mar 2022 18:35:11 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.3 https://sqlxevents.com/wp-content/uploads/2019/07/fav.png Sample Sessions Archives - SQL XEvents https://sqlxevents.com/category/xevents/sample-sessions/ 32 32 176530083 Bulk Insert – Insights That Will Make You Drool https://sqlxevents.com/bulk-insert-insights-that-will-make-you-drool/?utm_source=rss&utm_medium=rss&utm_campaign=bulk-insert-insights-that-will-make-you-drool https://sqlxevents.com/bulk-insert-insights-that-will-make-you-drool/#respond Fri, 07 Jan 2022 18:16:58 +0000 https://sqlxevents.com/?p=1724 Bulk insert can be an extremely helpful tool to help ingest data into SQL Server efficiently. Sometimes, it is necessary to capture metrics in regards to the bulk insert in order to understand the who, when, and potentially why related to the insert process.

The post Bulk Insert – Insights That Will Make You Drool appeared first on SQL XEvents.

]]>
Bulk insert can be an extremely helpful tool to help ingest data into SQL Server efficiently. Sometimes, it is necessary to capture metrics in regards to the bulk insert in order to understand the who, when, and potentially why related to the insert process.

Many moons ago, I worked with a client issue in regards to performance issues stemming around linked servers. From that work, I shared an article about monitoring linked servers.

Also stemming from that work was a clear pattern that there were some issues also relating to bulk inserts. This experience helped me to generate a means to monitor and trap useful data while troubleshooting. From this monitoring solution, we were able to isolate specific processes for the client to help improve performance.

In this article, I will share the solution that I created through the power of Extended Events.

Bulk Insert Monitoring

When you are looking to trace for bulk inserts via Extended Events (XEvents), it is crucial to remember that there are multiple events. In addition, there are multiple means to perform a bulk insert. I show three methods to perform a bulk insert in my demo script.

The bulk insert methods I will explore are BCP, BULK INSERT, and OPENROWSET(BULK). Each has advantages and disadvantages, none of which I will explore in this article. Suffice it to say that each has slightly different uses and it is worth testing them to see which works best for your needs!

Bulk Events

Extended Events gets more and more powerful with each update to SQL Server. Sometimes this is demonstrated through the addition of certain events. …

The post Bulk Insert – Insights That Will Make You Drool appeared first on SQL XEvents.

]]>
https://sqlxevents.com/bulk-insert-insights-that-will-make-you-drool/feed/ 0 1724
Owner is Missing in the GUI – An Easy Fix https://sqlxevents.com/owner-is-missing-in-the-gui-an-easy-fix/?utm_source=rss&utm_medium=rss&utm_campaign=owner-is-missing-in-the-gui-an-easy-fix https://sqlxevents.com/owner-is-missing-in-the-gui-an-easy-fix/#respond Fri, 31 Dec 2021 18:23:00 +0000 https://sqlxevents.com/?p=1686 In this article, I will share an oddity that happens when the database owner is seemingly missing.

The post Owner is Missing in the GUI – An Easy Fix appeared first on SQL XEvents.

]]>
Having a Database Owner is not something that most people think about until something breaks. Usually, people will just kind of ignore it because it is just so innocuous and uncommon for the owner to not be “present”. In this article, I will share an oddity that happens when the database owner is seemingly missing.

Usually, when a database owner is not properly configured, an error message will be thrown. I have run into an odd case where there is no error message and thus no obvious indicator that there is a problem.

In this oddball case, the owner showed as sa just about everywhere but in the GUI. Not only was it showing in the GUI, but many scripts also reported that the database owner was set. Despite all of this evidence, there was one spot in the GUI that disagreed with everything. Let’s dive in and check things out!

Owners in the GUI

Let’s start with the the problem screen in the GUI. Typically, when an owner is missing or invalid, the properties screens won’t open. In this case, the properties windows do open but you end up with odd results.

Now that we can see that the owner is a bit jacked up somewhere, we can look at a quick query.

As you can see from both of those screen shots, I have the same problem in those areas. If I look at other spots though, I get different results.

A Different Owner

Having consistency in your applications is pretty important. When I run into something that shows different results, I find it a tad annoying. In the following images, you will see that inconsistency compared to the previous images.

And in the following script results, I get the same inconsistency…

The post Owner is Missing in the GUI – An Easy Fix appeared first on SQL XEvents.

]]>
https://sqlxevents.com/owner-is-missing-in-the-gui-an-easy-fix/feed/ 0 1686