Hello. Please assist me. I am using sp_MSforeachdb and it is working so well with the below sytax:
DECLARE @command varchar(1000)
SELECT @command =
'USE [?] exec sp_helpfile' ---- exec sp_helpfile =query,you can replace how u wish.
EXEC sp_MSforeachdb @command
Now, my challenge is that there are a lot of databases (200) inside the server, some I do not have access to or they are not managed by me. So I want to use sp_MSforaechdb but only for the databases(20) that are of my responsibility. Please assist me with the syntax to include the loop on the above syntax that is already working.
Thanks
*This post is locked for comments