You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/search-indexer-how-to-access-private-sql.md
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: mattgotteiner
7
7
ms.author: magottei
8
8
ms.service: azure-ai-search
9
9
ms.topic: how-to
10
-
ms.date: 12/10/2024
10
+
ms.date: 01/27/2025
11
11
---
12
12
13
13
# Create a shared private link for a SQL managed instance from Azure AI Search
@@ -38,11 +38,11 @@ Although you can call the Management REST API directly, it's easier to use the A
38
38
39
39
## 1 - Retrieve connection information
40
40
41
-
Retrieve the FQDN of the managed instance, including the DNS zone. The DNS zone is part of the domain name of the SQL Managed Instance. For example, if the FQDN of the SQL Managed Instance is `my-sql-managed-instance.00000000000.database.windows.net`, the DNS zone is `00000000000`.
41
+
In this section, get the DNS zone from the host name and a connection string.
42
42
43
43
1. In Azure portal, find the SQL managed instance object.
44
44
45
-
1. On the **Overview** tab, locate the Host property. Copy the DNS zone portion of the FQDN for the next step.
45
+
1. On the **Overview** tab, locate the Host property. Copy the *DNS zone* portion of the FQDN for the next step. The DNS zone is part of the domain name of the SQL Managed Instance. For example, if the FQDN of the SQL Managed Instance is `my-sql-managed-instance.a1b22c333d44.database.windows.net`, the DNS zone is `a1b22c333d44`.
46
46
47
47
1. On the **Connection strings** tab, copy the ADO.NET connection string for a later step. It's needed for the data source connection when testing the private connection.
48
48
@@ -64,11 +64,11 @@ For more information about connection properties, see [Create an Azure SQL Manag
64
64
}
65
65
```
66
66
67
-
1. Provide a meaningful name for the shared private link. The shared private link appears alongside other private endpoints. A name like "shared-private-link-for-search" can remind you how it's used.
67
+
Provide a meaningful name for the shared private link. The shared private link appears alongside other private endpoints. A name like "shared-private-link-for-search" can remind you how it's used.
68
68
69
-
1. Paste in the DNS zone name in "dnsZonePrefix" that you retrieved in an earlier step.
69
+
Paste in the DNS zone name in "dnsZonePrefix" that you retrieved in an earlier step.
70
70
71
-
1.Edit the "privateLinkResourceId" to reflect the private endpoint of your managed instance. Provide the subscription ID, resource group name, and object name of the managed instance.
71
+
Edit the "privateLinkResourceId", substitute valid for values for the placeholders. Provide a valid subscription ID, resource group name, and managed instance name.
72
72
73
73
1. Save the file locally as *create-pe.json* (or use another name, remembering to update the Azure CLI syntax in the next step).
74
74
@@ -84,7 +84,7 @@ For more information about connection properties, see [Create an Azure SQL Manag
84
84
85
85
1. Call the `az rest` command to use the [Management REST API](/rest/api/searchmanagement) of Azure AI Search.
86
86
87
-
Because shared private link support for SQL managed instances is still in preview, you need a preview version of the REST API. Use `2021-04-01-preview` or a later preview API version for this step. We recommend using the latest preview API version.
87
+
Because shared private link support for SQL managed instances is still in preview, you need a preview version of the management REST API. Use `2021-04-01-preview` or a later preview API version for this step. We recommend using the latest preview API version.
88
88
89
89
```azurecli
90
90
az rest --method put --uri https://management.azure.com/subscriptions/{{search-service-subscription-ID}}/resourceGroups/{{search service-resource-group}}/providers/Microsoft.Search/searchServices/{{search-service-name}}/sharedPrivateLinkResources/{{shared-private-link-name}}?api-version=2024-06-01-preview --body @create-pe.json
@@ -122,11 +122,9 @@ On the Azure AI Search side, you can confirm request approval by revisiting the
122
122
123
123
You can now configure an indexer and its data source to use an outbound private connection to your managed instance.
124
124
125
-
You could use the [**Import data**](search-get-started-portal.md)wizard for this step, but the indexer that's generated won't be valid for this scenario. You'll need to modify the indexer JSON property as described in this step to make it compliant for this scenario. You'll then need to [reset and rerun the indexer](search-howto-run-reset-indexers.md) to fully test the pipeline using the updated indexer.
125
+
This article assumes a [REST client](search-get-started-rest.md) and uses the REST APIs.
126
126
127
-
This article assumes a [REST client](search-get-started-rest.md) and uses the REST APIs to make it easier to see all of the properties. Recall that REST API calls for indexers and data sources use the [Search REST APIs](/rest/api/searchservice/), not the [Management REST APIs](/rest/api/searchmanagement/) used to create the shared private link. The syntax and API versions are different between the two REST APIs.
128
-
129
-
1.[Create the data source definition](search-how-to-index-sql-database.md) as you would normally for Azure SQL. The format of the connection string is slightly different for a managed instance, but other properties are the same as if you were configuring a data source connection to Azure SQL database.
127
+
1.[Create the data source definition](search-how-to-index-sql-database.md) as you would normally for Azure SQL. By default, a managed instance listens on port 3342, but on a virtual network it listens on 1433.
130
128
131
129
Provide the connection string that you copied earlier with an Initial Catalog specified.
132
130
@@ -139,7 +137,7 @@ This article assumes a [REST client](search-get-started-rest.md) and uses the RE
139
137
"description" : "A database for testing Azure AI Search indexes.",
140
138
"type" : "azuresql",
141
139
"credentials" : {
142
-
"connectionString" : "Server=tcp:contoso.public.0000000000.database.windows.net,1433;Persist Security Info=false; User ID=<your user name>; Password=<your password>;MultipleActiveResultsSets=False; Encrypt=True;Connection Timeout=30;Initial Catalog=<your database name>"
140
+
"connectionString" : "Server=tcp:contoso.a1b22c333d44.database.windows.net,1433;Persist Security Info=false; User ID=<your user name>; Password=<your password>;MultipleActiveResultsSets=False; Encrypt=True;Connection Timeout=30;Initial Catalog=<your database name>"
143
141
},
144
142
"container" : {
145
143
"name" : "Name of table or view to index",
@@ -182,7 +180,7 @@ You can use [**Search explorer**](search-explorer.md) in Azure portal to check t
182
180
183
181
If you ran the indexer in the previous step and successfully indexed content from your managed instance, then the test was successful. However, if the indexer fails or there's no content in the index, you can modify your objects and repeat testing by choosing any client that can invoke an outbound request from an indexer.
184
182
185
-
An easy choice is [running an indexer](search-howto-run-reset-indexers.md) in Azure portal, but you can also try a [REST client](search-get-started-rest.md) and REST APIs for more precision. Assuming that your search service isn't also configured for a private connection, the REST client connection to Search can be over the public internet.
183
+
An easy choice is [running an indexer](search-howto-run-reset-indexers.md) in Azure portal, but you can also try a [REST client](search-get-started-rest.md) and REST APIs for more precision. Assuming that your search service isn't also configured for a private connection, the REST client connection to Azure AI Search can be over the public internet.
0 commit comments