From: Brad A. <bra...@gm...> - 2007-01-27 14:59:14
|
On Jun 21, 2006, at 7:11 PM, Keith Jackson wrote: > Hi, > First off, thanks for developing this code. It has made the fact that > I've been forced to use M$ products much less painful. :) > > Our SQL Server 2005 instance is setup to not support SQL > authentication, only OS authentication. On OSX I have no problem > making this work by using a username like: HOSTNAME\username in my > connect call. Everything then works fine. > > On windows however, I consistently get login failures. After looking > at the network traffic with ethereal it appears that pymssql is > trying to do SQL auth instead of OS auth. > > How can I force pymssql on windows to us OS auth? Any suggestions > would be greatly appreciated. > thx, > --keith This was posted over six months ago. I am also curious about the answer, though I would normally want to use SQL Auth. Did anyone answer it off-list? |
From: Rick M. <ric...@gm...> - 2007-01-27 17:36:51
|
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. Rick On 1/27/07, Brad Allen <bra...@gm...> wrote: > On Jun 21, 2006, at 7:11 PM, Keith Jackson wrote: > > > Hi, > > First off, thanks for developing this code. It has made the fact that > > I've been forced to use M$ products much less painful. :) > > > > Our SQL Server 2005 instance is setup to not support SQL > > authentication, only OS authentication. On OSX I have no problem > > making this work by using a username like: HOSTNAME\username in my > > connect call. Everything then works fine. > > > > On windows however, I consistently get login failures. After looking > > at the network traffic with ethereal it appears that pymssql is > > trying to do SQL auth instead of OS auth. > > > > How can I force pymssql on windows to us OS auth? Any suggestions > > would be greatly appreciated. > > thx, > > --keith > > This was posted over six months ago. I am also curious about the > answer, though I would normally want to use SQL Auth. Did anyone > answer it off-list? > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pymssql-users mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pymssql-users > |
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. |