(සචියාගේ ටෙක් බොලොගය)

Breaking

Welcome to Sachin's technology blog site.

Monday, October 15, 2018

Azure SQL Database - Failed to Export Delete Database

We receive a request from different department to export/delete database. but the error message throwing that "Failed to delete the database: TestDB. ErrorCode: 400 ErrorMessage: Database ‘TestDB’ cannot be deleted because it is used as a sync metadata database which still contains sync groups and/or sync agents"


We have no idea what was happen to this database since we haven't touch that. what really happen we don't know is some one setup a data sync group where this database was involved in bi-directional synchronization with another Azure SQL Database. The other database was deleted a long time ago and clicking on the sync option within the portal confirmed that nothing was actually ever connected or ready.




error

I found many internet articles to resolve this issue. we found one useful is remove unwanted table schema(DSS) and users(MS_SyncAccount).


but fortunately we found one single script to do that all. I would like to thanks Microsoft support to given this.

steps.

1. run this code in to affected database

2. click the result raw



3. in result view you can find all the script which need to execute as per below image



4. execute the script on affected database



Thank you and your comment appreciated.

1 comment:

  1. In shared web facilitating, every one of the sites in the worker share a similar circle (plate space), a similar processor, a similar RAM, a similar IP and data transmission and in particular they share a similar working framework. https://onohosting.com/

    ReplyDelete