HowTo: Transfer dam on-premise Sql Database to azure Elastic sql pool
Transfer Dam Database to Azure
This application transfers a dam database from a on-premise Sql Database to a azure elastic Sql Pool.
Application
Requirements
DAM database must be at 5.6.1 or above (all tables must have primary keys)
This application must be run on the Dam server
An empty Azure SQL Target Database must exists with the same Collation as the source database
Firewall access from the machine running the DAM center to the Azure Database. This is a setting in the azure portal for the elastic pool server
"SQL Server Replication" must be enabled in the On-Premise Sql Server, this is the default for Azure SQL VMs, otherwise add the feature via the SQL Server Installation center (the sql server iso)
Use
Select damcenter that must be transferred to the azure elastic sql pool
Fill Azure ElasticSQL Username and Password - see Server settings in Azure Portal
If the Replication UserName does not yet exist - the autogenerated password is visible - note this down - it is the only time it is accessible
Verify that Source Collation and Target Collation matches - if not recreate the target database with the correct collation
Click Transfer Design
Wait for Transfer Design to complete
Click Configure Replication
When Replication configuration is completed, wait for replication to get in-sync
The compare function can show # of rows in source and dest database.
Create a admin_xxx_dam user in the Azure Database with a secure password.
build connection string and have it ready
When the database must be switched - stop iis, change Dam database to offline (ensure that it is nolonger used)
Change all connection strings in web.config and appsettings.json to the new connection string
Start IIS
Test
Success