The Bit Bucket

SDU Tools: Get SQL Server Table Schema Comparison

In a recent post, I mentioned that I often need to do a quick check to see if the schema of two SQL Server databases is the same, and how our GetDBSchemaCoreComparison procedure can make that easy. On a similar vein, I often need to get a detailed comparison of two tables.

In our free SDU Tools for developers and DBAs, there is another stored procedure called GetTableSchemaComparison to make that easy as well. It takes the following parameters and also returns a rowset that’s easy to consume programmatically (or by just looking at it):

2018-09-12

Opinion: Don't chastise people for not doing a bot's work

I spend a lot of time consulting across a variety of companies. Often I’m there doing what we consider “mentoring” and that means I’m there on and off for longer periods. Because of that, I often have to do the same compliance “training” that their own employees do.

The first thing I’d comment on is that unfortunately this sort of compliance ends up being counted against the company’s training budgets. Let’s be clear:

2018-09-11

SQL: Should we use schemas other than dbo in SQL Server databases? (Part 1)

In violation of Betteridge’s law of headlines, the answer is yes. When designing SQL Server databases, there are several reasons why you should be considering using schemas and not just having all your objects in the dbo schema.

This is a good example though, of where good advice regarding SQL Server dates. In SQL Server 2000 days, it was sound advice to keep all your objects owned by dbo (and at the time automatically part of the dbo schema), to avoid ownership chaining issues. That’s because ownership and the containing schema were one and the same concept.

2018-09-10

Book Review: How to win friends and influence people - Dale Carnegie

Using Audible to listen to books has allowed me recently to get through a lot of books that I would never have had time to get through. I’m determined to get through some classics as well. Self-improvement books don’t come more classic than Dale Carnegie’s How to Win Friends and Influence People so I listened to that too.

I know several people who say that, in the 1990’s, attending one of the seminars associated with this book, changed their lives. I can understand how that’s possible in some situations.

2018-09-07

Shortcut: Using the built-in web browser in SQL Server Management Studio

SQL Server Management Studio (SSMS) is a flexible tool. One thing that often surprises people is that it hosts a version of Microsoft Internet Explorer, right inside the application.

Why would SSMS have a web browser I hear you ask?

Well this web browser lets browse URLs, and reference links, without leaving the tool.

You can open it directly by choosing Web Browser from the View menu:

On my machine, it’s under the Other Windows section. In fact, it’s the only window there on my machine, which makes you wonder why it has a separate section in the first place.

2018-09-06

SDU Tools: Get SQL Server Database Schema Core Comparison

I often need to do a quick check to see if the schema of two SQL Server databases is the same.

In our free SDU Tools for developers and DBAs, there is a stored procedure called GetDBSchemaCoreComparison to make that easy. It takes the following parameters and returns a rowset that’s easy to consume programmatically (or by just looking at it):

@Database1 sysname -> name of the first database to check @Database2 sysname -> name of the second database to compare @IgnoreColumnID bit -> set to 1 if tables with the same columns but in different order are considered equivalent, otherwise set to 0 @IgnoreFillFactor bit -> set to 1 if index fillfactors are to be ignored, otherwise set to 0

2018-09-05

Opinion: Don't buy hardware before a Proof of Concept

Just a short post today to call out something that I’m seeing again and again. It’s where organizations purchase all their hardware and software platforms before they start to carry out a proof of concept. This is a very poor option.

I was reading the data strategy for a global company that I was doing consulting work for. They were proudly introducing the new strategy yet I was sitting looking at it, trying to work out what they were thinking. The first step of their plan was to buy everything they needed. The second step was to carry out a proof of concept to see how it would all work (presuming it would work suitably at all).

2018-09-04

SQL: Backup SQL Server Databases to Nowhere Immediately After Creation (suggestion)

Most companies have some sort of ongoing maintenance processes that perform periodic backups of databases. They also have log backups scheduled for any databases that are online and in full recovery model. However, when you first create a database, it might be in full recovery model yet never have had a full backup performed. If your scheduled jobs then try to create a log backup prior to the first full backup, the backup will fail, and that might make your job fail.

2018-09-03

Book Review: Blue Ocean Strategy - V Chan Kim and Renee Maubo

Another fairly famous business book that I’ve read lately is Blue Ocean Strategy: How to Create Uncontested Market Space and Make Competition Irrelevant by V Chan Kim and Renee Maubo. Apparently over a million copies of this has been sold.

I really liked the basic premise of this book. It describes how most companies keep looking at what their existing customers want, and often that’s in what they call a red ocean ie: where all the sharks are fighting and tearing things apart.

2018-08-31

Shortcut: Play a sound when a query completes in SSMS

In a previous post, I mentioned that when a long running query completes, I might not have been waiting around for it, and so I wanted to know when it completed.

But sometimes I do wait around for a query to complete, yet I’m distracted by other things and don’t realize that the query has actually completed. That’s not surprising because if a query takes a long time, I’m probably going to go on with other work while that’s running.

2018-08-30