How to remove the Sync Metadata Database from Azure

Mike Welborn 56 Reputation points
2023-07-12T16:25:24.2+00:00

Before I begin, please note that all of my database are Azure SQL databases. I have no local server or database or installed data sync agent.

I am trying to use the Azure SQL Data Sync tool to replicate data from my transactional database (Azure SQL) to a reporting database(Azure SQL).

I went through the initial configuration in my development environment and am ready to stand it up in my production environment.

The problem is that when I was working on my proof of concept in the development environment I configured the metadata database on my development server.

Now when I attempt to stand this up in my production environment I don't have the option to configure a metadata database. That is, when I go to my production database (on a production server) and attempt to create a new sync group, the Sync Metadata Database option is filled in with the metadata database I created on my development server. I can't rely on that for a production configuration.

I would like to remove everything I did on the development server and start fresh in production, but I cannot find a way to remove the existing Sync Metadata Database.

Looking for some way to remove the existing Sync Metadata Database or transfer it to another server. Any ideas?

Azure SQL Database
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Alberto Morillo 33,426 Reputation points MVP
    2023-07-12T17:03:09.26+00:00

    Please run the scripts provided on GitHub. Click here. There you will find the instructions needed to use the scripts.


  2. Mike Welborn 56 Reputation points
    2023-07-12T18:47:59.8233333+00:00

    I found the answer. I had to go to PowerShell.

    Find the SyncGroup

    Get-AzSqlSyncGroup -DatabaseName [database name]-ResourceGroupName []resource group] -ServerName [server name]-

    Remove the SyncGroup

    Remove-AzSqlSyncGroup -DatabaseName [database name] -Name [sync group(from above command)] -ResourceGroupName [resource group] -ServerName [server name]


  3. GeethaThatipatri-MSFT 29,017 Reputation points Microsoft Employee
    2023-07-12T19:31:53.6033333+00:00

    Hi, @Mike Welborn Thanks for posting your question

    The sync metadata Db is per sub per region. So if your prod server is under the same subscription as test server, then the same sync Db will be used.

    Regards

    Geetha