Tim Ker
Tim Ker

Reputation: 224

Move Azure SQL Server to new region keeping the SQL Server name

I want to move a SQL database to a new region. A bit of downtime is okay.

One hard requirement is that the SQL Server name stays the same, are there are several places that the connection string is in use.

With FailOver I believe the server name doesn't change after failing over to the new region.

However once I remove the failover and delete the old SQL Server I expect that this will no longer be that case

Migrate Azure database server/database different region

https://learn.microsoft.com/en-us/azure/azure-sql/database/move-resources-across-regions

The other option, Is to create a SQL Server alias https://learn.microsoft.com/en-us/azure/azure-sql/database/dns-alias-overview and slowly migrate all connections to the alias

Upvotes: 0

Views: 633

Answers (1)

IpsitaDash-MT
IpsitaDash-MT

Reputation: 1450

  1. ​​​​First you could use Geo-Replication to have the Fail-Over to the New Server
  2. Then the Original server must be deleted
  3. Then using the DNS alias - Azure SQL Database | Microsoft Docs You could refer to the same name of the original server as the alias and so as to make sure that the original server name is not retained after the deletion and hence can have the same name.

The DNS alias acts as a translation layer, allowing your client programme to be redirected to multiple servers. This layer eliminates the hassle of having to locate and edit all of the clients’ connection strings.

  • In the Azure SQL Database service system, creates a new DNS alias. Server 1 is referred to by the alias.
  • Obtain a list of all DNS aliases assigned to server 1. The server name for which the alias is configured is changed from server 1 to server 2.
  • Using the name of the alias, remove the DNS alias from server 2.

Limitations:

  • The updating or removal of a DNS alias can take up to two minutes.
  • The alias immediately ceases referring client connections to the legacy server, regardless of any small latency.
  • DNS lookup: Performing a DNS lookup is currently the only authoritative technique to determine which server a particular DNS alias corresponds to.
  • Table auditing is not supported: A DNS alias on a server with table auditing enabled on a database is not supported. Table auditing is no longer recommended. Instead Blob Auditing could be used.

Upvotes: 1

Related Questions