Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Change owner on system database

Author  Topic 

tfountain
Constraint Violating Yak Guru

491 Posts

Posted - 2007-11-29 : 13:57:47
Hi,

We have a situation where somehow several of the system databases are owned by an ID of a person no longer with the organization. This triggers a few questions:
  • If I disable the user (it's a SQL account, not domain), will that cause any issue?
  • What is the correct way to change the user of a system database?

Haywood
Posting Yak Master

221 Posts

Posted - 2007-11-29 : 14:12:50
USE MyDB
GO

EXEC sp_changedbowner sa
GO


This will change the database owner back to the dbo/sa. Usually, you have to do these types of things after restore operations have occured...(but not always).

Go to Top of Page

tfountain
Constraint Violating Yak Guru

491 Posts

Posted - 2007-11-29 : 14:41:33
The sp_changeowner proc does not work on system databases, nor does it's 2005 replacement ALTER AUTHORIZATION.
Go to Top of Page
   

- Advertisement -