D365FO Database movement from T1 to T2 known as Golden configuration promotion
Tire 1 to Tire 2 movement of database in D365FO
Generally this is needed when you move Golden configuration which is hosted in T1 (Tire 1) and you wish to get in T2 (Tire 2) or UAT then these steps are needed.
You can also view:
Step 0: Download the RPD file from LCS
Step 1: After login, open SSMS
Step 2: Backup AxDB as AxDBforUAT.bak
Step 3: Create a new DB in SSMS as AxDBforUAT
Step 4: Restore the DB backup taken at step 2.
once the backup is restored on AxDBforUAT
run this query Step 5:
update sysglobalconfiguration
set value = 'SQLAZURE'
where name = 'BACKENDDB'
update sysglobalconfiguration
set value = 1
where name = 'TEMPTABLEINAXDB'
drop procedure if exists XU_DisableEnableNonClusteredIndexes
drop procedure if exists SP_ConfigureTablesForChangeTracking
drop procedure if exists SP_ConfigureTablesForChangeTracking_V2
drop schema [NT AUTHORITY\NETWORK SERVICE]
drop user [NT AUTHORITY\NETWORK SERVICE]
drop user axdbadmin
drop user axdeployuser
drop user axmrruntimeuser
drop user axretaildatasyncuser
drop user axretailruntimeuser
drop user axdeployextuser
--Tidy up the batch server config from the previous environment
DELETE FROM SYSSERVERCONFIG
--Tidy up server sessions from the previous environment
DELETE FROM SYSSERVERSESSIONS
--Tidy up printers from the previous environment
DELETE FROM SYSCORPNETPRINTERS
--Tidy up client sessions from the previous environment
DELETE FROM SYSCLIENTSESSIONS
--Tidy up batch sessions from the previous environment
DELETE FROM BATCHSERVERCONFIG
--Tidy up batch server to batch group relation table