简体   繁体   English

PowerApps 无法通过本地数据网关连接到本地 SQL Server

[英]PowerApps cannot connect to on-premise SQL Server through On-Premise Data Gateway

I'm trying to setup a data connection from PowerApps to an on-premise SQL Server instance we have.我正在尝试建立从 PowerApps 到我们拥有的本地 SQL Server 实例的数据连接。 However, I get the following error:但是,我收到以下错误:

Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. Microsoft SQL:建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误。 The server was not found or was not accessible.服务器未找到或无法访问。 Verify that the instance name is correct and that SQL Server is configured to allow remote connections.验证实例名称是否正确以及 SQL Server 是否配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (提供程序:命名管道提供程序,错误:40 - 无法打开与 SQL Server 的连接)

I'm following this support article from Microsoft to get it set up.我正在关注 Microsoft 的这篇支持文章以进行设置。

Everything I've done so far:到目前为止我所做的一切:

  • The SQL Server Express instance is setup on a normal Windows 10 Pro machine we have within our domain. SQL Server Express 实例设置在我们域内的普通 Windows 10 Pro 计算机上。
  • I've created a service account on the domain to access SQL Server, and added the db_owner role for it on the database we're trying to access.我在域上创建了一个服务帐户来访问 SQL Server,并在我们尝试访问的数据库上为其添加了 db_owner 角色。
  • I've configured SQL Server to allow external connections with a non-standard port (49172), and tested this using another machine within the domain to connect using the service account, which works great.我已将 SQL Server 配置为允许使用非标准端口 (49172) 进行外部连接,并使用域中的另一台机器测试此服务帐户连接,效果很好。
  • I installed the On-Premise Data Gateway from Microsoft and configured it using my work Microsoft account.我从 Microsoft 安装了本地数据网关,并使用我的工作 Microsoft 帐户对其进行了配置。 That works fine as well, and I can see the gateway in PowerApps listed as Live.这也很好用,我可以看到 PowerApps 中的网关列为 Live。 HTTPS is enabled (recommended on this question ) HTTPS 已启用(在此问题上推荐)
  • I've added explicit rules allowing all the ports and whitelisted all the IPs suggested by MS in the support article I followed (link above).我在我关注的支持文章(上面的链接)中添加了允许所有端口的显式规则,并将 MS 建议的所有 IP 列入白名单。

The weird thing is if I change the username/password to something incorrect, it gives me an "invalid credentials" error, so I know it can at least hit the domain/SQL Server to authenticate.奇怪的是,如果我将用户名/密码更改为不正确的内容,它会给我一个“无效凭据”错误,所以我知道它至少可以通过域/SQL Server 进行身份验证。 Is there a setting I'm missing somewhere in SQL Server?是否有我在 SQL Server 中某处丢失的设置?

So, I'm an idiot and had the SQL Server name wrong.所以,我是个白痴,把 SQL Server 的名字弄错了。 In the tutorial I watched the instructor just listed the computer name (which is what I was doing), but I needed to add a backslash and SQLEXPRESS as well.在教程中,我看到讲师只是列出了计算机名称(这是我正在做的),但我还需要添加反斜杠和 SQLEXPRESS。

  • Old name: DEVPC旧名称:DEVPC
  • New, correct name: DEVPC\\SQLEXPRESS新的正确名称:DEVPC\\SQLEXPRESS

Worked like a charm after that.在那之后工作就像一个魅力。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用没有数据网关的Azure Logic应用连接到本地SQL数据库吗? - Connect to on-premise SQL database with Azure Logic apps without data gateway? 如何从 Azure Powershell 运行手册连接到本地 SQL 服务器? - How to connect to an on-premise SQL Server from Azure Powershell runbook? 通过Windows Azure Connect将Azure托管的Ruby on Rails应用程序连接到本地SQL Server - Connect Azure-hosted Ruby on Rails app to on-premise SQL Server through Windows Azure Connect 本地 SQL 服务器到 Azure PostgreSQL 复制 - On-premise SQL Server to Azure PostgreSQL replication 如何将android应用程序数据保存到内部部署的sql server - How to persist android app data to on-premise sql server 在 Azure 逻辑应用 ARM 模板中,使用本地数据网关的 SQL Server 连接器的 AuthType 属性的可能值是什么? - In Azure Logic Apps ARM template, what are the possible values for the AuthType property for a SQL Server connector using On-Premise Data Gateway? 使用Azure本地网关连接到SQL Server高可用性群集时出错 - Error Connecting to SQL Server High Availability Cluster using Azure On-Premise Gateway 迁移on-prem SQL服务器数据库到Azure SQL数据库 - Migrate on-prem SQL Server database to Azure SQL database 从本地 SQL 服务器 SSRS 连接到在线 SQL Azure DB - Connect TO Online SQL Azure DB FROM On-Premise SQL Server SSRS 将Azure SQL数据库镜像到本地SQL Server - Mirroring Azure SQL Database to an on-premise SQL Server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM