Unable to change to SA as database owner

  • Hi guys,

    I've encountered problem upon changing database owner from specific user to SA.

    Lock request time out period execeeded. (Microsoft SQL Server, Error: 1222)

  • Hi,

    Have you tried:-

    Use [db name]

    Go

    Exec sp_changedbowner 'login'

    Go

  • yes but hung.

  • Are there active connections to the database?

  • yes. it's a prod database.

  • Best I can tell from some basic testing on this side, changing the database owner does not require exclusive access to the database.

    When you run the command, look at the session (use Activity Monitor or go get sp_WhoIsActive) to see if it is being blocked by something else, i.e. what is the "wait type".

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 6 posts - 1 through 5 (of 5 total)

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