-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

SQL Undercover

David Fowler and Adrian Buckman, two database nerds who love nothing more than to spend their time, reading about, researching and sharing all things SQL Server. David is a DBA with over 15 years production experience of SQL Server, from version 6.5 through to 2016. He has worked in a number of different settings and is currently the technical lead at one of the largest software companies in the UK. After working in the motor trade for over 11 years Adrian decided to give it all up to persue a dream of working in I.T. Adrian has over 3 years of experience working with SQL server and loves all things SQL, Adrian currently works as a Database Administrator for one of the UK’s Largest Software Companies.

Inspector V1.3 hotfix

Unfortunately we discovered a small bug in 1.3, the Database ownership module default warning level was not showing a yellow advisory condition when using the Inspector default warning level (NULL), we have now updated Git with the latest revision.

If you would rather not re install 1.3 again you can… Read more

0 comments, 95 reads

Posted in SQL Undercover on 16 January 2019

Inspector V1.3 now available

Inspector V1.3 is now available on GitHub.

We have updated the sample report for you to play with which includes the new informational section added in this build.

We updated our getting started guide.

We know some of you really hate linked servers so we have been working… Read more

1 comments, 92 reads

Posted in SQL Undercover on 15 January 2019

Availability Groups: When Your Synchronous Secondary isn’t Synchronous

During a recent DR scenario I came across a slight misinterpretation in how availability groups with replicas in synchronous commit behave.

How An Availability Group With A Synchronous Secondary Should Behave Under Normal Circumstances

Normally, if we’ve got a secondary replica in synchronous commit mode, our primary can’t commit any… Read more

1 comments, 133 reads

Posted in SQL Undercover on 14 January 2019

Happy New Year, Here are our Most Popular Posts of 2018

Firstly, all of us at SQL Undercover would like to wish you a very Happy New Year and all the best for 2019.

To sign off for the year, here’s a quick run down of the most popular posts from SQL Undercover in 2018.

Thanks to everyone who’s supported us… Read more

0 comments, 142 reads

Posted in SQL Undercover on 31 December 2018

Quickly Compare Data in Two Tables Using CHECKSUM and CHECKSUM_AGG

There are times when we need to compare two tables and figure out if the data matches. I often see a number of ways of doing this suggested, most are quite slow and inefficient. I’d quite like to share a quick and slightly dirty way of doing this using the… Read more

5 comments, 2,475 reads

Posted in SQL Undercover on 18 December 2018

Managing Logins and Users Across An Availability Group

What’s the deal with logins and availability groups?

I’m sure that we all, when creating a login that accesses a database that happens to be part of an availability group, diligently go and create that login on all secondary replicas, don’t we?!

Of course, when that AG fails over to… Read more

1 comments, 1,973 reads

Posted in SQL Undercover on 5 December 2018

A curious case of case when and Null values

For some reason I have always written my Case statements using the following logic:

SELECT
CASE
	WHEN @Priority = 1 THEN 'Very High'
	WHEN @Priority = 2 THEN 'High'
	WHEN @Priority = 3 THEN 'Medium'
	WHEN @Priority = 4 THEN 'Low'
	ELSE 'N/A'
END

 

It wasn’t until recently that… Read more

5 comments, 2,606 reads

Posted in SQL Undercover on 28 November 2018

High CPU and Query Store, A Story of Spinlock Heartache

This is going to be a quick look at an issue that we recently encountered, I’m not going to go in depth into spinlocks and what they are (perhaps that could be the subject of a future post).

We were enjoying a nice peaceful afternoon when we hear panicked shouting… Read more

2 comments, 2,183 reads

Posted in SQL Undercover on 20 November 2018

T-SQL Tuesday – Non-SQL Server Technologies

So, this month’s T-SQL Tuesday topic is to think about a non-SQL Server technology that we want to learn.

For me, I’m going to pick machine learning.

As a DBA, I’ve always looked at machine learning as a thing for the BI guys.  I’m a DBA after all why do… Read more

0 comments, 2,075 reads

