Press "Enter" to skip to content

Day: May 14, 2025

SQL Agent “Success” on Failure

Todd Kleinhans does not believe that green is good:

Far too many times, I have seen DBA(s) and others have this false sense that if the Agent run status shows green, then everything must be ok.

Click through for a funny story about a gas station robbery and examples of how a SQL Agent job can report success but actually fail. You also see this a lot with replication or tasks that are asynchronous in nature: the task is reporting that we successfully started whatever operation, but that doesn’t mean the operation itself succeeded.

Leave a Comment

Database Snapshots in High-Availability Setups

Stephen Planck adds one more layer of complexity:

SQL Server’s database-snapshot feature is a wonderfully simple tool: at the instant you create the snapshot, every page in the database is marked “copy-on-write.” Nothing is copied across the wire, no blocking locks appear, and the snapshot opens immediately as a read-only database on the local replica. Queries against the snapshot see the world exactly as it looked at that moment while the live workload keeps changing pages in the primary data files. Because snapshots live only in sparse files on the server that owns them, they are not a replacement for backups—but they are perfect for ad-hoc reporting, quick “before-and-after” comparisons, or a safety net when you want an easy way to back out a risky change that should finish within minutes or hours.

But read on to see how they interact with high-availability features such as transactional replication and availability groups.

Leave a Comment

Self-Healing in SQL Agent Jobs

Rob Douglas doesn’t want to click the button a second time:

Recently, someone made an off the cuff comment about using TSQL Tasks in Maintenance Plans to handle more complex logic that SQL Agent handled out of the box. I was briefly excited by the prospect of building improved logic flows directly into SQL Server Maintenance Plans. This months Andy Levy hosts TSQL Tuesday and asks us about how we handle SQL Agent Jobs and this seemed like a great opportunity for me to share a story about how I wasted an afternoon testing a few components I have a passing knowledge with, attempting to implement auto-healing and conditional logic flow, only to snap out of it a few hours later when I realized that I was trying to solve a problem that someone else cracked nearly 2 decades ago.

Click through for the example. Some people might think of this kind of spelunking as a waste of time. My counter-argument is that it is better to know three ways of doing a thing versus one, as inevitably, you’ll run into the situation in which the one way is either not workable or is such a bad option that it’s painful to implement.

Leave a Comment

PARSE_SYNTAX_ERROR in Microsoft Fabric Notebooks

Olivier Van Steenlandt runs into an error:

As mentioned earlier, I have been playing around with Microsoft Fabric intensively in the past few months. During this period, I ran into a specific issue with one of my notebooks. What happened? Well, I was starting on a new notebook in the evening and life happened… So I stopped playing around to do something else.

A few days later, I wanted to continue my work and remembered that I was required to change something in my data load from a csv file.

Read on for the cause of this error. It’s something that can affect anyone at any time. Even you. Well, probably not you, but the person next to you? Yeah, even that person.

Leave a Comment

Visualizing SQL Agent Job History

Andy Levy wants a picture or at least a thousand words:

If you don’t have a monitoring suite watching SQL Agent, or you want to get a bigger picture view of when and how your Agent jobs are running, dbatools can help you shortcut getting this information. Get-DbaAgentJobHistory does exactly what its name suggests – it fetches the execution history for one or more Agent jobs on one or more SQL Server instances. Thing is…it can produce a lot of output if you’re not careful.

Read on to see how you can use this to generate a visual indicator of when your jobs are running and how they fare.

Leave a Comment

Customizing Parameter Display in Power BI Paginated Reports

Andy Brownsword doesn’t like having parameters all helter-skelter:

Parameters in Paginated reports allow for us to tailor report contents based on user selected criteria. These were inherited from Reporting Services as a precursor to the slicers and filters in Power BI reports.

Coming from a Reporting Services background I have a soft spot for pre-defined paginated reports. However these parameters can sometimes get a little unruly. Here we’ll see what that looks like and how we can go about resolving the issue.

Click through to see what this means, as well as how you can fix it. Or embrace the chaos, your choice.

Leave a Comment