Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I manage a SQL Server machine (with SQL Server 2000 and 2005 installed) that was first created on an Active Directory domain that we are transitioning away from and are about to shut down. All of my databases have File Owner's from the old domain.

New accounts have been created that have the correct permissions to run the SQL Server services and execute all necessary SQL Server processes. My question is, what benefit is there to updating the associated File's Owner property on each database?

Do I need to assign a new AD account to each database, or can I leave it as it is since there are already accounts setup that have full admin rights for all of my databases?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Yes, you need to change the databse owners to valid principals. There are several features that require the database owner principal to be valid, most notably the EXECUTE AS infrasturcture. You may be using these feature whithouth your knowledge, for example an application may be using SqlDependency which requires Service Broker which uses EXECUTE AS. Rather than face long nights of troubleshooting cryptic error messages, do yourself a favour and change all owners on all databases to sa:

alter authorization on database::<dbname> to [sa];

And no, I did not specify sa by mistake.

share|improve this answer
    
:I copy & pasted your command and changed <dbname> to my db name, and I'm getting an error "Incorrect syntax near the keyword 'authorization'." Is there a mistake in your code? –  RLH Jul 9 '12 at 16:18
1  
That syntax is for SQL 2005. On SQL 2000 you must use sp_changedbowner –  Remus Rusanu Jul 9 '12 at 16:32
add comment

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.