Opinion: Learning to talk to developers – marketing to the right people for SQL Server

Yesterday, I posted about why software houses don't keep up to date with SQL Server releases. That's one issue but there's also a deeper issue. When I saw postings from product group members about this, it was predominantly DBAs that they are talking to.

I think this is targeting entirely the wrong people for this discussion.

For many years now, almost all the discussion from the product group to "customers" seems to have focused on DBAs. These people are often at the end of the chain in many organizations.

Yes these people might be involved in purchasing SQL Server licenses but by the time they see applications, they are often locked into technology stacks.

I'm not sure why it has happened but the product group seems to have lost the ability to talk to the developers, developer leads, and architects who are making these decisions. Almost every piece of marketing seems targeted at the end of the chain.

There is far more importance being placed on things like high availability features than on features that help developers create better applications in the first place, yet without a constant stream of new applications being built for SQL Server, it won't matter how good the high availability story is.

This often leads to bizarre outcomes. I always thought that Service Broker was a perfect example of this. Microsoft delivered an awesome platform for this that should have been a great starting point. But there were no tools, and no prescriptive guidance was provided. Then when it's not used much, the team seems to lose interest and move onto the next shiny feature.

The #1 problem with this though, was that the marketing was targeted at DBAs, most of whom at the time wouldn't have any interest in message-based architectures. The same applies to spatial, full-text, XML, in-memory OLTP, and so many more.

Most still don't get why these matter or much about why you should want to use them, but when you show these same features to a development team lead, their eyes light up.

Another current example is Azure SQL Database. Again, all the marketing seems targeted at DBAs working for existing customers, most of whom are currently using SQL Server on-premises. I have not the slightest doubt that the marketing team knows that's where their main initial income will come from, but when you are targeting these people, the entire discussion will be about what's missing. Existing applications are always going to be the hardest to migrate.

That's why Managed Instances are now seen as the great savior. But that just highlights the real issue.

Instead, I'd love to see the team focusing on developers, developer leads, and architects building greenfield applications. The team needs to learn to speak to these people again and focus on what is there, not what's missing.

They need to know that Azure SQL Database is an amazing platform to build their new applications on.


SQL: Why don't software vendors support the latest versions of SQL Server?

There has been quite a bit of discussion online lately about which version of SQL Server new applications should target. Members of the SQL Server product group were saying they can't see any reason why new applications should use anything less than SQL Server 2016 as a real base line.

