python pymsql 下载_PymSQL windows身份验证

用于支持windows身份验证的pymssql模块。现在看来不是了。尽管在某些地方它仍然显示出它应该起作用。我一直找不到这个问题的确切答案,也找不到解决办法。最相关的链接:pymssql 1.0 supported it because it made use of and depended on the

MS-provided DLL which was part of the SQL Server client stack. This

stack was in charge of handling all of the NTLM negotiation and such.

This meant, among other things that it was a Windows-only solution.

我可以模拟多种网络环境,所以我尝试了许多不同的设置。我正在尝试使用此脚本使用windows身份验证连接到远程MSSQL服务器。这就是问题所在。

根据我的研究,包括上面的链接,有两种方法可以在pymssql模块中使用windows身份验证,即假定工作。

第一种方法:使用当前用户凭据:pymssql.connect(server='server')

# credentials come from active windows session

# some research shows that a "trusted=True" keyword should be provided.

第二种方法:使用给定的用户凭据:pymssql.connect(server='server', user=r'domain\user', password='pass')

# credentials are given in code and somehow converted to a

# windows authentication in the background

# some research shows that a "trusted=True" keyword should be provided.

使用_mssql模块也是如此。

注意:Python版本:2.7.8

我正在使用的PymSql版本:2.1.1

用于支持windows身份验证的PymSQL版本:1.x

我用(所有64位)进行了测试:

windows 7专业版

windows 7家庭高级版

windows服务器2012

windows服务器2012R2

本专题的其他问题:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值