簡體   English   中英

.NET 上 Azure 數據庫的彈性查詢

[英]Elastic Query for Azure Databases on VNET

我們在 Azure 上有幾個數據庫,它們使用彈性查詢和sp_execute_remote在它們之間來回查詢。 我們想將這些數據庫移動到 .NET 上,並為 App Services 提供一個專用端點以使用它。 這部分證明相對容易,我們的應用程序服務能夠毫無問題地與這些數據庫對話。 然而,當我們建立連接並關閉對數據庫的公共訪問時,我們的外部表似乎停止了訪問。

select * from externaltable現在會導致如下錯誤:

Msg 46823, Level 16, State 1, Line 1
Error retrieving data from xxxxxxxxxxxx.database.windows.net.yyyyyyyyyy.  The underlying error message received was: 'Reason: An instance-specific error occurred while establishing a connection to SQL Server. Connection was denied since Deny Public Network Access is set to Yes (https://learn.microsoft.com/azure/azure-sql/database/connectivity-settings#deny-public-network-access). To connect to this server, use the Private Endpoint from inside your virtual network (https://learn.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).'.

我懷疑這些請求仍在路由到公共端點,而 SQL 服務器沒有觀察到通過專用端點到其他服務器的 .NET 路由。 有沒有辦法讓它工作? 對於應用程序服務,我們設置了WEBSITE_.NET_ROUTE_ALL但我不認為 SQL 服務器有一個完全平行的地方。

如何啟用 .net 和專用端點,同時仍然能夠進行彈性查詢?

因為 Azure SQL 實際上不在您的 .NET 中 - 只有專用鏈接部分 - 當它嘗試 go 到第二個數據庫時,它不是來自有效的 IP 地址。

我相信這仍然是 Private Link 難題的缺失部分。

您是否嘗試過打開“允許訪問 Azure 服務”——這可能仍然與專用鏈接配置沖突,並且如果您的目標是僅鎖定對特定 .NET 的訪問權限,則該選項無效。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM