The Bit Bucket

Shortcut: Configuring registered servers in SQL Server Management Studio

When working with SQL Server systems, it can be hard to remember the names of all the servers, to remember connection details for the ones that need SQL logins (instead of Windows authentication), and to remember other details of those servers, such as which environments they are part of (eg: production, UAT, test)

SQL Server Management Studio (SSMS) has a facility to help you to do this. It allows you to register server details in a single place.

2018-10-25

SDU Tools: List Foreign Key Columns in a SQL Server Database

In a previous post, I talked about the ListForeignKeys procedure as part of our free SDU Tools for developers and DBAs. That procedure returned one row per foreign key. Sometimes though, you need to process each column of a foreign key separately. So we’ve provided the ListForeignKeyColumns tool to do that.

The tool also detects any keys that are using system-generated names. (We don’t recommend that).

You can see how to execute it in the main image above. The procedure takes these parameters:

2018-10-24

Opinion: Just how cheap should applications be?

In a recent post, I talked about my use of SnagIt and how I think people should be prepared to pay a little for applications. I’m endlessly puzzled by people I see stumbling around using free alternatives that don’t do the job, when there are good options available.

I had some interesting feedback from that post and it got me thinking further though, about how much we should be prepared to pay for applications? Why is there an expectation that most apps that we use will be free?

2018-10-23

SQL: SET NOCOUNT ON in SQL Server Triggers

I’ve done a lot of Microsoft certification exams over the years. Most of those have been SQL Server exams. The quality of the questions in those exams though, varies enormously.

One of the exams that really drove me crazy a while back was one of the intro-level ones. The problem was with the number of errors in the exam. When the question-writer gives you five substantial blocks of T-SQL, and asks which one is correct, yet they are all actually wrong in some way, that makes it a very, very tough question to answer. I find these types of exams very tiring because I’m endlessly trying to second guess what the question writer actually meant to ask. Some exams have a large number of these.

2018-10-22

AI: Machine Learning and AI - What's in a name?

I regularly hear the terms AI and Machine Learning used almost interchangeably, along with a variety of other related terms. I thought it would be useful to add a post that defines some of the common terms and how they differ:

Artificial intelligence (AI) is a fairly generic term. It relates to all intelligent agents that are able to be aware of their environments (in some way), and to take actions where the aim is to achieve a specified goal. Sometimes these goals are terminal ie: they reach a final desired state. Other times, these goals are continuous ie: keep speed at a desired value. It is considered “artificial” intelligence as to an observer, it mimics cognitive functions that humans would imagine other humans performing.

2018-10-19

Shortcut: Finding error locations within queries in SQL Server Management Studio

This is probably one of the simplest tips that I’ve published, yet I’m endlessly surprised how many people do not realize that it’s available.

When you have a script loaded in SQL Server Management Studio (SSMS), and you execute the script, you might run into an error like this:

To find where the error is, just double-click the error down in the Messages tab. I double-clicked it, and it took me directly to the error and highlighted it:

2018-10-18

SDU Tools: List Foreign Keys in a SQL Server Database

In SQL Server Management Studio, there’s no great way to list all the foreign keys that are defined in a database.

In our free SDU Tools for developers and DBAs,  we added a function ListForeignKeys to do just that, and to provide their details in a form that’s easy to consume programmatically if you need that.

You can see how to execute it in the main image above. The procedure takes these parameters:

2018-10-17

Opinion: Shout out to TechSmith for Snagit

I don’t normally do blog posts to just promote products from companies, but two weeks ago I was asked about tools that I use on a daily basis and that I really wouldn’t want to do without. Normally with a question like that, I have to think for a while. But this one’s easy: It’s SnagIt from TechSmith.

It’s the one tool that I use in nearly every part of my work. I use it all day long. If I didn’t have it, it would harm my productivity in a significant way.

2018-10-16

SQL: Version 12 of SDU Tools has shipped

SDU Tools is a toolkit that’s simple to use, has many useful functions, procedures, and views, and is updated regularly. Even if you aren’t using the tools as a set, they provide wonderful examples of how to do things in T-SQL. We have released version 12.0 of these popular tools.

The tools are free tools for DBAS and Developers. Tools for comparing databases, tables, finding unused indexes, manipulating strings, performance tuning converting data, and so much more.

2018-10-15

AI: Detecting and Avoiding Customer Churn is Critical

I’ve flown a lot over the years. What continues to strike me though, is how poorly airlines use machine learning and AI, even when they are in strong competitive environments. A key indicator is detecting and avoiding customer churn. Let me give you an example:

We flew with QANTAS and with their partners in One World for many years. We were both platinum and I’d been platinum for many years. At a recent peak a few years ago, we were flying once or twice a week. That’s not a crazy amount, but it’s enough. And it’s certainly enough to be able to see a purchasing pattern.

2018-10-12