Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: MS SQL Server: NT Authentication. Possible?

Reply
Thread Tools

RE: MS SQL Server: NT Authentication. Possible?

 
 
Tim Golden
Guest
Posts: n/a
 
      08-18-2006
[Dirk Hagemann]

| Hi!
| Is it somehow possible to access an MS SQL Server database from python
| by NT-Authentication or do I have only the possibility to use an
| SQL-Account with DB = odbc.odbc(myDB/myAccount/myPW) ?

(dsn examples from http://www.connectionstrings.com/)

+ Object Craft MSSQL module:
http://www.object-craft.com.au/projects/mssql/
can do by specifying blank username/pwd
<= Python 2.3 only

+ adodbapi: http://adodbapi.sourceforge.net
can use Trusted Connection
eg "Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated
Security=SSPI;"

+ pymssql: http://pymssql.sourceforge.net/
can only do named user

+ mx.ODBC: http://www.egenix.com/files/python/mxODBC.html
should be able to use Trusted Connection
eg "Driver={SQL
Server};Server=Aron1;Database=pubs;Trusted_Connect ion=yes;"
Commercial License may be needed

TJG

__________________________________________________ ______________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
__________________________________________________ ______________________
 
Reply With Quote
 
 
 
 
Dirk Hagemann
Guest
Posts: n/a
 
      08-18-2006
Hi Tim!

I think the adodbapi module is interesting. I just tried it out but got
this error:
'Exception occurred.', (0, 'Microsoft OLE DB Provider for ODBC
Drivers', "[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed
for user '(null)'. Reason: Not associated with a trusted SQL Server
connection.", None, 0, -2147217843), None)

Do I have to make some settings at the MS SQL Server? I just can't find
a simple example how to use adodbapi with NT authentication...

Dirk

 
Reply With Quote
 
 
 
 
Jarek Zgoda
Guest
Posts: n/a
 
      08-18-2006
Dirk Hagemann napisał(a):

> 'Exception occurred.', (0, 'Microsoft OLE DB Provider for ODBC
> Drivers', "[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed
> for user '(null)'. Reason: Not associated with a trusted SQL Server
> connection.", None, 0, -2147217843), None)


This indicates, that user credentials was not retrieved from
ActiveDirectory server.

> Do I have to make some settings at the MS SQL Server? I just can't find
> a simple example how to use adodbapi with NT authentication...


I tried few times but I gave up. Now I authenticate my users against AD
using LDAP queries. They have to provide their credentials, though, and
I know it's suboptimal.

--
Jarek Zgoda
http://jpa.berlios.de/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
Do the Self-Paced Training Kits: Microsoft SQL Server 2000 include Eval copy of SQL Server? Brian Whiting Microsoft Certification 2 12-29-2005 04:24 AM
DBI SQL column datatype not jiving with SQL statement requirement dna Perl 1 01-18-2004 04:15 PM
Re: SQL statement working in SQL Server but not in .aspx.cs page David Browne ASP .Net 0 08-21-2003 10:43 PM
Re: SQL statement working in SQL Server but not in .aspx.cs page William \(Bill\) Vaughn ASP .Net 0 08-21-2003 10:41 PM



Advertisments