Hi All,

Hoping someone might have a suggestion - I'm trying to use SQLAlchemy to 
connect to an MS SQLSERVER database, and I keep getting rejected.  

Here's what I'm using to connect: 

mssql+pyodbc://*myusername*:mypassword@servername:serverport/dbname   OR

mssql+pyodbc://mydomainname\*myusername*
:mypassword@servername:serverport/dbname 



Without the domain name in the username field I get: 

sqlalchemy.exc.DBAPIError: (Error) ('28000', "[28000] [Microsoft][ODBC SQL 
Serve
r Driver][SQL Server]Login failed for user '*myusername*'. (18456) 
(SQLDriverConnect); [
28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 
'ben
n'. (18456)") None None


On the database server, if I look in the Event Viewer, I find a message 
that says: 

MSSQLSERVER / Event ID: 18456 "Login failed for user '*myusername*'. 
Reason: Could not find a login matching the name provided. "



With the domain name, I get:

sqlalchemy.exc.DBAPIError: (Error) ('28000', "[28000] [Microsoft][ODBC SQL 
Serve
r Driver][SQL Server]Login failed for user '*mydomainname*\\*myusername*'. 
(18456) (SQLDrive
rConnect); [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login 
failed f
or user 'pathfinder\\BenN'. (18456)") None None


 

On the database server, if I look in the Event Viewer, I find a message 
that says:

MSSQLSERVER / Event ID: 18456 "Login failed for user 'pathfinder\
*myusername*'. Reason: Attempting to use an NT account name with SQL Server 
Authentication.  BUT, I confirmed the database server has authentication 
set to "SQL Server and Windows Authentication mode"


Some other details.

I've confirmed the SQL Server (SQL Server 2008 R2) is set to be available 
by IP and that there is a firewall exception for the port (per 
http://stackoverflow.com/questions/12097570/sql-server-express-2008-configure-for-remote-access-via-url).
I'm running Python 2.7, and pyodbc-3.0.7.win-amd64-py2.7.exe 
<https://code.google.com/p/pyodbc/downloads/detail?name=pyodbc-3.0.7.win-amd64-py2.7.exe&can=2&q=>
.


Any suggestions?  


:)Ben

 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to