I'd love to see any new application using the absolute latest version of SQL Server. Unlike the bad old days where you needed to wait for a service pack before using the product, the best tested version of SQL Server is invariably the one that's just released. (And there aren't service packs any more anyway).

However, I spend a lot of time in software houses and I know only too well why they are still working with older versions. There are two aspects to this:

  • Which version that they'll use features from
  • Which version they'll support customers using

The first one is easy. They only want to write code once, and so even though they might be using a later version, they'll keep their code to the earliest version that they support ie: even if an ISV (Independent Software Vendor) is supporting SQL Server 2017, they might have a restriction on using any features later than SQL Server 2012 because they want to be able to deploy on any version from 2012 to 2017.

The second one is tough. After they answer the first question, many then get really slack and don't put the effort in to test and support later versions. I understand that testing is costly and the more versions that you support, the worse this gets.

This is the true pain point though, as unless they do that, their customers will be stuck on those old versions. The problem is multiplied when the customer has to support applications from many vendors concurrently.

There is no way to fix this except pushing the application vendors to test later versions. As well as direct customer pressure, I'd love to see Microsoft reaching out about this more.


Book Review: Building a Story Brand – Donald Miller

I've been reading and/or listening to a lot of books again lately and one that I didn't have high expectations for, but ended up really liking was Donald Miller's Building a Story Brand.

If you are a business owner, I'd suggest listening to it or reading it. It takes a really refreshing approach of what he calls using a story brand framework.

When you need to tell someone what your business does, how do you describe that?

Donald points out that good movies that hold people's interest pretty much all follow a tried and true pattern. He's distilled that pattern and gives you a number of steps to building a memorable story for your business.

This book gets you to reassess almost every part of your marketing messages, and makes you think through how you would present your company almost as the hero of a story. It really drills into how to clarify your message.

He clearly describes what you need to consider for each part of creating that story. If you want to use them, he's got online resources that you can use to provide the structure that you might need to work through the framework.

As I listened to him describing common mistakes, I could immediately think of where I had made them or where others that I deal with have made them.

I have to say I was surprised how much I liked this, and now realize just how much work I need to do to implement it, yet I'm excited to try.

Greg's rating: 8 out of 10

Note: as an Amazon Associate I earn from qualifying purchases but whether or not I recommend a book is unrelated to this. One day it might just help cover some of my site costs.

Shortcut: Apply cut or copy commands to blank lines when there is no selection

When I'm doing a lot of query editing, I often get a bit mesmerized, particularly if there's a lot of manual copy and paste or cut and paste going on.

One thing that often drives me crazy is when I use Ctrl-C (ie: copy) when I meant to use Ctrl-V (ie: paste). Invariably, I do this when I have nothing highlighted at all. So not only did I not get the value pasted, I just copied an empty value into the clipboard.

But SQL Server Management Studio (SSMS) has your back on this. (And so does Visual Studio)

In Tools, then Options, then Text Editor, then Transact-SQL, under the General tab, there's an option for Apply Cut of Copy commands to blank lines when there is no selection.

The default is that it works as expected (like you don't want it to), but if you uncheck it, you might have just saved yourself some annoyance.

If I'm working with this code:

and I highlight the word DECLARE and hit Ctrl-C, then move to the blank line and hit Ctrl-C instead of Ctrl-V, I'd have just lost my first clipboard item. With this option unchecked, I can just smile, and hit Ctrl-V again, and it will still paste:

SDU Tools: Clear Service Broker Transmission Queue in T-SQL

Service Broker is one of my favorite tools in SQL Server. So many applications need to have a transactional queue, and many people try to build them using tables and other objects. But SQL Server has Service Broker and with it, you get the beauty of using the knowledge of someone who already knows about queues having thought about how they need to work.

But while Service Broker is quite forgiving, it's common while developing Service Broker applications to make mistakes and end up with messages in queues that will never be delivered because you had some bug in your code. Service Broker doesn't want to ever just throw your data away.

One of our free SDU Tools for T-SQL developers and DBAs is ClearServiceBrokerTransmission queue. Let's look at an example of using it.

We'll create a new database called Development and use it:

Then create a master encryption key, a queue, and a service:

Now let's send a message that will never be delivered (because the target service doesn't exist):

We can query to see that it's still in the transmission queue:

If we scroll to the right, we can see why it's stuck:

Now we realize that we messed up the service name and it will never be delivered, so we want to flush the queue. We can do that easily:

Note that if you are following along with the code and don't have SDU_Tools installed in that database, you'll need to change the EXEC line to point to a database where they are installed.

And finally, we could just clean up:

You can see this tool in action here:

To become an SDU Insider and to get our free tools and eBooks, please just visit here:





Opinion: Design your own job

One of the software houses that I've done some work for over the years has had a number of unexpected issues with their clients and had to shed quite a lot of their staff. This is always a concerning time and I'm seeing a lot of worried and unhappy people. Either they don't think  their jobs will last, or they are upset at having been moved to roles that they don't want.

Many see no option but to try to stick it out, even if they hate what they're doing.

When I was young, the perceived wisdom was that it was best to get a job with a large company, as they have the stability for long term employment. I saw friends heading into banks, government departments, and Fortune 500 companies.

Image by Jordan Andrews
Image by Jordan Andrews

I'm sure there was a time long ago where this worked but I think the concept of stable employment at large companies is almost illusory nowadays. In so many organizations that I deal with, I see pretty regular churn, and whole teams of good people discarded, almost at a whim.

By comparison, my friends that have created their own jobs have had by far the most stable and  satisfying careers. Many have built something up and are still doing it, even if the specifics have evolved over time. The other argument for larger companies has been that higher income can be achieved, yet many who have created their own jobs have now earned far more than if they'd joined a large company.

One of the beauties of being in these companies only on a part-time contract basis, is not being concerned when these seismic changes occur with organizations.

The way that I see the world evolving, I think it will be more important than ever to be in control of your own destiny. While it can be useful to get a good grounding in a business area from a larger company (to perhaps get a better understanding of the norms and professional standards of your industry), your future is likely to be brighter if you take care of it yourself, rather than outsourcing it to the whims of some company that you don't control.

You need to be prepared to also take on the responsibility of your own career development ie: get yourself trained on useful areas, keep across new technologies, learn new skills. Be prepared to invest in yourself, not be someone who is whinging because your company isn't developing your career the way you'd like.

And while you're at it, find something that you love to do.

Over time, I can see there being far less traditional 9-5 full-time job roles available, particularly at the lower-skilled end of the market. Don't be one of the "oh woe is me – who will give me a job now?" people.

Design your own job; take the initiative to make it happen. It may take a while but start today; invest in yourself, and take control of your own future.

SQL: And where did the SSRS Private Assemblies folder move to in VS2017?

Recently, I posted about the templates folder for SQL Server Reporting Services designer moving in Visual Studio 2017. You'll find that blog post here.

I've also now found that the Private Assemblies folder has moved too. I do wish these locations would be fixed, shared, and known rather than needing to play hide and seek when updates are made to the SSRS designer tooling.

The Private Assemblies folder was used to hold a copy of any .NET assemblies that are referenced in your SSRS projects. By using .NET assemblies, you can share logic that's used in reports. It's worth noting that wherever we can, we try to avoid using .NET assemblies for this, and wish that SSRS had a way of dealing with common code inclusions, but that's a topic for another day.

Generally we only use code in reports for things like formatting functions, because we think that reports should render the data, not really calculate the data. (That should be done by a procedure or function on the server).

One of the reasons that we avoid using .NET assemblies for shared logic in reports is that when you do that, you buy yourself deployment issues. Where will the assembly (DLL) live? You basically have two choices:

Install it in the GAC (global assembly cache) – we don't like this one as it pollutes the GAC with application-specific logic.

Install it in both the Report Server's bin directory, and also in the private assemblies area for the SSRS designer. It has to go in two places as the designer needs to be able to find it during design time, and the report server needs to be able to find it at run time.

What has recently moved though, is where the private assemblies folder is located. Previously it was here:

\Program Files (x86)\Microsoft Visual Studio 14.0

Now it's either here:

\Program Files (x86)\Microsoft Visual Studio\2017

Or here:

\Program Files (x86)\Microsoft Visual Studio\2017

Like last time, I presume the difference is because of how the Visual Studio shell has been installed ie: either by SSDT (the SQL one), or by Visual Studio (the Enterprise one).



DevOps: Thoughts on Microsoft’s Acquisition of Github

I have many friends who would have checked the calendar when they first heard that Microsoft was buying Github. They would have guessed it was April 1st.

I think it’s another pretty bold strategic move by Satya Nadella.

It’s been interesting to see all the naysayers coming out of the woodwork to beat up on the idea of Microsoft owning Github, as though it was going to be the death of Github. Almost every single time I hear a justification though, it is based on their opinion of Microsoft or something they did often decades ago.

People outside the Microsoft camp seem genuinely unaware of the seismic changes that have happened within Microsoft in recent years. As someone who has worked with them and followed them closely for decades, I can tell you that it is a very, very different company now. If your opinion of them is based on anything more than a few years old, it’s time to re-evaluate your stance.

Microsoft is already a heavy user of Github, and is the largest contributor to open source software on the planet.

But more importantly, their acquisition puts Github into a solid financial position that it did not have before. Github was pretty much at a crossroads, had a few suitors, but in any rational evaluation, Microsoft was the best positioned for this.

From Microsoft’s point of view, I can see how it will beautifully mesh with many ongoing changes within the company, particularly as things like Azure Functions take hold. It also provides more certainty for existing Github enterprise customers, and will introduce a whole new raft of enterprise level customers to Github.

The one big concern that I have is around identity. This is an area that Microsoft hasn’t yet sorted out. There are still too many issues with Microsoft Accounts vs Organizational Accounts and so on. There needs to be a good plan to integrate the Github identity system.

Shortcut: My favorite keyboard shortcuts in SQL Server Management Studio (SSMS)

Visual Studio is a very configurable tool, and particularly in the area of keyboard shortcuts. Because SQL Server Management Studio (SSMS) is based on Visual Studio, it inherits many of these configuration options.
SSMS has a very rich set of keyboard shortcuts. Without trying to cover most of them, I do want to highlight a few that I think are really important to know how to use.

Let's start with an easy set of commands:

You might need to change the case of some values. If I have this code:

I might decide that our new coding standards say that variables that are treated like constants, must be in all capitals and with words separated by underscores. (This is often called SHOUTY_SNAKE_CASE).

I can just highlight the name (or double-click it), the hit Ctrl-Shift-U to make it upper case.

And Ctrl-Shift-L would make it lower case.

Now, what if I want to rearrange the order of these declaration lines. If I needed to move the @A_CONSTANT_VALUE line below the other line, I often see people highlight the whole line, then cut it, then paste it below.

A great keyboard shortcut for doing that, is to hit Alt-Shift-T. No matter where you are on the line, it just moves the line down by one.

If I wanted to then add a line in between these two lines, what I typically see people do is to put the cursor on the D in the second line (at the beginning of the line), then hit Enter to move it down one, then use the up arrow to go back to the newly emptied line.

What you can do instead is put the cursor anywhere on the first line, and hit Ctrl-Shift-Enter.

I'm sure that I'm somewhat anal, and because of this, I also often spend time cleaning up lines. So if I come across a line like the second one here, the spacing grates on me:

The quickest way to clean up the second line is to highlight the whole line, then hit Ctrl-K followed by Ctrl-Backslash.

Notice that it automagically removed all the messy whitespace. It can do multiple lines at once, but it won't rearrange what's on each line.

Finally, if I needed to comment out this code, I'd highlight it and hit Ctrl-K then Ctrl-C.

And Ctrl-K followed by Ctrl-U will uncomment it.

Two more easy shortcuts: Ctrl-Home takes you to the top of the script. Ctrl-End takes you to the bottom of the script.

The final most useful keyboard shortcut is Ctrl-R. It hides or shows the results pane.

You'll find a detailed list of keyboard shortcuts here:



SDU Tools: Character to Hexadecimal in T-SQL

I often need to convert values from one data type to another, particularly when working with strings. One function that I'm surprised wasn't already built in to SQL Server was one that converts a character to its hexadecimal representation.

There is an ASCII function. You can see it here:

This converts a character to its ASCII value (see http://asciitable.com)

We've added a function to our free SDU Tools collection for developers and DBAs. It's called CharToHexadecimal and you can see what it does in the main image above.

You can also see it in action here:

For more information on being an SDU Insider and getting our tools and eBooks, just visit here: http://sdutools.sqldownunder.com.