-->
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.

Introducing: The SQLUndercover Inspector

Introducing: The SQLUndercover Inspector! Finally we have a V1 almost ready to hit our GitHub but what exactly is it?

 

Just another Monitoring tool? well not quite, the SQLUndercover Inspector is not really a Monitoring tool as such, parts of the Inspector can be used in this way if… Read more

0 comments, 64 reads

Posted in SQL Undercover on 22 January 2018

All Scripts Now On Github

@adedba Adrian Buckman has been working hard and has put all of our scripts up on Github https://github.com/SQLUndercover/UndercoverToolbox

Read more

0 comments, 181 reads

Posted in SQL Undercover on 18 January 2018

Dissecting SQL Server, The Internal Structure of a Row

I’m sure that most of us know that SQL Server stores all it’s data in 8Kb pages.  But what do these pages actually look like and how can we go about looking at them and picking them apart.

For this we’re going to need a couple of undocumented DBCC commands,… Read more

1 comments, 135 reads

Posted in SQL Undercover on 15 January 2018

Creating a SQL Server Test Lab On Your Workstation – Part Two, Creating a Domain Account and Joining a SQL Server to the Domain

Part 1 of Creating a SQL Server Test Lab On Your Workstation can be found HERE 

In the second part of our series on creating a SQL Server test lab on your workstation, I’m going to look at creating a domain user, joining a SQL Server to our domain and… Read more

4 comments, 1,696 reads

Posted in SQL Undercover on 3 January 2018

Creating a SQL Server Test Lab On Your Workstation – Part One, Installing The Domain Controller

You can read part Two of the series HERE

One of the most useful tools to the DBA when we need to test new features, recreate a fault that we’ve seen in production or just want to see ‘what if…?’ is a test lab.

Some of you are going to… Read more

6 comments, 293 reads

Posted in SQL Undercover on 18 December 2017

GroupBy Slides and Demo Script is Now On GitHub

The slides and demo scripts from today’s GroupBy session are now available on our GitHub repository

https://github.com/SQLUndercover/UndercoverToolbox/tree/master/GroupBy

Many thanks again for watching, I really hope that you found it useful

 

Read more

0 comments, 206 reads

Posted in SQL Undercover on 8 December 2017

UNDERCOVER TOOLBOX: sp_AGReconfigure – Manage Always on Sync & Failover settings from a single stored procedure.

From time to time we need to make changes to Always on Availability group Synchronization mode settings , this also includes changes to the automatic failover partner.

Most of the time the goto is to use the GUI which is a nice graphical way of doing it which can make… Read more

2 comments, 1,079 reads

Posted in SQL Undercover on 8 December 2017

Using PowerShell To Deploy Scripts From GitHub to Multiple SQL Servers

Now I’m all for making my life easier and one thing that makes life easier for me is having a single process that I can run to install\update all my favourite utility stored procedures quickly and on all my SQL Servers.

I’ve done this a few different ways in the… Read more

2 comments, 230 reads

Posted in SQL Undercover on 27 November 2017

SQL Smackdown!!! Cursors VS Loops

Ladies and Gentlemen, welcome to the main event of the evening.  The SQL Undercover Smackdown Heavy Weight Championship of the World! 

In the red corner, we hate him, we loath him, I’ve even heard people say he should be deprecated, it’s the Cursor!!! 

Facing him in the blue corner, loved…

Read more

8 comments, 1,373 reads

Posted in SQL Undercover on 16 November 2017

T-SQL Tuesday #96 – Folks Who Have Made a Difference in my career #TSQL2sday

This months TSQL Tuesday subject is a shout out and high-five to those people who have inspired or made a contribution to my DBA life.

So here goes:

Before I started my career as a Database Administrator I worked in the motor trade for approx 12 years , I worked… Read more

1 comments, 498 reads

Posted in SQL Undercover on 14 November 2017

T-SQL Tuesday #96 How did I get started?

 

 

 

Hi Folks,

 

