更新时间:2022-04-18 10:31:03
为了在 sqlalchemy 和 mssql 中使用 Windows 身份验证,需要以下连接字符串:
In order to use Windows Authentication with sqlalchemy and mssql, the following connection string is required:
ODBC 驱动程序:
engine = sqlalchemy.create_engine('mssql://*server_name*/*database_name*?trusted_connection=yes')
SQL Express 实例:
engine = sqlalchemy.create_engine('mssql://*server_name*\\SQLEXPRESS/*database_name*?trusted_connection=yes')