Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unable to change to SA as database owner Expand / Collapse
Author
Message
Posted Tuesday, April 23, 2013 12:28 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 2:20 AM
Points: 30, Visits: 194
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)
Post #1445287
Posted Tuesday, April 23, 2013 12:51 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 10:25 AM
Points: 1,156, Visits: 844
Hi,

Have you tried:-

Use [db name]
Go

Exec sp_changedbowner 'login'
Go

Post #1445291
Posted Tuesday, April 23, 2013 2:57 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 2:20 AM
Points: 30, Visits: 194
yes but hung.
Post #1445318
Posted Tuesday, April 23, 2013 4:42 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 10:25 AM
Points: 1,156, Visits: 844
Are there active connections to the database?
Post #1445351
Posted Thursday, April 25, 2013 9:54 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 2:20 AM
Points: 30, Visits: 194
yes. it's a prod database.
Post #1446784
Posted Friday, April 26, 2013 1:10 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Saturday, August 23, 2014 8:34 AM
Points: 7,097, Visits: 12,601
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
Post #1447134
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse