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
+19-40Lines changed: 19 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Although you can call the Management REST API directly, it's easier to use the A
25
25
26
26
+[Azure CLI](/cli/azure/install-azure-cli)
27
27
28
-
+ Azure Cognitive Search, Basic tier or higher. If you're using [AI enrichment](cognitive-search-concept-intro.md) and skillsets, the tier must be Standard 2 (S2) or higher. See [Service limits](search-limits-quotas-capacity.md#shared-private-link-resource-limits) for details.
28
+
+ Azure Cognitive Search, Basic or higher. If you're using [AI enrichment](cognitive-search-concept-intro.md) and skillsets, use Standard 2 (S2) or higher. See [Service limits](search-limits-quotas-capacity.md#shared-private-link-resource-limits) for details.
29
29
30
30
+ Azure SQL Managed Instance, configured to run in a virtual network, with a private endpoint created through Azure Private Link.
31
31
@@ -127,7 +127,9 @@ On the Azure Cognitive Search side, you can confirm request approval by revisiti
127
127
128
128
You can now configure an indexer and its data source to use an outbound private connection to your managed instance.
129
129
130
-
You can use the portal for this step, or any client that you would normally use for indexer setup. This article 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/). The syntax and API versions are different.
130
+
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.
131
+
132
+
This article assumes Postman or equivalent tool, 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.
131
133
132
134
1.[Create the data source definition](search-howto-connecting-azure-sql-database-to-azure-search-using-indexers.md) as you would normally for Azure SQL. There are no properties in any of these definitions that vary when using a shared private endpoint.
133
135
@@ -141,7 +143,9 @@ You can use the portal for this step, or any client that you would normally use
141
143
"name" : "my-sql-datasource",
142
144
"description" : "A database for testing Azure Cognitive Search indexes.",
143
145
"type" : "azuresql",
144
-
"credentials" : { "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;" },
146
+
"credentials" : {
147
+
"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;"
148
+
},
145
149
"container" : {
146
150
"name" : "Name of table or view to index",
147
151
"query" : null (not supported in the Azure SQL indexer)
@@ -174,55 +178,30 @@ You can use the portal for this step, or any client that you would normally use
174
178
}
175
179
```
176
180
181
+
1. Run the indexer. If the indexer execution succeeds and the search index is populated, the shared private link is working.
182
+
177
183
After the indexer is created successfully, it should connect over the private endpoint connection. You can monitor the status of the indexer by using the [Indexer Status API](/rest/api/searchservice/get-indexer-status).
178
184
179
185
## 8 - Test the shared private link
180
186
181
-
Choose a tool that can invoke an outbound request from an indexer. An easy choice is using the [**Import data**](search-get-started-portal.md) wizard in Azure portal, but you can also try the Postman and REST APIs for more precision.
182
-
183
-
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.
187
+
If you ran the indexer in the previous step and successfully indexed content from your managed instance, then the test was successful. You can use [**Search explorer**](search-explorer.md) in Azure portal to check the contents of the index.
184
188
185
-
1. In the data source definition, set the connection string to the managed instance. The format of the connection string doesn't change for shared private link. The search service invokes the shared private link internally.
189
+
However, if the test failed or there's no content, you can modify your objects and repeat testing by choosing any client that can invoke an outbound request from an indexer. An easy choice is [running an indexer](search-howto-run-reset-indexers.md) in Azure portal, but you can also try the Postman and REST APIs for more precision.
186
190
187
-
```http
188
-
POST https://myservice.search.windows.net/datasources?api-version=2020-06-30
189
-
Content-Type: application/json
190
-
api-key: admin-key
191
-
{
192
-
"name": "my-sql-datasource",
193
-
"type": "azuresql",
194
-
"subtype": null,
195
-
"credentials": {
196
-
"connectionString": "..."
197
-
}
198
-
```
191
+
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.
199
192
200
-
1. In the indexer definition, remember to set the execution environment in the indexer definition:
193
+
Here are some reminders for testing:
201
194
202
-
```http
203
-
POST https://myservice.search.windows.net/indexers?api-version=2020-06-30
204
-
Content-Type: application/json
205
-
api-key: admin-key
206
-
{
207
-
"name": "indexer",
208
-
"dataSourceName": "my-sql-datasource",
209
-
"targetIndexName": "my-index",
210
-
"parameters": {
211
-
"configuration": {
212
-
"executionEnvironment": "private"
213
-
}
214
-
},
215
-
"fieldMappings": []
216
-
}
217
-
}
218
-
```
219
-
220
-
1. Run the indexer. If the indexer execution succeeds and the search index is populated, the shared private link is working.
195
+
+ If you use Postman or another web testing tool, make sure the API version is a [preview Management REST API version](/rest/api/searchmanagement/management-api-versions) to create the shared private link. You can use a [stable Search REST API version](/rest/api/searchservice/search-service-api-versions) to create and invoke indexers and data sources.
196
+
+ You can use the Import data wizard, but initially the generated indexer won't have the correct execution environment setting.
197
+
+ You can edit data source and indexer JSON in Azure portal to change properties, including the execution environment and the connection string.
198
+
+ You can reset and rerun the indexer in Azure portal. Reset is important for this scenario because it forces a full reprocessing of all documents.
221
199
222
200
## See also
223
201
224
202
+ [Make outbound connections through a private endpoint](search-indexer-howto-access-private.md)
225
203
+ [Indexer connections to Azure SQL Managed Instance through a public endpoint](search-howto-connecting-azure-sql-mi-to-azure-search-using-indexers.md)
226
204
+ [Index data from Azure SQL](search-howto-connecting-azure-sql-database-to-azure-search-using-indexers.md)
0 commit comments