Connecting with Windows Auth?

871 views
Skip to first unread message

Adam Pletcher

unread,
Feb 25, 2009, 11:16:25 AM2/25/09
to sqlal...@googlegroups.com
Is it possible to connect to a server using Windows Authentication
using sqlalchemy?

I have a MSSQL server database where my Windows account is needed to
create tables. I didn’t turn up anything on the connection syntax for
this when I searched.
Thanks in advance.

- Adam

Alex Willmer

unread,
Feb 27, 2009, 4:46:48 AM2/27/09
to sqlalchemy
On Feb 25, 4:16 pm, Adam Pletcher <adam.pletc...@gmail.com> wrote:
> Is it possible to connect to a server using Windows Authentication
> using sqlalchemy?
>

Yes it is, the syntax is:

'mssql://hostname/database?trusted_connection=yes'

If you're connecting to a SQLEXPRESS instance, this becomes:

'mssql://hostname\\SQLEXPRESS/database?trusted_connection=yes'

I'm using pyodbc as the underlying DBAPI provider.

Alex
Reply all
Reply to author
Forward
0 new messages