[英]Login failed for user while executing Python script from SQL Server
I am trying to execute Python script using T-SQL which connect to SQL Server. 我正在尝试使用连接到SQL Server的T-SQL执行Python脚本。 I am getting login failed for user error.
我由于用户错误而登录失败。 I am using windows authentication.
我正在使用Windows身份验证。
Same script I am executing from Pycharm and it runs successfully. 我从Pycharm执行相同的脚本,它成功运行。
In addition when I use SQL Server authentication and execute from SQL server it runs successfully. 另外,当我使用SQL Server身份验证并从SQL Server执行时,它将成功运行。
What I have done so far: 到目前为止,我所做的是:
Could you please refer to SQL R Library RDOBC Script to Connect to SQL Server 您能否参考SQL R库RDOBC脚本以连接到SQL Server
Although I experience a similar issue when I use R script, the solution is related with SQL Server Configuration and SQLRUserGroup for your SQL Server instance. 尽管当我使用R脚本时遇到类似的问题,但是该解决方案与SQL Server配置和SQLRUserGroup有关。
I enabled TCP/IP protocol and added the SQLRUserGroup to the target database with login enabled. 我启用了TCP / IP协议,并在启用登录的情况下将SQLRUserGroup添加到了目标数据库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.