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
DELETE FROM BATCHSERVERGROUP
-- Clear encrypted hardware profile merchant properties
update dbo.RETAILHARDWAREPROFILE set SECUREMERCHANTPROPERTIES = null where SECUREMERCHANTPROPERTIES is not null
Step 6: Open CMD as admin
Step 7: Run:
cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\
Download SQL package from https://docs.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver15#windows-net-core
SqlPackage.exe /a:export /ssn:localhost /sdn:<database to export> /tf:D:\Exportedbacpac\AxDBforUAT.bacpac /p:CommandTimeout=1200 /p:VerifyFullTextDocumentTypesSupported=false
------------------------------------
explanation of the parameters
------------------------------------
ssn (source server name) – The name of the SQL Server to export from. For the purposes of this article, the name should always be localhost.
sdn (source database name) – The name of the database to export.
tf (target file) – The path and name of the file to export to. The folder should already exist, but the export process will create the file.
------------------------------------------
Step 8: Login LCS
Step 9: Project>AL> Database Backup> Upload.
Step 10: Take the current UAT Backup (Export)
Step 11: Import the AxDBforUAT.bacpac in UAT
Done
Thanks for this information I have similar thing to share, if you are interested in Microsoft Power Bi Platform Check this for more details about it.
ReplyDelete