Re: No Windows, Only SQL Server Authentication

From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 03/20/04

  • Next message: nicole.cuypers._at_hotmail.com: "kan niet aanmelden bij msn verkeerd net paswoord"
    Date: Sat, 20 Mar 2004 08:50:07 -0600
    
    

    To establish a Windows authenticated connection from OSQL, you need to
    specify the -E parameter instead of -U and -P. This will use the account of
    the currently logged in user. For example:

        OSQL -S (local) -E

    > Only users set up with SQL Authentication seem to be able to access the
    SQL Server programatically.

    Your connection string needs to specify the type of authentication desired.
    Assuming you are using SqlClient:

        Windows authentication:

            Data Source=MyServer;Integrated Security=SSPI;Initial
    Catalog=MyDatabase

        SQL Server authentication:

            Data Source=MyServer;User ID=MyLogin;Password=MyPassword;Initial
    Catalog=MyDatabase

    Also, see the article below for additional information on establishing a
    trusted connection from ASP.NET:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;316989&Product=sql

    -- 
    Hope this helps.
    Dan Guzman
    SQL Server MVP
    "Richard Scott" <rtscott@pacbell.net> wrote in message
    news:6XL6c.12481$zh1.7776@newssvr27.news.prodigy.com...
    > Greetings,
    >
    > I am unable to log onto the MS SQL Server 2000 using my Windows Login name
    > and Password from the MS command prompt program locally on a new test
    > installation Windows Enterprise Server 2003 system.  However, if I use an
    > SQL Server Login and Password, it works every time.  The command string I
    am
    > using is:
    >
    > "osql.exe -S (local) -U login_name -P password"
    >
    > When successful (SQL Authentication), an SQL command prompt is returned.
    > When unsuccessful (Windows Authentication), the following message is
    > received:
    >
    > "Login failed for user login_name"
    >
    > The SQL Server 2000 installation is enabled for both Windows and SQL
    > authentication and has been updated to the latest service packs.
    >
    > The installation is a new test set up to experiment with Web Services
    using
    > MS SQL Server.  The original problem was the installation of the
    > "wscrRecordStore" demonstration data base from the book, Programming
    > Microsoft .NET XML WEB SERVICES, by Foggon et al.  However, the problem
    was
    > reduced to the simple command line issue above in order to troubleshoot
    it.
    > Since I am also the Windows and SQL Server system administrator, I have
    > tried a wide variety of different login strategies.  Only users set up
    with
    > SQL Authentication seem to be able to access the SQL Server
    programatically.
    >
    > What's the problem?  This seems to be a straight forward but stubborn
    > failure.
    >
    > Richard Scott
    > Critical Connections, Inc.
    >
    >
    

  • Next message: nicole.cuypers._at_hotmail.com: "kan niet aanmelden bij msn verkeerd net paswoord"

    Relevant Pages

    • Getting to the bottom of MSDE network connection problems ...
      ... but other than that it is MSDE 2000 with sp3a already applied. ... I've finally figured out the connection problems associated with this, ... and it seems the problems are due to Windows XP and not MSDE. ... the enterprise/standard versions of SQL server won't install ...
      (microsoft.public.sqlserver.msde)
    • Re: Windows Authentication in asp.net 2005 to SQL Server?
      ... If the domains do not trust each other, Windows authentication is not going ... Basic authentication sometimes makes the need for Kerberos delegation go ... generic account to do the backend data stuff on our SQL Server. ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Remote connection failed
      ... If you are going over a remote connection or are not logging ... into the domain where SQL Server is then no, Windows ... authentication won't work. ...
      (microsoft.public.sqlserver.connect)
    • Re: Changing passwords / Blocking SA login attempts
      ... I went into the Server Config properties and changed to Windows ... My login for Start and Run SQL server was in this format. ... I am supposing this was an SQL authentication, ...
      (microsoft.public.sqlserver.security)
    • Re: Bizzare SQL Network Error
      ... The bizzare thing is that, the same connection string, the same code to ... In a windows APP it works fine, in a Web APP I get ... >>I am trying to connect to a default instance of SQL Server 2000 Enterprise ...
      (microsoft.public.dotnet.framework.adonet)