SDU Tools v22 is now available (finally)

SDU Tools v22 is now available (finally)

One of our popular free resources is the SDU Tools library. If you haven’t checked it out, I’d encourage you to do so. It’s a large library of functions, procedures, and views all written in native T-SQL code.

You can easily use it as a complete library, or use it as examples of how to write T-SQL code. v22 is now available for download.

If you aren’t on our notification list, you can add yourself here:

https://sdutools.sqldownunder.com

I’m sorry it’s taken a while longer to get this version out than I would have liked, but we’ve finally caught up after a really busy period.

In v22, we’ve added the following:

  • Calculate Age in Months - think it’s easy to work out ages? Just use DATEDIFF? If you think so, you’d be mistaken. DATEDIFF could even tell you that someone who is one day old is a month old. That’s not true where I live. This function fixes that.
  • Last SQL Server Restart (work out when SQL Server was last restarted)
  • Languages (this is a great list of all the world’s languages, categorized into their language families, includes the name of the language in English, and in the native language, and has the two and three character ISO codes for them.
  • List Constraints with System Names (you know you should name constraints explicitly and not let the system do it. This tool helps you find the ones that have slipped through)
  • File Path To File Extension, File Path To File Name, File Path To Folder Path - these functions take a full file path and extract out the extension, the file name, and the folder. They work with local file paths, UNC paths, and with Windows and Unix path delimiters.
  • List Untrusted Check Constraints, List Untrusted Foreign Keys - e previously provided tools to attempt to retrust untrusted check and foreign key constraints, but we realised we did not have a tool to find them in the first place. One new tool is used to list any check constraints that are currently untrusted. The other new tool does the same for untrusted foreign keys.

We’ve also done the usual updates to lists of SQL Server versions and builds, and a few patches to existing tools.

We hope it’s useful.

2022-06-05