The Bit Bucket

Shortcut: Set query shortcuts for favorite stored procedures in SSMS

In an earlier post, I mentioned how useful the F1 key is. On its own, it provides syntax help, but when you highlight an object and hit Alt-F1, you get to see metadata about the object.

Under the covers, this just runs the sp_help stored procedure. Alt-F1 has been mapped to that.

You can see where this is configured, change it if required, and/or configure other procedures as well.

In Tools, Options, Environment, Keyboard, then Query Shortcuts, you can see this:

2018-11-08

SDU Tools: List Indexes in a SQL Server Database

When I’m working with a SQL Server database, I often need a simple list of all the indexes that are already in place. I want it in a concise form. In our free SDU Tools for developers and DBAs,  we added a procedure ListIndexes 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-11-07

Opinion: Having staff stumble around is false economy

One thing that I see time and again on customer sites is staff who really don’t know what they’re doing in trying to solve a problem, or when they are trying to implement a new solution, yet their company just continues to pay them to stumble around while getting almost nowhere.

I’m not talking about someone who’s taking longer to achieve something than an expert. I’m talking about staff who are really out of their depth.

2018-11-06

SQL: Shrinking Files and Auto Shrink in SQL Server - Just Say No

I first started using SQL Server back in 1992 with version 4.2 I was running a software house and was hoping to use SQL Server as the back end of our updated application. 4.2 wasn’t up to it. Versions 6 and 6.5 were closer but I still thought they needed far too much administration for me to be comfortable deploying them to most customer sites. Version 7 though, changed the game. Rather than having to manage devices (which was painful), we now had just standard operating system files, and even had options for automatically growing and shrinking the files.

2018-11-05

Book Review: The Phoenix Project

I’ve been spending a lot of time lately doing DevOps related work, and I thought it was important to post a review of what is often considered the first “DevOps fictional book”. I know that sounds like a geeky book but it’s not quite as you might expect. The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win by Gene Kim, Kevin Behr, George Spafford is a bunch of fun.

2018-11-02

Shortcut: Multi-server queries in SQL Server Management Studio

In an earlier post, I mentioned that you can create a registered list of servers, either in Local Server Groups or stored in a Central Management Server.

What I didn’t really talk about though, is what you can do with these groups of servers, rather than just executing queries on an individual server.

I’ve created three local server groups, for my development, UAT, and production servers.

The Development Servers group has three database servers in it. If I right-click the group, rather than any individual server, we get these options:

2018-11-01

SDU Tools: List Incoming Foreign Keys in a SQL Server Database

One of the challenges when you have foreign keys in place, is that there are restrictions on what you can do to tables that are the targets of the foreign keys. What’s often needed though is a list of all references to a particular table or set of tables.

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

2018-10-31

Opinion: Design the Business Model, not just the App

I posted the other day about how the pricing of apps has become silly. Most apps are priced so low that there really isn’t much income but worse, most don’t have a business model for the authors.

I’m sure that many smartphone app developers just think they can offer an app and get a bunch of money in quickly. They don’t seem to have thought about what happens beyond that point.

2018-10-30

SQL: What is REFERENCES permission and why does it matter?

I was at a client site the other day and they were puzzled by SQL Server object permissions. In particular, they couldn’t understand what the point of the REFERENCES permission is. It seemed pointless to them. It’s not. Let me explain why.

Keep in mind that if all the objects in the database have the same owner, then this isn’t an issue. But not all databases are like that. Many have different teams that control different parts of a large database.

2018-10-29

Book Review: 1984 - George Orwell

One of the things that using Audible has let me do lately is to get through additional books that I’m interested in. Part of that has been to go back through real classics. They don’t come more classic than 1984 by George Orwell.

When I was at high school, this was one of Orwell’s books that I read. Listening to it again now though, two things struck me:

  • How much I’d forgotten of the detail in it
  • How chillingly relevant it is today

The first two chapters in particular had me simply amazed at how prescient Orwell was. So many aspects of what he described that were clearly intended to be horrific and unthinkable at the time, and yet are so close to the current reality in many places that it’s quite chilling to listen to.

2018-10-26