none
Unregister SQL Server database from Microsoft SQL Data Sync after deleting Azure Sync Agent RRS feed

  • Question

  • Hello Everyone, not sure if this is the right place to post this, I was playing with SQL Data Sync between Azure SQL Database and SQL Server on-premises; until my azure account ran out money :-), I removed my azure test environment and now I can't unregister my on-premise database from the "Microsoft SQL Data Sync" since I no longer have a key from the Azure Sync Agent.

    Is there a way to manually unregister the on-premise database?, or I need to recreate the whole thing again?

    Thank you in advance

    Luis


    Luis

    Thursday, May 7, 2020 5:07 PM

Answers

  • Thank you all for your reply, I figured that at this point the only way is to uninstall the Microsoft SQL Data Sync and reinstall it. You need to remove your database before you delete your Sync Agent in Azure, otherwise you won't have an "Agent Key" to submit on the Microsoft SQL Data Sync, lesson learned. Once I uninstalled and reinstalled the Data Sync, the database was unregistered. 


    Luis

    • Marked as answer by LazyCod3r Monday, May 11, 2020 8:18 PM
    Monday, May 11, 2020 8:18 PM

All replies

  • Thank you for taking the time to reply. Yes, I deleted the Sync Agent and that is exactly the issue, it is in my question. If you delete the Sync Agent before you un-register your On-Premise database from the Microsoft SQL Data Sync, you no longer have a valid key to be able to unregister your database, it is just stuck there.

    So I assume there should be a manual wait to do unregister your On-Premise database without botching it, or without restoring everything in Azure

    Luis



    Luis

    Thursday, May 7, 2020 8:26 PM
  • If you want to un-register an on-prem server from Azure Storage Sync you have to:

    1. Go to STORAGE SYNC SERVICES
    2. Click on the Sync Service in question
    3. Click REGISTERED SERVERS
    4. Click on the server you want to remove
    5. Click UNREGISTER SERVER
    6. Type in the (copy / paste) the name of the server in the confirmation box at the bottom

    http://uk.linkedin.com/in/ramjaddu

    Thursday, May 7, 2020 10:37 PM
  • Thank you for your reply, I already did that too, my problem is not on the Azure portal, my problem is on the local server "local" database. The Microsoft SQL Data Sync needs the Sync Agent key to register or unregister the "On Premise" or local database, since the Sync Agent is not longer online I have no way to generate a new key. How can I remove the On Premise or Local database manually from the Microsoft SQL Data Sync running on the On Premise or local SQL Server.


    Luis

    Friday, May 8, 2020 12:00 AM
  • Hi LazyCod3r,

    I have no permission to test on the Azure and to reproduce the issue what you encountered.You can get help by contact with this: AssistedSupportProducts

    Just some suggestions:

    Please check whether this is helpful: sql-database-troubleshoot-data-sync

    You can also try workaround as next:

    1.try to stop the Local SQL engine service and then delete the .mdf file and .ldf file as next:

    2.After delete you can restart the SQL engine service and then refresh to check.

    Best Regards.

    yuxi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 8, 2020 2:03 AM
  • Hi LazyCod3r,

    Is the reply helpful?

    Best Regards.

    yuxi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, May 11, 2020 1:12 AM
  • Thank you all for your reply, I figured that at this point the only way is to uninstall the Microsoft SQL Data Sync and reinstall it. You need to remove your database before you delete your Sync Agent in Azure, otherwise you won't have an "Agent Key" to submit on the Microsoft SQL Data Sync, lesson learned. Once I uninstalled and reinstalled the Data Sync, the database was unregistered. 


    Luis

    • Marked as answer by LazyCod3r Monday, May 11, 2020 8:18 PM
    Monday, May 11, 2020 8:18 PM
  • Hi LazyCord3r,

    Thanks for your post and the reply is very helpful for others who have the similar issue as yours.

    Best Regards.

    yuxi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, May 12, 2020 1:25 AM