How to change DB owner for all databases in SQL Server

Categories: SQL Server
--Change DB owner with SA user
EXEC sp_MSforeachdb 'EXEC [?]..sp_changedbowner ''sa'' '
«
»

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.