Azure Functions 连接到本地 SQL Server

标签 azure azure-functions

我正在尝试将新的 Azure Functions 连接到本地 SQL Server 数据库。 Microsoft 文档提到这是可能的,但我无法弄清楚,也没有看到任何有关使用 Azure Functions 专门设置本地数据库的教程。

我想做类似的事情tutorial .

public static async void Run(TimerInfo myTimer, TraceWriter log)
{
    var str = ConfigurationManager.ConnectionStrings["on-prem-connection"].ConnectionString;

    //open connections and call db here - I know this
}

我可以按照与上面视频类似的方式来设置连接字符串,然后在 Azure Function 中引用该连接字符串吗?如果是的话,那是怎么做到的。

谢谢你。

最佳答案

您需要使用混合连接之类的东西。查看以下链接。我希望它有帮助: https://azure.microsoft.com/en-us/documentation/articles/web-sites-hybrid-connection-connect-on-premises-sql-server/

关于Azure Functions 连接到本地 SQL Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37398205/

相关文章:

azure - LastPasswordChanged AD B2C Rest API

git - 在 cPanel 上克隆 Azure 存储库

azure - 微软图: How to filter users by domain name

azure - 资源所有者密码凭据 token 在 Azure Function App 上导致 401

azure - Azure Functions 中的自定义 DLL 是否可以依赖于 project.json 中的 Nuget 包?

Azure函数: Multiple functions with different authentication

Azure 函数需要很长时间才能触发

azure - 节点红色 - 无法连接 : getaddrinfo ENOTFOUND xxx-device-hub. azure-devices.net”

azure - 在哪里存储 Azure Functions 应用程序的复杂配置?

azure - 如何计划从 Azure 部署在 Azure 应用服务 Web 应用上的 Http Post 服务