SQL Server domain migration (& renaming)

Posted on 2010-01-04
Last Modified: 2012-05-08

I have to do an SQL Server 2005 domain migration & renaming

Is my checklist complete?
Is there an impact if the "Database Owner" is from the old domain?

--Domain migration
security tab of the sql server:
check old domain groups/add new domain groups

sql services::
deactivate all sql services
change the service accounts to the new domain accounts

change the domain of the server

Reboot and activate the deactivated services.

--Rename SQL Server with default instance
Pre-Step Delete all your maintenance plans and recreate them after you changed the name
sp_dropserver <old_name>
sp_addserver <new_name>, local

Question by:ALSO_DB
    LVL 11

    Accepted Solution

    That looks about right. As long as you know the SA password, do not worry about database ownership. If you run into issues with db ownership, you simply need to connect to the db under the sa account and then run the following stored procedure:

    exec sp_changedbowner 'sa'

    This will change the owner of the db to sa and then you can leave it as that or if you want a different owner on the new domain, simply change it to that. In fact you could even change the db owner to SA before the domain migration (obviously make a note of the current db owner so you can change it back later). That way there is definitely no problem with ownership.

    To put your mind at ease, what I have mentioned is also documented at the following link under section "Step 3: How to resolve orphaned users" at:

    I recently had to remove an old NT4 domain from a trust with our AD domain and a user from the old domain was an owner of a db. I did not notice this till after the old domain was removed, but as I am a domain admin and db admin I could still access the db and simply changed the owner to the correct one in the new domain with no problems.
    LVL 13

    Expert Comment

    For Renaming: some additional info and troubleshooting tips.

    For Domain Migration --> the key is to add the new service accounts. If you use mixed mode, make sure you know a SQL authenticated account just in case. Also look at who owns the jobs and databases. Is it a domain user? Are these users on the right domain? verify after the change also.

    Do you have a development instance you can try this on first to prove out your checklist and any gotchas that you bump into in your own environment?
    LVL 24

    Expert Comment

    by:DBAduck - Ben Miller
    I would also be sure to remember that you should change the Service Accounts with the SQL Configuration Manager instead of Services, or other ways so that the Encryption Keys will be correctly handled.  If you do not do this then if you have encryption keys (Symmetric, Database Master, Assymetric keys) then they will break.  Always a good practice to change them with the SQL Config Manager.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now