Results 1 to 10 of 10

Thread: Logim mode

  1. #1
    Join Date
    May 2004
    Posts
    5

    Unanswered: Logim mode

    Hi,
    I connect to SQL-server from my application with 'sa' account.
    It works when SQL-server is configured 'Windows Authentication'
    and doesn't work for ' Mixed Mode Authentication'.
    How it can be?

  2. #2
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    Mixed authentication means that you can connect with windows user accounts and with sql server logins, Windows authentication only allows windows user accounts. The user 'sa' is a sql server builtin login, which means that you can't connect to a sql server configured with windows authentication.
    Futhermore, the 'sa' user is standard configured as the administration account for maintaining the databases. Using this account from within an application is not a good choice (to say the least). If you want to use a sql server login for your application, it's best you create a new login and only grant the privileges needed for your application.
    Johan

  3. #3
    Join Date
    May 2004
    Posts
    5

    Login problem

    Thanks Jora,
    I created another sql server login.
    The question is :
    Why does this sql server login work from my application with
    "Windows Authentication' SQL-server configuration and doesn't
    work with Mixed Mode Authentication?
    It have to be vice versa, no?

  4. #4
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    Yes it should be vice versa. How did you create your sql server login? And how do you connect in your application to the database?
    Johan

  5. #5
    Join Date
    May 2004
    Posts
    5
    Enterprise manager ->Security->Logins-> new login (with checkbox -SQL server authentication)
    I connect to Sql server from Delphi application (BDE or ADO - both work
    properly.
    We also checked in registry for 'Logintype' value - it's OK.

  6. #6
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    And within delphi? With a connection string or a udl file? How is this configured? We use Delphi and ADO with an udl file. In this udl file you specify the user that is connecting. The user specified has to be the sql server user and not set it to Windows authentication.
    Johan

  7. #7
    Join Date
    May 2004
    Posts
    5
    I have two Delphi applications.
    One is in Delphi7 (ADO connection) and you are true.
    I used the connection string with 'NT integrated security' . Thank you.
    But !
    My another old Delphi4 application uses BDE alias for connection with
    SQL server user name and password and it works !

  8. #8
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    How have you created your bde connection? With an odbc dsn or directly in bde?
    Johan

  9. #9
    Join Date
    May 2004
    Posts
    5
    Directly in BDE, SQL native driver. See an attached file.
    Attached Thumbnails Attached Thumbnails bde.bmp  

  10. #10
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    We only use mixed mode databases. When I create an alias of type 'mssql' i cannot login with a windows account but I can login with sql server login. When I use the type 'sql server' (through odbc) i can login with both windows as sql server login. That's all i can make of it. Hope it helps.
    Johan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •