Help me connect to SQL Server with ODBC

  • I'm trying to connect to a SQL Server database using a DSN created in ODBC Data Source Administrator. When I set up the DSN I get to the end of the proccess and it connects successfully. However when I try to use this DSN in an ASP page to connect to the DB I get the following error.

    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'SERVER\IUSR_SERVER'.

    If I look at the Owner property in the Enterprise Manager it says the owner is SERVER\Chris. Could this be the problem and how can I solve it?

    Any advice is appreciated.

    Thanks Chris

  • Chris,

    Have you configured the security for the IUSER account???  It looks like a permissions thing currently.  I assume you are using IIS and I think you wil need to grant permissions to that user for your app to work.

     

    I don't work with ASP that is just what it looks like from the blurb you have.

     

    Good Luck



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • This looks to me like you are using a trusted connection string and IIS is not configured correctly as AJ has stated. Can you post your connection string so that we can see what you are using?




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • I've managed to sort it thanks. It turns out I needed to add the SERVER\IUSR_SERVER account to the Administrator group in the Computer Management snap-in.

    Why would this be and what does it mean? (Just interested in learning why I've spent 5hours pulling my hair out

    Anyway thanks for the help.

    Chris

  • Are you using only  Windows authentication model ?

    IF No, then specify the username and passwords for Sql accounts in ASP code.

    If YES, then grant login to ur SERVER\IUSR_SERVER account in ur sql server (sp_grantlogin and sp_grantdbaccess)

    By adding the SERVER\IUSR_SERVER  to Administrators, u have actually made the SERVER\IUSR_SERVER  to be a part of system administrators !!!  (unless u have revoked login of builtin\admins account from ur sql server)

     

    -- Amit

     

     

     


    -- Amit



    "There is no 'patch' for stupidity."



    Download the Updated SQL Server 2005 Books Online.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply