50 Years of Microsoft

I get the Gates Notes email periodically and I always find it interesting to read. Like Bill Gates or not, he is a very smart individual and has thoughtful things to say. Even when I don’t always agree with him, I enjoy hearing his view and have enjoyed seeing him deliver presentations. In fact, one of my career highlights was at SQL Saturday #175 – Fargo, held at the MS campus. Bill Gates was speaking to employees that day and we were allowed to watch the Q&A from the balcony. Later, I saw him start to leave and stop by a sign. He asked someone about SQL Saturday. When they explained the idea for free conferences, he said “that’s cool.”

One of the recent emails talked about the 50th anniversary of Microsoft, with the original source code available for a BASIC interpreter. It’s an interesting read to me, since I learned BASIC first (and a little assembler) on an Apple II and a TRS-80. I didn’t start a company, but I certainly appreciate the excitement of tackling a programming challenge back then when memory and disk were in short supply. Most of my early programming tasks had me worried about how much memory and disk I was using, trying desperately to minimize both.

My first real exposure to Microsoft technology came after college, while working at a power utility. We had DOS desktops and were just starting to look at Windows 3.1. Until that point, I’d mostly lived in the Apple II space and then the mainframe/Unix space. I coveted a SparcStation with SunOS and had to settle for a PC architecture because my newly graduated budget wouldn’t support anything from SUN.

I adapted to DOS and grew to enjoy the challenges of early Windows. I adopted Win95, learned SQL Server (OS/2 and Windows NT) and the rest is history for me. I’ve been using Microsoft technologies for 33 years now, and I’ve enjoyed the time using those tools. I also appreciate the great career that Microsoft gave me.

Looking back at the times I had to work with autoexec.bat and config.sys files, when I used the probe account in early SQL Servers to check configurations, learning to track and read disk configurations for SQL Server 6.5 restores, moving from Windows NT 3.1 to 4.0 to the more modern architectures of Windows 2000 and beyond. Watching the “Visual” series of development tools and the Win32 API evolve into the .NET namespaces and the introduction of PowerShell to give us an easier way of working with non-compiled scripts. These are fun memories for me to look back on.

Most of you reading this likely use some sort of Microsoft technology. What good (or bad) memories do you have?

Steve Jones

Listen to the podcast at Libsyn, Spotify, or iTunes.

Note, podcasts are only available for a limited time online.

Posted in Editorial | Tagged | Comments Off on 50 Years of Microsoft

Can I Change a Primary Key Value? #SQLNewBlogger

I heard someone say recently that you can’t change a primary key value in a row. That’s not the case, so I decided to show a quick proof of that.

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

The Scenario

Let’s set up a simple table with some data.

CREATE TABLE PKChangeTest (
ImportantNumber VARCHAR(20) NOT NULL CONSTRAINT PKChangeTestPK PRIMARY KEY
, CustomerName VARCHAR(50)
, StatusValue INT)
GO
INSERT dbo.PKChangeTest
   (ImportantNumber, CustomerName, StatusValue)
VALUES
   ('1234567', 'Steve', 1)
,  ('2345678', 'Andy', 1)
,  ('3456789', 'Brian', 1)
,  ('1235667', 'Leon', 1)
,  ('1265567', 'Dave', 1)
,  ('9914567', 'Bill', 1)
GO

If I look at this table, I have some unique numbers making up the PKs. If I select from the table, I can see the data.

2025-04_0117

Now, let’s change some data. I’ll change the PK values with a few statements. Then I’ll select from the table, and we will see things changed.

2025-04_0118

The ImportantNumber for both Bill and Steve have changed. These are PK modifications.

We can change a PK value. These are not set in stone once inserted.

SQL New Blogger

This is a short look at something that’s a myth among some people. When I heard someone say this, I knew I needed to prove this. The scenario took just about 5 minutes to set up (even without AI), and then it was another 10 minutes to structure and write this post.  I actually have 2 more ideas from this on things I can show to prove how PKs work and are malleable.

You can do the same thing. When you wonder about something, or hear something that isn’t true from others, prove it. And blog about it.

Posted in Blog | Tagged , , | 1 Comment

The Return to the Office Debate