Posted in SQL Undercover on 6 November 2018

Signing Stored Procedures That Access Multiple Databases

A while back I wrote a post, Digitally Signing a Stored Procedure To Allow It To Run With Elevated Permissions

Recently Manish Kumar asked an interesting question, what do you do if your proc accesses multiple or even all the databases on the server?

So, instead of giving him a… Read more

1 comments, 2,390 reads

Posted in SQL Undercover on 30 October 2018

Identifying delays between SQL calls using SQL profiler

One of the common goto methods for query specific slowness which can be replicated via an application can be to start up a trace or extended events session whilst replicating the issue, we all know about the dangers of running these sessions without sufficient filtering so ensuring that correct filtering… Read more

0 comments, 2,063 reads

Posted in SQL Undercover on 24 October 2018

A Play Around With Table Variable Deferred Compilation in SQL 2019

Table variables, they’re nasty, dirty little things that perform about as well as a Robin Reliant in a crosswind, right?  Well you’re not going to have me argue with you there.

But how many of us have got these little beasts floating around in their production code with absolutely nothing… Read more

0 comments, 1,907 reads

Posted in SQL Undercover on 16 October 2018

Inspector V1.2 now available

It has been long overdue but finally V1.2 is now available on GitHub.

V1.2 brings a lot of changes, We put together a sample report for you to play with but here is an overview of what has been added.

 

Enhancements: 

#9 Long running transactions module added –… Read more

2 comments, 322 reads

Posted in SQL Undercover on 10 October 2018

Inspector V1.2 revised installation guide

Pre-requisites:

SQL 2012 or higher
SQL Server Agent
A database to store the the data collected by the agent jobs (this can be one you use for your other DBA needs it doesn’t have to be a dedicated database)
Optional:

For instances with availability groups where you take backups on… Read more

1 comments, 243 reads

Posted in SQL Undercover on 10 October 2018

The SQL Agents’ view of SQL Server

I recently came across a really odd issue with the SQL Agent, there were two agent jobs attached to one schedule one of the jobs was enabled and the other was not enabled – all pretty normal at this point but here is where it got weird.

The disabled job…

Read more

3 comments, 2,723 reads

Posted in SQL Undercover on 2 October 2018

sp_translate, A Universal Translator in SQL Server. Just One Example Of How Powerful the Python/SQL Partnership Can Be.

In my recent post, Installing External Modules into SQL Server’s Python I had a look at just how simple it is to import external modules into Python so that they can be used within SQL Server.

In this post I’d like to show you a little something to demonstrate how… Read more

1 comments, 342 reads

Posted in SQL Undercover on 18 September 2018

TSQL Tuesday #106: Triggers and the Spiral To Oblivion

It’s the second Tuesday of the month which must mean only one thing…

We’re all skint and payday feels like a long way off???

Not quite, well maybe… but it’s also T SQL Tuesday!

This month’s invitation comes from Steve Jones and he’s asking us to write about triggers and… Read more

6 comments, 225 reads

Posted in SQL Undercover on 11 September 2018

Podcast Audio Now On SoundCloud

For those of you who don’t have time to watch the videos, the audio stream of our webcasts are now available on SoundCloud.

Read more

0 comments, 254 reads

Posted in SQL Undercover on 5 September 2018

Installing External Modules into SQL Server’s Python

So Microsoft have integrated Python into SQL Server, from the moment I heard that I thought to myself, “wow, this is exciting stuff” and not just for the machine learning, BI guys that it was marketed at.  It’s exciting for us DBAs too, my head was in a buzz with… Read more

2 comments, 273 reads

Posted in SQL Undercover on 3 September 2018

Undercover TV- Episode 2

The latest webcast from SQLUndercover.com. In this episode David and Adrian take a look at a few blog posts that have caught their interest, review Minion Backup from Minionware and announce the release of the all new Undercover Catalogue v0.1.

Links featured in this webcast are,
https://www.sqlrx.com/using-sys-sql_e

Read more

0 comments, 305 reads

Posted in SQL Undercover on 29 August 2018

Older posts