Access active session data

If you want to check the properties of any active sessions on a database, you can with the following script. You need to run it while connected to the database you wish to query. You can also easily filter the results using login_name to find…

Accessing database options

If you ever need to check details about a database, you can do so with the following command: The results include Database size Owner Date created Status summary Compatibility level There are also details about the physical location of the database files. You can also…

Check settings for stored procedures

There may be times you need to view database settings at the stored procedure level. As an example, I have been working with filtered indexes which require the QUOTED_IDENTIFIER setting to be enabled. Therefore stored procedures that insert or update a table that has a…

Unhappy Android phone is unhappy

For something a little different – I’m going to share an issue I found (and thankfully resolved) with my Android mobile phone. So, I have a Motorola running Android 6 (Marshmallow). I recently updated a few of my apps (one was I think the Android…

Compressing a database backup

Dealing with moving backups around can be a pain. Which is why I’ve found man of us have zipped the .bak files. The concern I have is that once we wish to use the backup files, they have to be unzipped which means we get…

Clearing query cache

I’ve been doing some index tuning on a large database, and I’ve been keeping tabs on the usage of the indexes as I have run tests. On a side note, if you want to see how I was monitoring the usage, check out my earlier…

Beware of !important

I learned a powerful lesson today while modifying my blog (yes, the one you’re reading right now!). I was messing with the site title as I was trying to get the size correctly responsive. You may already be aware of the @media only keywords, where…

Who is active?

Today I want to share a free SQL Server analysis tool. It’s been around for some time, so many of you may be familiar with it. If you’re not, now is the time to get on board. The tool (as this post title subtly suggests)…

Procedure for Index usage

I wrote a small stored procedure to shortcut querying Index usage in SQL Server. Check out the stored procedure body below. As you may be able to see, you just need to provide the table name you wish to filter by. You can optionally chose…

Introducing Blitz

I realised today that I haven’t written a post about Brent Ozar’s “First Responder Kit” a.k.a “Blitz”. The┬ákit is a pack of free stored procedures (and a few handy documents) to help you troubleshoot slow performing databases, and to improve the overall health of your…