At the end of last year, I ran into a friend I hadn’t seen in a long time. We were chatting and this person mentioned that they were looking for a new job. They had been laid off and needed something. This is someone with a lot of experience and skill, so I wasn’t worried for their career or future. At the time, they mentioned they had gotten an introduction and interest from Amazon, but they weren’t interested in a position because of the return-to-the-office (RTO) mandate that Amazon was implementing.

I was recently chatting with another friend at a different company. This person manages a tech team, and was looking to hire another data engineer, but was told they could only hire in a certain city (City A)  in the US. In this case, it was the city with their main office. They have offices in a few cities, and a large one in City B, but the organization has been thinking of their own RTO plans and has limited hiring. My friend is now wondering if they need to consider moving to City A (not likely) or find a new job. They don’t want to have to go to the office every day in City B.

Over the last five years, we went through a pandemic where many people moved to remote work. As we’ve come out of that ordeal, lots of organizations have questioned how to structure their workforce moving forward. Some want to have their staff in the office, some want to remain remote, and there are lots of reasons behind each approach. There is evidence that people can be productive remotely, and there is evidence that groups can be productive when they are co-located together. Inside most companies, there are wide-ranging opinions and desires on office work, from both management and workers, and there is no consensus on what works best.

Tech professionals certainly can work remotely. They can also see benefits from being in the same office. The efficiency of their work habits can vary depending on the day and situation, so it’s not easy to decide how remote or how in-person someone should be, even week to week. It might depend on the job and tasks. I enjoy my commute down the stairs each day, but I also find the office invigorating. I like going to the office, and I think I’d go every day if my job required it. I’d get less done for the company each week, but I’d do it.

How do you feel about remote work vs in office work vs hybrid? Do you have mandates? Would you look for another job? These are questions I see many people asking themselves these days as executives start to make new rules about their workforce. I don’t know there’s any good answer, but I am curious what many of you think. Leave a comment in the discussion below.

Steve Jones

Listen to the podcast at Libsyn, Spotify, or iTunes.

Note, podcasts are only available for a limited time online.

Posted in Editorial | Tagged , | 4 Comments

Monday Monitor Tips: Finding the Hostname for Queries

I was chatting with a customer recently and they wanted to know which host was sending in queries that were causing problems in real time. This post looks at where you can find the hostname for running queries, which is in two places.

This is part of a series of posts on Redgate Monitor. Click to see the other posts.

The Server Overview

There are two places where you can see the host name. From the server overview, you can go to the current activity, or the new Query Executions tab in preview.

Current Activity

In the server overview, there is a lot of data, but most people scroll down to see the list of queries, such as this list from the ssc-db-n3 instance.

2025-04_0089

There is the database and lots of data, but no hostname. The reason is that these are aggregates. Each of these queries has run many times, possibly from different hosts. This is a historical view.

The better way to look for details on certain problem queries now is to look for current activity. I’ve zoomed in and highlighted this item below.

2025-04_0090

If I click that, I get an sp_who, or sp_whoisActive view of the server, and I can see the logins listed here. That’s helpful.

2025-04_0091

Still no hostname, but if I pick a query from a login, and see the details, I see this view.

2025-04_0092

In the lower left corner, I get the hostname. I’ve zoomed in below.

2025-04_0093

We could add that in the main box, but we’re trying to surface the most important info, and for most of our customers, that isn’t the hostname. However, we have added it in the detail.

If you’re like it in the main box, or would like to choose which fields are there (maybe host and not program?), send us a note to your rep or to sales@red-gate.com.

Query Executions

For some of our servers, we have a new Query Executions tab that uses Extended Events to get some data. The Workload02 system has this enabled. You can see the tab at the top, and then the view of this below.

Query Execution tabs

If I zoom in to the lower right, you can see the hostname as part of the details for query executions, along with other data. As you are examining the details of those queries which have run for over 5 seconds, you can get the metadata about the host, application, and more.

Zoom in to hostname details

Summary

Hostnames are available, you just need to learn where to look. Hence this post. Hopefully this gives you a quick tip on how to find them.

Redgate Monitor is a world class monitoring solution for your database estate. Download a trial today and see how it can help you manage your estate more efficiently.

Posted in Blog | Tagged , , | Comments Off on Monday Monitor Tips: Finding the Hostname for Queries