I’m the new guy that my two colleagues are still trying to convince to write my first blog post and as they like to put it I’m still scared or have stage fright. My name’s Chris and I’m the latest DBA to go undercover… Read more

3 comments, 258 reads

Posted in SQL Undercover on 14 November 2017

T-SQL Tuesday – Folks Who Have Made a Difference #TSQL2sday

So this month’s T-SQL Tuesday subject is a shout out and high-five to those people who have inspired or made a contribution to my DBA life.

Well where do I start?  Thinking back on my career there are just so many people that have given me a push here and… Read more

1 comments, 126 reads

Posted in SQL Undercover on 14 November 2017

UNDERCOVER TOOLBOX: Using Python To Copy A SQL Login From One Server To Another

Recently I’ve been thinking about Python and whether it can be useful to the DBA as well as the data scientist.

One good use that I have found for it is to copy logins from one server to another.

There are plenty of times when you might want to copy… Read more

0 comments, 52 reads

Posted in SQL Undercover on 30 October 2017

UNDERCOVER TOOLBOX: Find Untrusted Foreign Keys and Orphaned Key data

SQL Server tracks untrusted Foreign keys in sys.Foreign keys with a column called is_not_trusted, there may be a number of reasons why a Foreign key may have become untrusted below are a couple of examples:

 

  • Foreign key was disabled using the ‘NOCHECK’ option then re-enabled using ‘CHECK’ (not to be…

Read more

1 comments, 24 reads

Posted in SQL Undercover on 24 October 2017

Connecting to a Remote Instance of SQL Server Using Python

SQL Server’s integration of Python has been heavily marketed towards the machine learning and BI guys, but does it offer anything for the DBA?

All the attention has been on machine learning, so much so that for a while I didn’t pay it any attention at all, but then I… Read more

0 comments, 53 reads

Posted in SQL Undercover on 18 October 2017

How Far Has My Update Got? Finding Out How Many Rows Your Long Running Insert, Update or Delete Has Actually Modified So Far

I’m pretty sure that we’ve all found ourselves in the situation where we’ve run an INSERT, UPDATE or DELETE script and it seems to be taking an age to run.

We’ve done all the usual checks, there’s no blocking going on, things are happening but it just seems to be… Read more

2 comments, 26 reads

Posted in SQL Undercover on 5 October 2017

Failed to perform AlwaysOn Manual Failover using the wizard – Availability-group DDL Operations are permitted only when you are using the master database .

 

Routine maintenance rolls around and it’s time to failover your AG’s to new Primary’s to allow for patching and restarts… the weapon of choice will be the SSMS Failover wizard – and why not its does the job nicely and give us some nice visuals as it progresses through… Read more

0 comments, 31 reads

Posted in SQL Undercover on 4 October 2017

SQL Mirroring, Preserving the Log Chain During Database Migrations

This is a reblog of a post that I originally wrote back in January.  After using this technique again last night to migrate and maintain the log chain of a large database and remembering how easy it makes the whole process, I thought that perhaps it deserved a re-post.  Whether…

Read more

0 comments, 26 reads

Posted in SQL Undercover on 3 October 2017

Concatenation Truncation – Are your strings being truncated?

 

It wasn’t until recently that i paid attention to truncation during concatenation, but that’s because whenever I used concatenation before it was only using short data lengths so I didn’t see the effects of truncation.

When I first noticed that truncation can occur I was building a Huge piece of… Read more

1 comments, 25 reads

Posted in SQL Undercover on 27 September 2017

Copying Data From One Table To Another – To Disable Indexes or Not To Disable Indexes, That’s the Question.

As the famous Bard once said, “To disable indexes or not to disable indexes, that is the question?”.  Well maybe that wasn’t quite what he said but it was a discussion that came up here just recently.

We’ve found ourselves inheriting a process that has to copy all the data… Read more

0 comments, 22 reads

Posted in SQL Undercover on 25 September 2017

Older posts