Re: login failed for sql server

From: John M Deal (johndeal_at_necessitysoftware.com)
Date: 11/24/04


Date: Wed, 24 Nov 2004 07:21:25 -0800

I can't swear to it but I think using SSPI and a User Id are mutually
exclusive (someone please correct me if I'm wrong). I'd start by trying
to eliminating each in turn and seeing if one or the other succeeds.
Oh, and be sure the username and password are for a Sql user that has
permissions not a Windows user.

Also you didn't mention what kind of client this is running under. If
you are running under a web service, IIS, or an NT service you will see
interesting results when trying to use SSPI. The reason is that each of
the mentioned application types are not running as you but instead as
whatever identity their underlying service is running as. You may
already know that but I figured it was worth mentioning.

I also seem to remember having this issue if my Sql Server instance was
not setup to support Mixed security. You may want to check and see if it
does (seeing as how mixed is required if you want to go back and forth
between SSPI and specifying a logon and password).

Hope something in there helps.

Have A Better One!

John M Deal, MCP
Necessity Software

rbutch@coair.com wrote:
> guys, i cant figure this out. ive even hardcoded the user name in the connection string.
> im an admin on the box, im the full fledged dbo on the instance on the server.
> is anyone familiar with this.
> it refers to null, but its definately in there.
>
> here's the connection string:
>
> workstation id=HQJ1759DX;packet size=4096;user id=coE7599;integrated security=SSPI;data source=HQJ1750C;persist security info=False;initial catalog=MY_DB
>
>
> here's the error
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
>
> **********************************************************************
> Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...



Relevant Pages

  • Re: Unable to Generate SSPI Context w/ .Net 2.0 App and Windows 2000 Professional Client
    ... The best solution, is to not use SSPI, but a work-around is to log into the local machine and let the local system authenticate the user. ... Hitchhiker's Guide to Visual Studio and SQL Server ... I have many Delphi applications running on the ... not .Net apps, just standard Win32 applications. ...
    (microsoft.public.sqlserver.connect)
  • Re: Unable to Generate SSPI Context w/ .Net 2.0 App and Windows 2000 Professional Client
    ... local machine and let the local system authenticate the ... Hitchhiker's Guide to Visual Studio and SQL Server ... Sql server 2000 (running on a Windows 2000 Server). ... change it to use NT Security, it fails with Unable to Generate SSPI ...
    (microsoft.public.sqlserver.connect)
  • Re: Unable to connect if member of many groups
    ... I have a setup where Acitive Domain users are member of many groups. ... the user cannot connect to the SQL Server ... of more than 269 groups I get the "Cannot generate SSPI context" error. ...
    (microsoft.public.sqlserver.connect)
  • Re: Connect pocket pc (2003) to sql sever in trusted/integrated/ss
    ... when SSPI is specified and "invalid login" when not SSPI is not specified ... Here's connection string sample, note "Integrated Security=SSPI". ... I mean that all windows user have an access to SQL server trought their ... windows integrated security. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Connect to Desktop SQL Server 2000 from Pocket PC
    ... SSPI is in fact supported, but you have to provide user ID and password ... This might be useful if SQL authentication is disabled on a server. ... > Xref: cpmsftngxa10.phx.gbl ... >> I need to connect from a program in the Pocket PC to SQL Server in my ...
    (microsoft.public.dotnet.framework.compactframework)

Loading