The Bit Bucket

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

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

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

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

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

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?

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

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

Shortcut: Configuring registered servers in SQL Server Management Studio

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?

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