ODBC Connection

  • Hi Guys

    I have a problem with a user getting a connected via ODBC.

    It is giving the following error when he logs in to ODBC:

    Login failed for user '(null)' Reason, Not associated with trusted SQl Server Connection.

    Firstly, I gave him Window access, this still did'nt solve the problem. 

    Secondly, someone added him to the NT administrator group so that he could get Windows NT ODBC access to the databases.

    It then worked. What else could have been done to solve this problem? This is supposed to be a temporary solution.

    Regards

    IC

  • This is an authentication issue; the "null" indicates that the userid passed through the ODBC connection cannot be validated and a null is being passed to sql server instead the userid. Because it worked when adding this userid to the admin group, it means that the ODBC connection was correctly defined. You need to go in sql server em, expand security and add your WIN userid as a new sql login; then add this newly created login as user for the database you want this user to access, assigning at least read permissions as a beginning.

    If you already have a win group as user in the db above, then ask the win admin guys to add this userid to that group.

    Good luck

     

  • All that you mentioned above was done before....I am looking for a different solution to this problem.

  • I really don't want to prevent you to look for a different solution, but this error is hardly happening because of other reason. Is your sql port changed (not 1433 I mean)? If so, you have to add the port number after the sql server name into the odbc connection definition.

     

  • Trying to be respectful, but No, it was not done.  Or at least it was not done correctly.

    Your error message indicates the Windows user account does not have permission to access the server or the database.  The Windows user account needs to be added to the database user, or in a Windows domain group that is defined to have access.  Then that userid or Windows group needs to granted rights to access the particular database.

    By default, in SQL Server 2000, local administrators group is in the sysadmin database role.  That role has permissions to the entire SQL Server instance, and all databases and statements.  By adding that user to the administrators group, you did give him the access and rights to the database you were trying to connect to with ODBC.

    Hope this helps



    Mark

  • Mark...I did add the user to the database and gave him db_owner rights to the databases he wanted to access. But it still gave the error.

  • When you say you gave him Windows access, does that mean you granted his Windows user account access as a login to SQL Server? Or did you mean you added it at the operating system level?

    K. Brian Kelley
    @kbriankelley

  • To add some light to what Brain has told if you have added the user to the windows it doesn't mean that you have given him access to sql server unless you have added the user to the administrators group and administrators have access to sql server. You need to add the user explicitly to the sql server to have him access to the server.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

Viewing 8 posts - 1 through 7 (of 7 total)

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