RE: MS SQL Server: NT Authentication. Possible?

Discussion in 'Python' started by Tim Golden, Aug 18, 2006.

  1. Tim Golden

    Tim Golden Guest

    [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_Connection=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
    ________________________________________________________________________
     
    Tim Golden, Aug 18, 2006
    #1
    1. Advertisements

  2. 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
     
    Dirk Hagemann, Aug 18, 2006
    #2
    1. Advertisements

  3. Tim Golden

    Jarek Zgoda Guest

    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/
     
    Jarek Zgoda, Aug 18, 2006
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UmV6YQ==?=
    Replies:
    3
    Views:
    18,405
    Carlos Barini
    Jun 7, 2004
  2. Daves
    Replies:
    1
    Views:
    565
  3. Geoff
    Replies:
    3
    Views:
    573
    Patrick.O.Ige
    Jan 16, 2006
  4. Andy
    Replies:
    1
    Views:
    601
  5. farseer

    SQL Server 2005 + SQL Server Express

    farseer, Aug 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    511
    farseer
    Aug 8, 2006
  6. Dirk Hagemann
    Replies:
    0
    Views:
    314
    Dirk Hagemann
    Aug 18, 2006
  7. Tim Golden
    Replies:
    8
    Views:
    3,698
    Dirk Hagemann
    Aug 23, 2006
  8. Grey Alien

    SQL Server 2000 vs SQL Server Express

    Grey Alien, Jul 8, 2007, in forum: ASP .Net
    Replies:
    6
    Views:
    675
    Grey Alien
    Jul 9, 2007
Loading...