Viewing 2 posts - 1 through 2 (of 2 total)
This will show errors for "Cannot change owner..." as mentioned above for the master, model, tempdb, and distribution databases, but it will run and successfully update all other databases despite...
May 31, 2016 at 4:52 pm
#1882305
This is the proper syntax for the sp_MSforeachdb. I've tested this successfully in SQL 2008 R2, but it should be good for 2005 on up.
EXEC sp_MSforeachdb
'
EXEC [?].[dbo].sp_changedbowner @loginame =...
December 31, 2014 at 6:55 am
#1767176