Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have an old DB, 'ourDB', which was originally created by user: X

Now user X has been deleted and no longer exists on the DB Server.

However the user X is STILL the owner of the DB 'ourDB'.

Can we, without any risk for running software, change the DB owner to an existing user called 'newOwner'?

How is this done?

Something like this?:

USE ourDB
GO
EXEC sp_changedbowner 'newOwner'
GO

I'm a bit worried about changing the db_owner of a db as it seems like a major operation, so if anyone knows of possible consequences it would be very nice to hear :).

Kind regards

share|improve this question

1 Answer 1

up vote 2 down vote accepted

As far as I can tell, there's no visible impact from running this on a live system (pretty sure I've done it plenty of times). Be aware that the new owner will be mapped to dbo. As always, if you're unsure, try it on a test system/database first.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.