sp_msforeachdb

sp_msforeachdb: Improving on an Undocumented Stored Procedure

  • Article

Have you ever wanted to run a query across every database on a server with the convenience of a stored procedure? If so, Microsoft provided a stored procedure to do so. It’s unreliable, outdated, and somewhat obfuscated, though. Let’s improve on it!

4.71 (42)

2016-04-15 (first published: )

14,453 reads

Blogs

Why I am running for the PASS Board in 2020

By

This blog post lists the reasons why I felt the need to run for...

Blog Refresh – Growing Readers

By

Happy Tuesday everyone… In early 2017 I started blogging on this site in hopes...

Daily Coping 27 Oct 2020

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

cannot find MSOLEDBSQL driver for SSIS 2019 connection manager

By sqlfriend

In the list of connection manager driver, I cannot  find MSOLEDBSQL, There is a...

Lean Coffee

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Lean Coffee

How Long is the List?

By BTylerWhite

Comments posted to this topic are about the item How Long is the List?

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers