From: Brad A. <bra...@gm...> - 2007-01-29 00:02:19
|
On 1/27/07, Rick Morrison <ric...@gm...> wrote: > Hi Brad, > > As far as I know pymssql will theoretically work using Windows > authentication (never tried it tho...). Pymssql is based on DB-lib, > which will support it (barely), and that in turn talks over FreeTDS, > which supports it. > > - I think that you'll need to use a DSN vs. uid/pwd > - I have read somewhere that SQL server needs to be istening on named > pipes for connections, and that named pipes must be the first > connection listed. > > If you get it to work, post back to the list with your config. I'm not sure I'm going to be much help with that. I'm still stuck on getting pymssql to connect period. I'm running the SQL Server Express Edition, and have configured the surface area to allow both TCP/IP and named pipes on both local and remote connections. I'm trying to connect using a Python script on the same machine using the following: con = pymssql.connect(host='10.0.1.3',user='sa',password='mypwd',database='test_db') Below is my traceback. My local firewall is not enabled, I'm using ActiveState Python 2.4.3, and the IP address above is assigned on my wireless port (no ethernet). I tried using localhost instead of the IP address, but that didn't work either. Do I need to specify a port? Any suggestions? Traceback (most recent call last): File "pymssqTest.py", line 3, in ? con = pymssql.connect(host='10.0.1.3',user='sa',password='mypwd',database= 'test_db') File "C:\Python24\Lib\site-packages\pymssql.py", line 328, in connect con = _mssql.connect(dbhost, dbuser, dbpasswd) _mssql.error: DB-Lib error message 10004, severity 9: Unable to connect: SQL Server is unavailable or does not exist. Unable to conne ct: SQL Server does not exist or network access denied. Net-Lib error during ConnectionOpen (Connect()). Error 2 - The system cannot find the file specified. |