Using SQL Compare with Read-only Access

Recently a customer asked if SQL Compare and SQL Data Compare can be used with a read-only database as a source. It’s a good questions as I’ve seen some tools that create temp tables or do some other work in a source database, which might cause problems. Certainly someone running SQL Compare against production would want to ensure it works as a read-only application.

This post will look at SQL Compare with a read-write database but a user account with read-only access. My previous post looked at a read-only database.

This is part of a series of posts on SQL Compare.

Setup

I’ve got a couple of databases that I use for Compare demos. In this case, compare5_prod and compare1. The compare5_prod is set to read write, which is normal.

2024-10_0110

I created a new login, which will default to the Compare5_prod database.

2024-10_0107

This login maps to a user, which has read only rights in the database.

2024-10_0109

In my compare setup, I’ll use this login to connect to the database.

2024-10_0111

As you can see below, Compare works fine, even reading the various system metadata tables:

2024-10_0113

This works because SQL Compare is not writing anything to the database. We read metadata and then process that in-memory on the client before returning the results.

You can see this also works in SQL Data Compare. Here’s the connection:

2024-10_0115

And here are the results

2024-10_0114

Summary

This was a very simple example, but I find that clients always would prefer to see examples already completed and proof that something works when they are evaluating software. Hopefully this helps answer this question.

SQL Compare is an amazing tool that millions of users have enjoyed for 25 years. If you’ve never tried it, give it an eval today and see what you think.

Posted in Blog | Tagged , , , | Comments Off on Using SQL Compare with Read-only Access

Off to Live 360

I am off to Live 360 today, on my last trip of the year. I’m excited to deliver two presentations tomorrow (VSTH03 and VSTH12), but a little sad this is a very quick trip. I’m coming back Friday, so in total I’ll be in Orlando for about 43 hours, I need to sleep, so my time is less than that.

I haven’t been to this conference in a few years, but I’m looking forward to going back, even though it’s a short trip. I always enjoy these multi-tech conferences because I get the chance to learn something completely out of my area. In my limited time, I’ll learn about Shift Left DevOps security, because it’s interesting and Brian is a friend. I will also try to hit a GraphQL session since I know nothing about it and it works with various db stores. If I can, I might do some prompt engineering as well.

If you’re at the event, I’ll try to swing by Wed afternoon and be there all day Thur. Feel free to stop me and say hi.

Posted in Blog | Tagged , , | Comments Off on Off to Live 360

How Do You Patch 100 Database Servers?

In most of the organizations I’ve worked for or consulted with, patching was always a challenge. Patching hasn’t usually been given a priority and is often skipped when operations staff is busy. This has resulted in lots of un-patched, or slowly patched systems. I assume this is one reason Microsoft continues to release RTM-GDR patches because some people won’t patch at all unless there are critical fixes.

I also know that much of IT management sees patching systems like patching parking lots. Needs to be done, but tomorrow, after we do other important work today.

Patching isn’t easy, in fact, Allan Hirt says it was never easy, but these days we don’t get the downtime over a weekend to patch, and there is a desire to patch security issues immediately because of the potential reputational (more likely) or regulatory (less likely) risks. Also, we often need to patch dozens, if not hundreds or thousands, of systems.

So is there a way that most organizations do this? It’s interesting in the piece above that Allan notes that most of us have technical debt, and this debt consists of more than just code and systems. It’s also people, budget, politics, and more. This is even more of an issue if you didn’t write the software. Applications often limit patches or upgrades, and it can be hard enough to get applications certified on new platforms when you control everything. If you purchased something from a vendor, you might be bound by their timelines not your own.

So how do you patch a lot of systems? There are lots of ideas and potential solutions. I’m sure Allan covered some recently in his session at the PASS Data Community Summit. For me, this boils down to building part of a process, using it, evaluating it, and then rolling it out wider. This might mean I need two processes because some systems will lag behind others for various reasons. I’d probably spend a year or two slowly adding to this process and getting it better, all the while ensuring I used automation as much as humanly possible to process notifications, approvals, and actually deploy code.

Start small, experiment, test, evaluate, make changes. Always codifying things that I can. It’s a method that has worked for a long time.

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 How Do You Patch 100 Database Servers?

Grinding Away: Michael Jordan

A story from Tim Grover, who was Michael Jordan’s trainer when he was with the Chicago Bulls. I don’t know this is true, but I saw this story posted and I like it (and don’t like it).

“After every game, I used to ask Michael one question: 5, 6, or 7? As in, what time are we hitting the gym tomorrow morning? And he’d snap back the time, and that was it. Especially after a loss, when there wasn’t a whole lot else to say.

No discussion, no debate, no lame attempt to convince me he needed the morning off. ‘Are you good?’ ‘I’m good.’ ‘See you in the morning.’ And the next morning, at whatever time he’d decided, he’d awaken to find me standing outside his door.

No matter what happened the night before—good game, bad game, soreness, fatigue—he was up working out every morning while most other guys slept. Interesting how the guy with the most talent and success spent more time working out than anyone else.”

Grinding away, getting better at your craft, is something that all of us can do. Whether we want to or not is a separate story.

Why I like this

There aren’t excuses for continuing to work on your craft and it takes regular attention. It requires some dedication and commitment to improve.

Why I don’t like this

It’s easy to take this to far and think the routine of every day or every week is important. It’s also easy to drive yourself too far. If you want to be the rest of the best, then you need this drive.

If you don’t want to be the best, but just be really good, then you need to do this often, but give yourself a break at times when life gets in the way.

Posted in Blog | Tagged , | Comments Off on Grinding Away: Michael Jordan