Azure Synapse LinkConnection template json

Girish Prabhudesai 41 Reputation points
2024-07-03T19:21:58.6166667+00:00

We have created a LinkConnection in Azure synapse, the source database is MS SQL Server and target database is Dedicated SQL Pool. We are trying to create powershell script to automate the creation of this LinkConnection for each environment - Testing, pre-prod, Performance, and production.

The example given in this document https://learn.microsoft.com/en-us/powershell/module/az.synapse/set-azsynapselinkconnection?view=azps-12.0.0 refers to linkConnection.json. The targetDatabase of this snippet is

targetDatabase":{
			"linkedService":{
				"referenceName":"sampleLinkServiceReference", // please change to your target database link service name
				"type":"LinkedServiceReference",
				"parameters":{
					"DBName":"v2"
				}
			}
		},

If we are using dedicated SQL poola as targetDatabase, we do not use linkedService in the UI. How do we do this with this json file when using powershell and running above command? There is no way to specify SQL pool name here.

Please help Thanks

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,662 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,187 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,298 questions
{count} votes

Accepted answer
  1. phemanth 8,480 Reputation points Microsoft Vendor
    2024-07-08T04:06:56.03+00:00

    @Girish Prabhudesai

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Ask: We have created a LinkConnection in Azure synapse, the source database is MS SQL Server and target database is Dedicated SQL Pool. We are trying to create powershell script to automate the creation of this LinkConnection for each environment - Testing, pre-prod, Performance, and production.

    The example given in this document https://learn.microsoft.com/en-us/powershell/module/az.synapse/set-azsynapselinkconnection?view=azps-12.0.0 refers to linkConnection.json. The targetDatabase of this snippet is

    YAMLAI ConvertCopy

    targetDatabase":{
    

    If we are using dedicated SQL poola as targetDatabase, we do not use linkedService in the UI. How do we do this with this json file when using powershell and running above command? There is no way to specify SQL pool name here.

    Solution: Finally, we modified the approach - created linked service of the dedicated pool and executed and it worked.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Girish Prabhudesai 41 Reputation points
    2024-07-07T20:31:49.24+00:00

    Hello,

    Thank you for the response. However, the answer does not help and below are the reasons

    1. The commands specified in the answer does not exist, for example "Set-AzSynapseWorkspaceLinkConnection" is no more found in the documentation
    2. targetDatabase as "dedicatesSQLPool" also did not work, it was erroring out.

    Finally, we modified the approach - created linked service of the dedicated pool and executed and it worked.

    Thanks