Jump to content

Create DNS alias for dedicated SQL pool in Synapse workspace for disaster recovery


Recommended Posts

Guest Resham_Popli
Posted

This blog will walk through the details on how to enable custom DNS (Domain Name System) entries on an Azure Synapse dedicated pool inside an Azure Synapse workspace in case of disaster recovery.

 

 

 

The DNS alias provides a translation layer that can redirect your client programs to different servers. This layer spares you the difficulties of having to find and edit all the clients and their connection strings (in disaster recovery implementation). This is not supported out-of-box, so we need to take extra steps to enable this feature. There are some limitations, so please read these steps carefully.

 

 

 

Background

 

 

Custom DNS (Domain Name System) is supported on Synapse SQL dedicated pool (previously known as Azure SQL Data Warehouse) but is not natively supported when a dedicated pool is created in a Synapse workspace.

 

 

 

For the purpose of this blog, we need to be aware of the differences between a ‘connected’ workspace (sometimes known as workspace lite or workspace experience) and a Synapse workspace.

 

 

 

A ‘connected’ workspace is when an existing SQL dedicated pool (previously known as SQL DW) is migrated/upgraded to the Synapse workspace experience. To learn more, check out Enabling Synapse workspace features on an existing dedicated SQL pool (formerly SQL DW)

 

 

 

Differences between Synapse workspace and connected workspace:

 


Item

Connected Workspace

Synapse Workspace

Firewall

SQL server and Workspace

Workspace

DNS Alias support

yes

No

Rename Database

yes

No

TLS 1.2

Optional

Required

Connection policy

Proxy or Redirect

Default

 

 

 

Note: This proposed workaround is only tested on Synapse dedicated SQL Pools, it has not been tested on the Synapse workspaces or serverless SQL pools. This workaround has been tested and works with private endpoints.

 

 

 

Create a dedicated SQL pool with DNS Alias

 

 

1. Create a Dedicated SQL pool (formerly SQL DW)

 

 

 

 

2. Restore the SQL pool inside the Synapse workspace into SQLDW with connected workspace.

 

 

 

 

Note: This step needs to be followed only in case of an existing SQL pool within workspace. For Greenfield use case ignore this step.

 

 

3. Update/Migrate the SQLDW to a connected workspace.

 

 

 

 

4. Create DNS Alias

 

 

 

 

largevv2px999.png.c2711607429c1ff8ef80b6c721aabe78.png

 

 

 

 

 

Full workaround steps – including a DNS switch

 

  1. Create a dedicated pool outside of workspace (Former SQL DW).

 

largevv2px999.thumb.png.c21543a02589f9d7e3fef971e0031def.png

 

 

 

 

 

largevv2px999.thumb.png.d81eff5b5b600bf6bb51349cdb4cea55.png

 

 

 

Note: Enable AAD authentication on SQL DW.

 

 

 

  1. Restore the SQL pool inside the Synapse workspace into SQLDW with connected workspace.

 

Note
: This step needs to be followed only in case of already existing SQL pool within a workspace. For Greenfield use case ignore this step.

 

 

 

  1. Take Geo back up for the dedicated SQL pool.
  2. Migrate SQL DW to synapse workspace.

 

largevv2px999.png.79aebd059b889fe22f32149f85edaf69.png

 

 

 

 

 

largevv2px999.png.a509bea878c0edab4e6f1e45a644da5a.png

 

Note: As you can see, SQL DW is now assigned a workspace - cselogserver

 

 

5. Assign a DNS alias via
command:

 

a.) Check for existing alias

 

largevv2px999.png.964990a0afa4ef28e592822267aade34.png

 

 

 

b.) Create DNS Alias on the server

 

largevv2px999.png.0648e3ea7571468293f4c46b373bdce6.png

 

 

 

  1. Now, create a target SQL DW and enable workspace in a similar way. (Repeat Step 1 to 5 for Target SQL DW)

  1. Restore the Geo backup for the source pool in the target workspace (created in some other region for Disaster Recovery) via PowerShell script:

 

largevv2px999.png.6c0e1c468f72a40e74fa116f729e98ce.png

 

 

 

8. Move the DNS alias from server 1 to server 2:largevv2px999.png.6c51711d7d5b67f19e09b949e448a654.png

 

 

 

9. Get the alias on server 2:largevv2px999.png.db3c2cd291be2a4bd7f7c422eb824e2c.png

 

 

 

  1. Now, we can login to the restored pool using DNS alias – “respo” as shown:

 

largevv2px999.png.787ed1468b8eb5f0d685b7777276c2de.png

 

 

 

 

 

largevv2px999.png.5e16d7c404aee9e962677eeab26c2ac9.png

 

 

 

 

 

Note: This works with both SQL Server Auth and AAD.

 

 

 

 

Our team publishes blog(s) each week and you can find all these blogs here: Azure Synapse Analytics Blog

 

For deeper level understanding of Synapse implementation best practices, please refer our success by design site: Success by design - Azure Synapse Analytics

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...