How do I change the DBO account?

  • When attempting to view the database security of our SMS_CS1 database, I noticed that their was a user account called "test" which was the "db_owner". When I attempt to change the "db_owner" back to "sa", I receive the following error message:

    "Error 21776: [SQL-DMO]The name 'dbo' was not found in the Users collection. If the name is a qualified name, use [] to separate various parts of the name, and try again."

    I'm not sure where to go from here. How do I change the DBO account?

  • I found my answer. A Microsoft KB Article addressed this issue. The solution is below:

    Using SQL Query Analyzer, run the following statement.

    use SMS_CS1

    go

    exec sp_changedbowner 'sa'

  • You could also check this article by Andy:

    http://www.sqlservercentral.com/columnists/sjones/whoownsthatdatabase.asp

    .

  • I am sorry.. Its by Steve Jones.

    .

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply