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

The Monday Morning DBA

Roland Alexander was an application developer for the first half of his 20+ year career in IT – then he came over to the Dark Side of SQL Server development, and is now diving headfirst into the deep end of the DBA pool. This blog is about his observations, discoveries, trials, and tribulations, and he hopes you enjoy reading it, learn a thing or two, and (hopefully) teach him a thing or two while you’re at it.

DBCC CLONEDATABASE issue: Duplicate key row in sys.sysschobjs

I ran into this error recently while trying to clone a production database:

Msg 2601, Level 14, State 1, LineNumber
Cannot insert duplicate key row in object ‘sys.sysschobjs’ with unique index ‘clst’. The duplicate key value is key_value.

Attempts at querying this error were a mixed bag. There’s a… Read more

0 comments, 1,486 reads

Posted in The Monday Morning DBA on 24 October 2018

Prefixated

Are you a prefixer? And by that I mean a developer – or DBA – who uses prefixes on object names? [DISCLAIMER: I’m a reformed prefixer – ok, almost reformed…]

 

Long ago and far away, I began my career writing Windows applications in C. Most of the coding was… Read more

2 comments, 131 reads

Posted in The Monday Morning DBA on 24 September 2018

Them Con+cat+enatin’ Blues

We ran into a funny problem not long ago, revolving around a stored procedure that was building up a dynamic SQL string. The code had worked without a hitch in our development and test environments but blew up when it was moved to production due to the dynamic SQL being… Read more

7 comments, 3,042 reads

Posted in The Monday Morning DBA on 13 September 2018

Moneyball And The DBA

“Moneyball” has been a thing for a while now. It’s shorthand for the application of quantitative data analysis to the various aspects of a sport, from individual player stats to how the team’s members are arrayed on the field. Many – including many current and former players – lament that… Read more

0 comments, 2,713 reads

Posted in The Monday Morning DBA on 17 August 2018

Warning: Expect Delays

Imagine you are driving somewhere – to work, to the mall, wherever – and you encounter a massive traffic jam. Wall-to-wall, bumper-to-bumper, you creep and crawl along the highway for a couple of hours, wondering what on earth is going on here, until you finally reach the source of the… Read more

0 comments, 1,907 reads

Posted in The Monday Morning DBA on 12 August 2018

The Hidden Price Of Foreign Keys

Foreign key constraints put the “relation” into relational databases. They enforce integrity by requiring that a key value referencing another table have an actual correspondence in the referenced table – in other words, that the key value actually exists. They guard against orphaned records by not allowing the referenced record… Read more

2 comments, 307 reads

Posted in The Monday Morning DBA on 5 March 2018

DBA’s need resolutions, too!

It’s that time of year again: time to make resolutions, then try to stick to them. Sure, we could start doing things we need – or ought – to do at any time, but there’s something about the tabula rasa of a New Year that brings out the hopeful optimist… Read more

0 comments, 371 reads

Posted in The Monday Morning DBA on 9 January 2018

The Fine Art Of Translation

I remember being thoroughly baffled in grade school by word problems. How in the world was I supposed to translate “Sally is on a north-bound train moving at 60 miles an hour. John is on a train on the next track over moving at 40 miles an hour. If John… Read more

0 comments, 268 reads

Posted in The Monday Morning DBA on 18 December 2017

Is Your Database Overweight?

The obesity epidemic is much in the news these days. The list of health issues related to being overweight is long, and admonitions to watch what we eat and to exercise regularly and stay active abound.

But it’s not just people that can be affected adversely by being overweight. Databases… Read more

0 comments, 1,669 reads

Posted in The Monday Morning DBA on 13 December 2017

The Myth Of Tomorrow

“We’ll fix it in the mix.”

“It’s good enough for right now.”

“We’ll worry about that later.”

“Your check is in the mail.”

Of all the traits that make Homo Sapiens unique in the animal world, our capacity for self-deception may be the most amazing. I know of no other… Read more

0 comments, 652 reads

Posted in The Monday Morning DBA on 4 December 2017

Back To (Security) Basics

Security is very much on our minds these days. Scarcely a day goes by without hearing of a yet another data breach involving millions of emails, passwords, and other personal information. Many of us have been the victims of identity theft, credit card fraud, or phishing emails. As criminals become… Read more

0 comments, 1,481 reads

Posted in The Monday Morning DBA on 27 November 2017

File This Under File Groups (Part 1)

I never had cause to give much consideration to storage when I was a SQL developer. The companies I worked for had folks to manage that, and my focus was on coding. We had standards we had to follow: no user objects on the PRIMARY file group, always specify a… Read more

0 comments, 363 reads

Posted in The Monday Morning DBA on 19 November 2017

Spaced-Out Strings

I came across this in a code review not long ago:

Three things pop into my head when I see this sort of thing:

  • That’s hard to read
  • That’s a whole lot of parentheses
  • Whoever wrote it is unfamiliar with the SQL standard about comparing strings

It’s the last item… Read more

7 comments, 2,463 reads

Posted in The Monday Morning DBA on 13 November 2017

A View On Views

In my experience, there are few database objects more poorly understood, misunderstood, misused, and outright abused, than the humble view. Depending on who you’re talking to, they may be the source of all evil, something to be tolerated but not encouraged, or the greatest thing since the invention of the… Read more

6 comments, 1,874 reads

Posted in The Monday Morning DBA on 5 November 2017

It’s All About The Joins

One of the most common mistakes I see made when creating tables (and I’ve been guilty of this myself too many times) is allowing SQL Server to cluster the table for them. This is usually the result of SQL Server’s default behavior when creating a primary key: if there is… Read more

0 comments, 380 reads

Posted in The Monday Morning DBA on 29 October 2017

Welcome to The Monday Morning DBA

I started my IT career twenty years ago as a VB and C developer, wandered into C++ for a bit, had one never-to-be-repeated foray into assembler on a VAX something-or-another, and then found myself one day that most sorrowful of creatures, the Accidental DBA.

It was SQL Server 2000, serving… Read more

0 comments, 241 reads

Posted in The Monday Morning DBA on 30 September 2017