184 Views
SQL Server (2005 and above) contains two undocumented stored procedures, viz. sp_MSforeachdb and sp_MSforeacheable which can be used to loop through all the databases and tables and execute a command.
0 comments
Join in on a hand-picked round up of the best .NET articles every day.
Curated by our Moderators and Voted up by our Community. Free.
SQL Server (2005 and above) contains two undocumented stored procedures, viz. sp_MSforeachdb and sp_MSforeacheable which can be used to loop through all the databases and tables and execute a command.