I am experiencing an issue when making a copy of our Azure SQL Database. The database that we are copying has an online replica as part of Geo-Replication that's available and configured through the Azure Portal.
We make a copy of the primary data onto a different server using the Azure Portal copy button, but our database copy still thinks its part of a replica set.
For example, I run the following SQL:
ALTER DATABASE <DatabaseName> SET SINGLE_USER WITH ROLLBACK IMMEDIATE
The response I get is:
The operation cannot be performed on database "" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group. Msg 5069, Level 16, State 1, Line 1 ALTER DATABASE statement failed.
I have tried to run:
ALTER DATABASE <DatabaseName> SET PARTNER OFF;
This is not supported as part of azure-sql so I get a response of:
Keyword or statement option 'PARTNER' is not supported in this version of SQL Server.
The Azure portal for the database copy says that "Geo-Replication is not configured"
Can anyone point me in the right direction of how to tell the database copy it no longer part of any replication?