I have a database named myAppDB on an Azure hosted SQL Server in the Eastern US Datacenter. I created a new SQL Server in the South Central US datacenter. I then Created a Geo Replica of myAppDB on the server in Eastern US to the server in South Central US. It worked! I have validated that the new database is in fact read only from SSMS and that data is being pumped across as the primary database is updated with ongoing transactions.
The problem is, that the Azure interface to create the replica does not allow the specification of the database name for the replica.
So now I have two different databases on two different servers, both with the same name - myAppDB. Physically this works, but in terms of usability, if I'm working in SSMS with two database server connections, it's confusing because regardless of which database I'm accessing, SSMS reports myAppDB. I'd much rather have the replica named something like myAppDB_Read just to bring a bit more clarity to my working environment. Is there any way to achieve this? (I've already tried the standard method for renaming a DB but I got an error message stating that the operation can't be performed because the database is in a replication relationship.)
Thanks for your advice!
-
1Is Data Sync for Azure an option for you? learn.microsoft.com/en-us/azure/azure-sql/database/…Francesco Mantovani– Francesco Mantovani2024年04月12日 09:26:41 +00:00Commented Apr 12, 2024 at 9:26
-
The literature at that page states that Data Sync is not the preferred solution for my use case. Data Sync isn't the preferred solution for the following scenarios: Read Scale; Use read-only replicas to load balance read-only query workloadsYossi Geretz– Yossi Geretz2024年04月12日 13:29:41 +00:00Commented Apr 12, 2024 at 13:29
-
1So I believe there is no solutionFrancesco Mantovani– Francesco Mantovani2024年04月12日 13:47:05 +00:00Commented Apr 12, 2024 at 13:47
1 Answer 1
In Azure SQL Database, when geo-replication is enabled, the replica databases cannot be renamed. And you cannot define a different name for the replica database during setup also.
This has been confirmed by a Microsoft employee on StackOverflow. See here. He is motivating users who want this feature available to vote for it on a feedback site for Azure.