Commit fd850b5
sp_Blitz: replace sp_MSforeachdb calls with sp_ineachdb
sp_ineachdb (shipped in this repo, with Azure SQL DB support added
recently) is a drop-in replacement for the built-in sp_MSforeachdb.
Every EXEC/EXECUTE call of sp_MSforeachdb now calls dbo.sp_ineachdb
with the same command string — no changes to the per-DB query bodies.
Verified every converted call is compatible with sp_ineachdb's Azure
rewriter: commands use only USE [?]; variants and [?].schema.object
three-part names, both of which the rewriter handles. No cross-DB
references to master/msdb/tempdb inside any command.
Also updated the surrounding comments in the header and in the
@CheckUserDatabaseObjects section to reflect the swap.
Fixes BrentOzarULTD#3949
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4cd29f2 commit fd850b5
1 file changed
Lines changed: 49 additions & 53 deletions
0 commit comments