Press "Enter" to skip to content

Curated SQL Posts

More Number Series Generators

Itzik Ben-Gan continues a series:

This is the second part in a series about solutions to the number series generator challengeLast month I covered solutions that generate the rows on the fly using a table value constructor with rows based on constants. There were no I/O operations involved in those solutions. This month I focus on solutions that query a physical base table that you pre-populate with rows. For this reason, beyond reporting the time profile of the solutions like I did last month, I’ll also report the I/O profile of the new solutions. Thanks again to Alan Burstein, Joe Obbish, Adam Machanic, Christopher Ford, Jeff Moden, Charlie, NoamGr, Kamil Kosno, Dave Mason, John Nelson #2 and Ed Wagner for sharing your ideas and comments.

Read on for three more solutions, as well as a re-evaluation of the solutions in the first article.

Comments closed

5 Useful Tools for DBAs

David Fowler recommends five helpful tools and products:

Backups are easily the most critical part of any DBA’s job so having a reliable way of managing them is essential. There are various tools and scripts out there but easily top of the tree for me is Minion Backup from Minionware.

Controlled by a number of configuration tables, it makes sceduling backups and configuring them down to a really granular level dead easy. If you’re like me and you’ve got a large number of databases on a server that each need to run on different days, go to different locations and need to run with different settings, Minion is about the only tool that I’ve found that lets me control things how I want without needing 101 different agent jobs. All your backups are controlled from a single agent job and that’s what I really love about it.

I’ve always liked Sean & Jen’s products, and would also recommend their indexing and CHECKDB solutions. David’s other suggestions are great as well.

Comments closed

Powershell Tools and Excel Tips

Jess Pomfret shares a few useful Powershell modules and follows up with tips for maximizing your Excel game:

Since I’ve written a lot about PowerShell previously, I wanted to highlight some other tools that I depend on. I’ve always been a fan of Excel, my personal life is full of spreadsheets – most decisions end with a spreadsheet (lucky for me, my wife is also a big fan of Excel!).  I often find myself copying data into Excel to keep track of work, or to quickly analyse data.  It’s also a great way of sharing data with a clear structure.  I’m also a big fan of shortcuts – so here’s a few I use often.

Jess also reminds me that it’s about time to tune up the bicycle…

Comments closed

Tooling Outside of SQL Server

Dave Mason shares a few useful tools::

I’m a proponent of “Show me, don’t tell me”. Screen captures go a long way toward that. Sure, Windows has Paint, but Paint.NET is a bit more advanced. I almost always have an instance of it open in the background. Hit the Print Screen keyboard button and paste (CTRL + V) it into Paint.NET (you can also use the ALT + Print Screen key combination to screen capture just the active window). From there you can do anything: trim down to just a specific part of the image, add some red arrows or circles for emphasis, blur/obscur any sensitive data that’s in the image, etc. I take tweaked screen shots and paste them into just about anything…Word documents, email, even Twitter.

As far as it goes, I think I use different tools than Dave across the board, save for 7Zip. I like Notepad++, SnagIt, WinDirStat, LastPass, 7-Zip (yay for agreement), and mRemoteNG, and despites headphones respectively. But that goes to show that there are plenty of good alternatives for products and it’s worth trying a few out.

Comments closed

Hyperscale and RBIO_RG_STORAGE

Reitse Eskens runs into a strange bug in Azure SQL Database Hyperscale:

This single wait made sure our complete environment went dead in the water. Everything halted. To get some context, Microsoft has some documentation on this wait:

Occurs when a Hyperscale database primary compute node log generation rate is being throttled due to delayed log consumption at the page server(s).

Well, that’s not really helping, because that’s about everything they tell you about it.

Click through for Reitse’s findings and Microsoft’s advice.

Comments closed

Preparing an Availability Group for VM-Level Replication

David Klee takes us through an interesting scenario:

If you have a SQL Server Availability Group (AG) and the VMs are being replicated to a disaster recovery site (cloud or on-prem), chances are the networking topology is not the same at the second site. These replication technologies can include VM replication, SAN LUN replication, or replicating server-level backups to the second site. It is quite complex to have the same network subnet existing at both sites, so usually, the secondary site contains a different networking subnet structure. It means that the servers being brought up at the secondary site are going to receive different IP addresses.

The Availability Group architecture, especially with its dependency on the Windows Server Failover Cluster (WSFC) layer, are quite intolerant of having these IP addresses changed. The utilities performing the failover might not even be aware of the WSFC-specific components that need to be adjusted.

Click through to see what you can do.

Comments closed

Clustering with Apache NiFi

Brent Segner and Ryan O’Donnell explain how clustering works with Apache NiFi:

Although it is entirely possible to deploy NiFi in a single node configuration, this does not represent a best practice for an enterprise graded deployment and would introduce unnecessary risk into a production environment where scaling to meet demand and resiliency are paramount.  In order to get around this concern, as of release 1.0.0, NiFi provides the ability to cluster nodes together using either an embedded or external Apache Zookeeper instance as a highly reliable distributed coordinator. While a simple Google search shows there is plenty of debate around whether it is better to use an embedded or external Zookeeper service as both sides have merit, for the sake of argument and this blog, we will use the embedded flavor in the deployment. 

Click through for more information, including a walkthrough on configuration.

Comments closed

More Tools of the Trade

Deepthi Goguri shares a list of useful tools for SQL Server work, presentations, and recordings:

1. OBS Studio: This is a free and open source software for video recording and live streaming. I mostly prerecord my sessions using OBS. I personally love this tool as we have pretty much good content on YouTube that teach us how to use this tool.

2. SentryOne Plan Explorer: Plan explorer is an amazing tool to analyze your execution plan and tune your queries very quickly. Its completely free.

Click through for the full list of 10.

Comments closed

Comparing SSMS and Azure Data Studio

Deborah Melkin contrasts SQL Server Management Studio with Azure Data Studio:

Honestly, the vast majority of my time is split between Management Studio (SSMS) or Azure Data Studio. I’m pretty simple\straightforward this way. I started playing a lot more with Azure Data Studio over the past year, but I find I’m not able to make the switch to using it full time. It really depends on the task that I need to do.

So what tasks do I do often and which tool do I use?

The plus side for Azure Data Studio is that it’s far enough along that some of these choices are difficult to make. The minus side is that it’s still often on the losing end. I’d expect that shift to continue over the next couple of years as the product matures and becomes a good product for database developers.

Comments closed