3

When I create a database, I have always changed the database owner from me (usually my domain account) to another, either a standard service account used for ownership, or to the usual sa

However, I've just inherited a series of instances where a lot of the databases have been created by another member of staff, who's now left, so naturally his domain account has been deleted.

Didn't run into any issues with this until yesterday when I tried to create a stored procedure on a database that would execute as owner (blindly believing it to be 'sa'). The create failed because the owner didn't exist, so I had no choice but to make an ad-hoc change as the client needed the stored procedure creating.

There are tons of production databases under his name so I want to be both pro-active and change-control savvy.

First question is, what are the potential issues this could cause now or in the future?

Second question, can I safely just change ownership to that of a standard account or 'sa'? Could it, will it, have any weird impact?

4

Just change ownership for starters.

Database ownership (the owner_sid in sys.databases) not have really have much impact on day to day operations

  • 2
    To which I might only add that it's feasible a stored proc with EXECUTE AS OWNER might reference some other resource the new owner doesn't necessarily have access to. A good mitigation for this that will most likely "just work" would be to make sa the owner. – Max Vernon Apr 7 '16 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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