The Bit Bucket

Opinion: Bad news is best delivered promptly and directly - don't BS

In the 1990’s I was running a software company. We had a great sales guy who was also a great friend. One of the things that I loved about working with him, is that even if he didn’t know how to solve a technical problem, he’d ask the questions that I led me to see a problem differently. I could then solve it. I wish every technical person was lucky enough to have someone like that.

2019-01-22

T-SQL 101: 1 What is SQL?

For some time, I’ve been thinking that I should create a series of blog posts about the T-SQL language, from a beginner’s perspective. For the next few months, my Monday posts will be intro-level T-SQL.

The obvious topic to start with then, is what is SQL in the first place?

When I started working with databases in the 1980’s, there were many, many different types of database. Each database had its own language that was used to get information back out of the database, or to put the information into the database in the first place.

2019-01-21

Business Intelligence: Success is about small starts leading to bigger things

I spend a lot of time on client sites and time and again, one of the mistakes that I see people making, is trying to start with large projects. I think one of my all time favorite quotes about IT is:

Any successful large IT system used to be a successful small IT system.

The next time you’re thinking about creating a project that’s going to have a big bang outcome, please remember this. The history of the industry is that it really is likely to be a big bang, and not in terms of being a big success like you’d hoped for.

2019-01-18

Shortcut: Split query windows in SQL Server Management Studio

If you are working with really long script files in SQL Server Management Studio (SSMS), you might need to work on more than one part of the script at the same time. Perhaps you need to work on a function, and also on the code that calls the function.

On the Window menu, there is a Split option.

When you first do this, you’ll see a split window with the same query at top and bottom:

2019-01-17

SDU Tools: Script Server Role members in SQL Server

In our free SDU Tools for developers and DBAs, there’s another useful scripting tool. It scripts out the logins that are members of server roles. It’s called ScriptServerRoleMembers.

One key advantage of having these scripting procedures and functions is that you incorporate them into other applications, and programmatically perform the scripting if you need to.

But if you just want to create a script, that works too.

By default, it lists permissions for all logins, but you can also provide a list of the logins that you’re interested in, as a comma-delimited list, to the @LoginsToScript parameter.

2019-01-16

Need to learn to write T-SQL queries for SQL Server? Or need to become more confident?

Do you (or someone you know) need to learn to write T-SQL properly? Or perhaps you need to be more confident with joins, aggregations, CTEs, and more?

Our latest online on-demand course Writing Queries for SQL Server is now available, and at introductory pricing of just $95 USD.

It has detailed and comprehensive intro level coverage of the T-SQL language, and follows professional coding standards throughout. It’s also not just a set of videos; it includes extensive hands-on labs and quizzes to make sure the learning is great.

2019-01-15

SQL: Filtered indexes in SQL Server can be wonderful but be careful !

Back to the transaction table

Two weeks ago, I wrote about the issues with a large transaction table where only a handful of the rows were unfinalized, and that we would never use an index to find all the rows that were finalized. But we’d certainly want an index defined for the ones that weren’t. If you haven’t read that post, I’d suggest you do so before continuing to read. You’ll find it here.

2019-01-14

Book Review: No Ordinary Disruption

I mentioned in a previous post about how one of my colleagues Orin Thomas is a prolific reader and every time I talk to him, he suggests more books that I should read. Another one in that category was No Ordinary Disruption One by Richard Dobbs, James Manyika, and Jonathan Woetzel. The sub-title is The four forces breaking all the trends.

The authors claim that our intuition on how the world works could be very wrong. I suspect that the degree of change in the accuracy of our perception is a recent, and accelerating thing. In the book, they are summarizing years of research they have done at the McKinsey Global Institute.

2019-01-11

Shortcut: Pinned tabs in SQL Server Management Studio

When you get to a large number of query windows or other documents open as tabs in SQL Server Management Studio (SSMS), it can start to be difficult to keep track of them, and to find them when needed.

It’s not too bad when you can immediately find the tab that you want in the drop-down list:

But if you have more tabs than are shown in this drop-down list or if, like me, you often end up with many of them without names (as they are temporary), it can get very hard to find the few that you are mainly referring to.

2019-01-10

SDU Tools: Script Server Permissions in SQL Server

In our free SDU Tools for developers and DBAs, there’s another useful scripting tool. It scripts out the server permissions that have been granted to logins. It’s called ScriptServerPermissions.

One key advantage of having these scripting procedures and functions is that you incorporate them into other applications, and programmatically perform the scripting if you need to.

But if you just want to create a script, that works too.

By default, it lists permissions for all logins, but you can also provide a list of the logins that you’re interested in, as a comma-delimited list, to the @LoginsToScript parameter.

2019-01-09