Press "Enter" to skip to content

Category: Error Handling

Choosing the Right Logging Level in SSIS

Andy Brownsword does a bit of logging:

When creating SQL Agent jobs to execute SSIS packages we can choose the level of logging to be captured. Different settings are more beneficial under the right circumstances so it’s important to understand the differences to make the right decision.

These settings control the internal logging done by SSIS. This is out of the box and freely available, so why not use it effectively.

The real trick is that if you swallow all of the exceptions and errors, everybody will just assume your code is working perfectly and boom, problem solved. Or you could read Andy’s post and get actual information. Whatever works for you, I suppose.

Leave a Comment

ACE Drivers and Linked Servers

Sean Gallardy has a public service announcement:

There’s been a resurgence of people pointing out dumps occurring in SQL Server when using linked servers with the ACE drivers. It’s been on the MCM email list, forums, SQL Server Feedback site, everywhere, and it’s basically the same response every time… ACE drivers were not made to be used as linked server drivers in SQL Server.

To be fair, how could the company that produces Access and Excel possibly be in contact with the company that produces SQL Server and create a driver that works well?

I have used the ACE drivers for PolyBase, though that was for fairly light-duty work and thus I haven’t seen any dumps. But I guess if you want a higher-quality driver, go with someone like CData.

Leave a Comment

Error Handling in Microsoft Fabric Translytical Task Flows

Jon Vöge continues a series on write-back in Microsoft Fabric:

In my pursuit of testing out Translytical Task Flows and User Data Functions as a write-back alternative to Power Apps, I’ve come to spent a good amount of time trying to debug those features as well. Especially since they have a tendency to throw pretty non-descriptive error messages your way.

For this week’s blog post, I’ve made a small write-up of tips and tricks for troubleshooting and debugging translytical task flows, as this was something I struggled a little with myself.

Read on for several tips around better testing and error handling within these functions.

Comments closed

Ways to Debug T-SQL Scripts

Simon Frazer shares some tips:

At some point, every SQL developer or DBA will need to debug T-SQL scripts, either to verify that they behave as expected or to track down the root cause of a problem. Whether you’re building something new or investigating a production issue, debugging is an essential part of the process.

There are several techniques available for troubleshooting, and it’s important to approach this differently depending on whether you’re working in a production or non-production environment. Each environment has its own risks and constraints.

Click through for Simon’s process. I also echo Simon’s sentiments at the end regarding the SSMS debugger—I know people who are passionate about it and mourn its passing, but I was never one of those people. It was far too easy to get in trouble with it, especially in shared environments.

Comments closed

Bad Request Error Running Powershell in Azure DevOps

Koen Verbeeck wants good requests:

I needed to run a PowerShell cmdlet in an Azure Devops pipeline. The cmdlet in question was New-AzRoleAssignment, but the cmdlet itself isn’t important. What is important is that I needed to pass the object ID of a service principal to the command. Even though I was pretty sure the syntax and everything was correct, I got a “Operation returned an invalid status code ‘BadRequest’” error when the PowerShell was run (inside an Azure PowerShell task):

Read on to see how Koen diagnosed and resolved the issue.

Comments closed

Troubleshooting Network-Related or Instance-Specific Error

Aaron Bertrand has started a new series:

This is the first in a series of articles meant to provide practical solutions to common issues. In this post, we’ll talk about one of the most pervasive error messages out there:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

Read on to see what a variety of potential solutions to this problem. I was going to joke “It’s always DNS” but Aaron actually has a section on DNS in there.

Comments closed

SQL Server Error Log Tips

Kevin Hill notes that the error log isn’t just for errors:

SQL Server’s Error Logs often get overlooked, until something breaks. But if you know how to use them, they can tell you what went wrong before you’re knee-deep in outage mode.

Whether you’re a sysadmin who inherited SQL or an MSP juggling multiple environments, understanding the ErrorLog is low effort, high return.

Let’s decode the basics.

Click through for examples of information you can find in the error log. Kevin mentions cycling the error log weekly. Back in my DBA days, I’d cycle them daily because I didn’t want the files to grow too large and become unwieldy. Some of this, of course, depends upon how hard people are pushing that box and how much you need to log.

Comments closed