Home Forums Article Discussions Article Discussions by Author Discuss content posted by William Talada Exec scripts in a group of databases RE: Exec scripts in a group of databases
maciej.krasuski
SSC Journeyman
Points: 96
More actions
January 13, 2010 at 6:00 am
#1102984
You can also use undocumented stored procedure sp_msforeachdb. It will execute your code for all databases. Then you can add condition where you will filter unnecessary db. If you have a lot of databases it's the better choice.