How to migrate domain (with dns records) ownership from one customer to another

How to migrate domain (with dns records) ownership from one customer to another

Objective

When two customers are sharing a domain, the isOwner depicts the current owner of the domain; We need to be able to: 
1. Transition Domain ownership to the other customer.
2. Transition all of the DNS records associated with this domain to the other customer.

Process

Create a DNS zone on the target customer:
1. On the DNS zone recipient customer, the DNS zone entry must be pre-created in the portal for the transition of the DNS ownership and DNS records to work. Follow the steps below to create the new DNS zone in the recipient customer. 
a.) Open the recipient customer in the portal and click on Edit  Customer. 

b.) Under Domain Management, click on Add to add a new domain, add the domain that needs to be transitioned from the other customer and click Update, then finally click  Provision. Take note not to check the DNS Zone checkbox for the new domain otherwise, it will show up an error related to domain ownership. After the new domain has been added to the target customer, you may now proceed on running the script to transfer the domain ownership and all DNS records associated with that particular domain. 



Domain ownership and dns records transfer:
1.  Backup the OLM database.
2. Update and save the script below as .sql file (or download and update the attached script file).
3. Open the file on SQL Server Management Studio (see screenshots).
4. Set the database to OLM and execute the script for a customer. After the script runs successfully, you can verify in the portal if the DNS zone and all its records have been transferred. 





Set the domain and the customer shortcode in the script below then run the entire script to transfer the domain and all its records. 

SQL

/* Domain Transfer Process
Use to transfer a Domain name from one customer to another.
This will update Domain Ownership and transfer all DNS records to the Destination Customer.
The domain will continue to be shared with any pre-existing customers
You must assign the domain to the customer through Atria before executing.
*/
Declare @DomainName varchar(100)
Declare @DestinationCustomerCode varchar(50)
Declare @transferRecords int 
Declare @customerid INT
Declare @customerDomainID INT
set @DomainName = 'Blackwall.com'       -- ENTER YOUR DOMAIN NAME IN HERE, MAKE SURE IT IS CORRECT!
set @DestinationCustomerCode = 'BC'     -- ENTER YOUR DESTINATION CUSTOMER SHORTCODE HERE
-- Determine the ID of the customer
Select @customerid = customerid from customers where name = @DestinationCustomerCode
select @CustomerDomainID = CustDomainID from CustomerDomain where customerid=@customerid and CustomerDomain = @DomainName
if @@ROWCOUNT = 0
    PRINT 'Could not find domain at destination customer, add the domain to the customer before attempting to run the transfer process'
else
    BEGIN
        -- Set ownership against this customer
        Update CustomerDomain
        set IsOwner=1 
        where CustDomainID = @customerDomainID
        -- Set DNS management against this customer
        Update CustomerDomain
        set IsDNSZone=1 
        where CustDomainID = @customerDomainID
        and exists (select * from CustomerDomain where IsDNSZone=1 and CustomerDomain=@DomainName)
        -- Remove ownership from all other customers
        Update CustomerDomain
        set isOwner=0,isDNSZone=0
        where CustDomainID <> @customerDomainID
        and CustomerDomain = @DomainName
    END


    • Related Articles

    • How to Migrate from Hosted Exchange to Exchange Online

      Overview This article provides an example of how to migrate from the Atria Hosted Exchange Service to the Microsoft Online Service.  It will cover the change in service as well as data migration.  The process will use the following free Microsoft ...
    • Adding a Remote Dedicated Customer

      Overview In Atria V15, we now have the ability to manage Private Active Directory's. Customers who have their own AD Infrastructure, gain the same self service and management capabilities of Atria that have worked so well for multi-tenant Active ...
    • Microsoft Online - How to configure your Customer plan

      Overview The Microsoft Online service within Atria has been designed from the Ground Up with Customization and flexibility in mind. This means, that it can likely cater with most configuration scenarios you may come across with Microsoft Online ...
    • How to Customize Display Name Patterns

      Overview By default, Atria's Display Name Pattern is set to First Name Last Name format.  This is used to default the Display Name when creating new users. This guide shows how to customize Display Name Patterns in Atria to meet the needs of ...
    • Atria v15+ System Requirements

      Overview The following article provides the prerequisites necessary for the deployment of Atria v15+ into your environment. System Requirements Environment Core servers for the platform should be domain joined. Before you can deploy Atria the Active ...