简体   繁体   English

使用混合连接从应用服务到本地SQL Server的Sqlcmd

[英]Sqlcmd from app service to local SQL Server using hybrid connection

I have setup an Azure app service with a hybrid connection to my local on premise SQL Server 2014. 我已经设置了一个Azure应用服务,该服务与我的本地SQL Server 2014的混合连接。

The connection is just fine I can ping it from app service using tcpping. 连接很好我可以使用tcpping从app服务ping它。

However I cannot make the connection to the database. 但是我无法建立与数据库的连接。 The sqlcmd command fails complaining about the user / pass - but they are correct. sqlcmd命令无法抱怨用户/传递 - 但它们是正确的。

I am using this command 我正在使用此命令

sqlcmd -S <servername> -d Sample_Dev -U xxx -P xxxx -I

I am getting this error: 我收到此错误:

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login failed for user 'xxx' Sqlcmd:错误:Microsoft SQL Server Native Client 11.0:用户'xxx'登录失败

I have searched online for that error and I am unable to make it work. 我已在网上搜索该错误,但我无法使其正常工作。 Can you please help me on that ? 你能帮帮我吗? I really appreciate your help. 我非常感谢你的帮助。

Thanks 谢谢

我能够通过直接在mssql上创建数据库用户而不使用AD来使其工作。

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

相关问题 Azure 具有混合连接的应用程序服务无法访问本地 SQL 服务器 - Azure app service with hybrid connection can't access on prem SQL Server Windows 6应用程序从本地移动到服务器后,sql连接不起作用 - sql connection not working after Windows 6 app moved from local to server 如何使用sqlcmd从SQL服务器导出数据为CSV格式? - How to export data as CSV format from SQL Server using sqlcmd? 从作为服务启动的应用程序中使用Windows身份验证连接到SQL Server - Connection to SQL Server using Windows Authentication from an application started as service 使用 sqlcmd 的 Sql 服务器身份验证失败 - Sql server authentication fails using sqlcmd 如何使用sqlcmd访问远程sql服务器? - How to access remote sql server using sqlcmd? 使用SQLCMD部署SQL Server架构更改 - Deploy SQL Server Schema Changes using SQLCMD 使用 sqlcmd 创建表 || Azure SQL 服务器 - Create table using sqlcmd || Azure SQL Server 从SQLCMD重命名SQL Server数据库 - Renaming SQL Server database from SQLCMD 使用sqlcmd将数据从SQL Server 2008移动到远程SQL Server 2000 - Moving data from SQL Server 2008 to remote SQL Server 2000, using sqlcmd
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM