Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Changing db owner script

    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...

  • RE: Changing db owner script

    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 =...

Viewing 2 posts - 1 through 2 (of 2 total)