pydobc连接sql server_Python pyodbc使用Sql Server身份验证连接到sqlserver

本文介绍了如何使用Python的pyodbc库,通过Sql Server身份验证方式连接到SQL Server数据库。当Trusted_Connection设置为"Yes"时,会忽略UID和PWD,利用Windows用户账户进行NTLM认证。
摘要由CSDN通过智能技术生成

Trusted_Connection

Specifies whether a user connects through a user account by using

either Kerberos [RFC4120] or another platform-specific authentication

as specified by the fIntSecurity field (for details, see [MS-TDS]

section 2.2.6.4).

The valid values are "Yes", "1", or empty string, which are

equivalent, or "No". If the value "No" is not specified, the value

"Yes" is used.

If the value is "No", the UID and PWD keys have to be used to

establish a connection with the data source.

If the DSN key and the UID key are not included in the connection

string or if the value of the UID key is an empty string, the value of

the Trusted_Connection key has to be "Yes". If the Trusted_Connection

key is not specified in the connection string, the value has to be

obtained from the con

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值