SQL open error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    #1

    SQL open error

    I reinstalled SQL 2000 server after reformatting my drive.
    Now I cannot open a database in my C## program as before.
    If I use "Provider=SQLOL EDB;Data Source=localhos t; Initial
    Catalog=master; Integrated Security=SSPI"; I
    get an Invalid login error. If I use "Provider=SQLOL EDB;
    Data Source=localhos t; Initial Catalog=master; User
    ID=Dave;Passwor d=midn1te"; I get the following error, "User
    no associated with a trusted SQL server connection." What
    did I do wrong on my installation? Anyone know what these
    errors mean? I sure can't find the answers in the Help.
    Dave
  • CT

    #2
    Re: SQL open error

    Have you checked that the user account used for running your application can
    still access the SQL Server database? It seems that SQL Server
    authentication is disabled and only Windows authentication is enabled, which
    makes sense from a security perspective. However, that means the second
    connection string you present, won't work.

    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF

    "Dave" <anonymous@disc ussions.microso ft.com> wrote in message
    news:083801c4b9 4a$badc8870$a50 1280a@phx.gbl.. .[color=blue]
    >I reinstalled SQL 2000 server after reformatting my drive.
    > Now I cannot open a database in my C## program as before.
    > If I use "Provider=SQLOL EDB;Data Source=localhos t; Initial
    > Catalog=master; Integrated Security=SSPI"; I
    > get an Invalid login error. If I use "Provider=SQLOL EDB;
    > Data Source=localhos t; Initial Catalog=master; User
    > ID=Dave;Passwor d=midn1te"; I get the following error, "User
    > no associated with a trusted SQL server connection." What
    > did I do wrong on my installation? Anyone know what these
    > errors mean? I sure can't find the answers in the Help.
    > Dave[/color]


    Comment

    • Guest's Avatar

      #3
      Re: SQL open error

      Carsten;
      Thanks for your reply. I can access the SQL server
      database thru the SQL Server Enterprise Manager. I don't
      understand why the first connection string doesn't work in
      my program. I tried to change the Server registration to
      include SQL Server authentication in Enterprise Manager but
      it keeps telling me that my user name is not associated
      with a trusted SQL server connection, the same message I
      get programmtically . How do I get my Windows ID to become
      associated with a trusted SQL server connection?
      Dave[color=blue]
      >-----Original Message-----
      >Have you checked that the user account used for running[/color]
      your application can[color=blue]
      >still access the SQL Server database? It seems that SQL[/color]
      Server[color=blue]
      >authenticati on is disabled and only Windows authentication[/color]
      is enabled, which[color=blue]
      >makes sense from a security perspective. However, that[/color]
      means the second[color=blue]
      >connection string you present, won't work.
      >
      >--
      >Carsten Thomsen
      >Enterprise Development with VS .NET, UML, and MSF
      >http://www.apress.com/book/bookDisplay.html?bID=105
      >"Dave" <anonymous@disc ussions.microso ft.com> wrote in message
      >news:083801c4b 94a$badc8870$a5 01280a@phx.gbl. ..[color=green]
      >>I reinstalled SQL 2000 server after reformatting my drive.
      >> Now I cannot open a database in my C## program as before.
      >> If I use "Provider=SQLOL EDB;Data Source=localhos t; Initial
      >> Catalog=master; Integrated Security=SSPI"; I
      >> get an Invalid login error. If I use "Provider=SQLOL EDB;
      >> Data Source=localhos t; Initial Catalog=master; User
      >> ID=Dave;Passwor d=midn1te"; I get the following error, "User
      >> no associated with a trusted SQL server connection." What
      >> did I do wrong on my installation? Anyone know what these
      >> errors mean? I sure can't find the answers in the Help.
      >> Dave[/color]
      >
      >
      >.
      >[/color]

      Comment

      • CT

        #4
        Re: SQL open error

        You must use the user ID and password you used when you reinstalled SQL
        Server. What user account id the MSSQLServer Windows service running under?
        If not LocalSystem, perhaps that might help you (provided you know the
        password of course ;-)).

        --
        Carsten Thomsen
        Enterprise Development with VS .NET, UML, and MSF

        <anonymous@disc ussions.microso ft.com> wrote in message
        news:098e01c4b9 f0$7d1d5360$a60 1280a@phx.gbl.. .[color=blue]
        > Carsten;
        > Thanks for your reply. I can access the SQL server
        > database thru the SQL Server Enterprise Manager. I don't
        > understand why the first connection string doesn't work in
        > my program. I tried to change the Server registration to
        > include SQL Server authentication in Enterprise Manager but
        > it keeps telling me that my user name is not associated
        > with a trusted SQL server connection, the same message I
        > get programmtically . How do I get my Windows ID to become
        > associated with a trusted SQL server connection?
        > Dave[color=green]
        >>-----Original Message-----
        >>Have you checked that the user account used for running[/color]
        > your application can[color=green]
        >>still access the SQL Server database? It seems that SQL[/color]
        > Server[color=green]
        >>authenticatio n is disabled and only Windows authentication[/color]
        > is enabled, which[color=green]
        >>makes sense from a security perspective. However, that[/color]
        > means the second[color=green]
        >>connection string you present, won't work.
        >>
        >>--
        >>Carsten Thomsen
        >>Enterprise Development with VS .NET, UML, and MSF
        >>http://www.apress.com/book/bookDisplay.html?bID=105
        >>"Dave" <anonymous@disc ussions.microso ft.com> wrote in message
        >>news:083801c4 b94a$badc8870$a 501280a@phx.gbl ...[color=darkred]
        >>>I reinstalled SQL 2000 server after reformatting my drive.
        >>> Now I cannot open a database in my C## program as before.
        >>> If I use "Provider=SQLOL EDB;Data Source=localhos t; Initial
        >>> Catalog=master; Integrated Security=SSPI"; I
        >>> get an Invalid login error. If I use "Provider=SQLOL EDB;
        >>> Data Source=localhos t; Initial Catalog=master; User
        >>> ID=Dave;Passwor d=midn1te"; I get the following error, "User
        >>> no associated with a trusted SQL server connection." What
        >>> did I do wrong on my installation? Anyone know what these
        >>> errors mean? I sure can't find the answers in the Help.
        >>> Dave[/color]
        >>
        >>
        >>.
        >>[/color][/color]


        Comment

        • Guest's Avatar

          #5
          Re: SQL open error

          I wish to use Windows authentication rather than supplying
          a password like I used to using Integrated Security=SSPI in
          my connection string. What do I need to do to get it to
          accept that string? I am the systemes administrator on my
          box and have no need for passwords. The name of my server
          in Enterprise Manager reads as (LOCAL) (Windows NT).
          However, it refers to the server as XP when I do the
          install which is the name of my computer. Is that
          appropriate? If I use Integrated Security=SSPI and Data
          Source=localhos t in my connection string I get the error
          "SQL server does not exist or access denied". If I use
          Data Source=XP I get the error "Login failed for user
          'XP\\ASPNET'. What options need I take when re-installing
          the SQL server in order to use Integrated Security=SSPI in
          my connection string?
          Dave[color=blue]
          >-----Original Message-----
          >You must use the user ID and password you used when you[/color]
          reinstalled SQL[color=blue]
          >Server. What user account id the MSSQLServer Windows[/color]
          service running under?[color=blue]
          >If not LocalSystem, perhaps that might help you (provided[/color]
          you know the[color=blue]
          >password of course ;-)).
          >
          >--
          >Carsten Thomsen
          >Enterprise Development with VS .NET, UML, and MSF
          >http://www.apress.com/book/bookDisplay.html?bID=105
          ><anonymous@dis cussions.micros oft.com> wrote in message
          >news:098e01c4b 9f0$7d1d5360$a6 01280a@phx.gbl. ..[color=green]
          >> Carsten;
          >> Thanks for your reply. I can access the SQL server
          >> database thru the SQL Server Enterprise Manager. I don't
          >> understand why the first connection string doesn't work in
          >> my program. I tried to change the Server registration to
          >> include SQL Server authentication in Enterprise Manager but
          >> it keeps telling me that my user name is not associated
          >> with a trusted SQL server connection, the same message I
          >> get programmtically . How do I get my Windows ID to become
          >> associated with a trusted SQL server connection?
          >> Dave[color=darkred]
          >>>-----Original Message-----
          >>>Have you checked that the user account used for running[/color]
          >> your application can[color=darkred]
          >>>still access the SQL Server database? It seems that SQL[/color]
          >> Server[color=darkred]
          >>>authenticati on is disabled and only Windows authentication[/color]
          >> is enabled, which[color=darkred]
          >>>makes sense from a security perspective. However, that[/color]
          >> means the second[color=darkred]
          >>>connection string you present, won't work.
          >>>
          >>>--
          >>>Carsten Thomsen
          >>>Enterprise Development with VS .NET, UML, and MSF
          >>>http://www.apress.com/book/bookDisplay.html?bID=105
          >>>"Dave" <anonymous@disc ussions.microso ft.com> wrote in[/color][/color][/color]
          message[color=blue][color=green][color=darkred]
          >>>news:083801c 4b94a$badc8870$ a501280a@phx.gb l...
          >>>>I reinstalled SQL 2000 server after reformatting my drive.
          >>>> Now I cannot open a database in my C## program as before.
          >>>> If I use "Provider=SQLOL EDB;Data Source=localhos t; Initial
          >>>> Catalog=master; Integrated Security=SSPI"; I
          >>>> get an Invalid login error. If I use "Provider=SQLOL EDB;
          >>>> Data Source=localhos t; Initial Catalog=master; User
          >>>> ID=Dave;Passwor d=midn1te"; I get the following error,[/color][/color][/color]
          "User[color=blue][color=green][color=darkred]
          >>>> no associated with a trusted SQL server connection." What
          >>>> did I do wrong on my installation? Anyone know what these
          >>>> errors mean? I sure can't find the answers in the Help.
          >>>> Dave
          >>>
          >>>
          >>>.
          >>>[/color][/color]
          >
          >
          >.
          >[/color]

          Comment

          • CT

            #6
            Re: SQL open error

            Ah, and ASP.NET application. You then need to implement impersonation or
            allow the XP\ASPNET user account to access your database. The XP\ASPNET is
            used by the ASP.NET worker process, which in turn means for running your
            ASP.NET application.

            --
            Carsten Thomsen
            Enterprise Development with VS .NET, UML, and MSF

            <anonymous@disc ussions.microso ft.com> wrote in message
            news:09bc01c4ba 15$47b2db80$a60 1280a@phx.gbl.. .[color=blue]
            >I wish to use Windows authentication rather than supplying
            > a password like I used to using Integrated Security=SSPI in
            > my connection string. What do I need to do to get it to
            > accept that string? I am the systemes administrator on my
            > box and have no need for passwords. The name of my server
            > in Enterprise Manager reads as (LOCAL) (Windows NT).
            > However, it refers to the server as XP when I do the
            > install which is the name of my computer. Is that
            > appropriate? If I use Integrated Security=SSPI and Data
            > Source=localhos t in my connection string I get the error
            > "SQL server does not exist or access denied". If I use
            > Data Source=XP I get the error "Login failed for user
            > 'XP\\ASPNET'. What options need I take when re-installing
            > the SQL server in order to use Integrated Security=SSPI in
            > my connection string?
            > Dave[color=green]
            >>-----Original Message-----
            >>You must use the user ID and password you used when you[/color]
            > reinstalled SQL[color=green]
            >>Server. What user account id the MSSQLServer Windows[/color]
            > service running under?[color=green]
            >>If not LocalSystem, perhaps that might help you (provided[/color]
            > you know the[color=green]
            >>password of course ;-)).
            >>
            >>--
            >>Carsten Thomsen
            >>Enterprise Development with VS .NET, UML, and MSF
            >>http://www.apress.com/book/bookDisplay.html?bID=105
            >><anonymous@di scussions.micro soft.com> wrote in message
            >>news:098e01c4 b9f0$7d1d5360$a 601280a@phx.gbl ...[color=darkred]
            >>> Carsten;
            >>> Thanks for your reply. I can access the SQL server
            >>> database thru the SQL Server Enterprise Manager. I don't
            >>> understand why the first connection string doesn't work in
            >>> my program. I tried to change the Server registration to
            >>> include SQL Server authentication in Enterprise Manager but
            >>> it keeps telling me that my user name is not associated
            >>> with a trusted SQL server connection, the same message I
            >>> get programmtically . How do I get my Windows ID to become
            >>> associated with a trusted SQL server connection?
            >>> Dave
            >>>>-----Original Message-----
            >>>>Have you checked that the user account used for running
            >>> your application can
            >>>>still access the SQL Server database? It seems that SQL
            >>> Server
            >>>>authenticat ion is disabled and only Windows authentication
            >>> is enabled, which
            >>>>makes sense from a security perspective. However, that
            >>> means the second
            >>>>connectio n string you present, won't work.
            >>>>
            >>>>--
            >>>>Carsten Thomsen
            >>>>Enterpris e Development with VS .NET, UML, and MSF
            >>>>http://www.apress.com/book/bookDisplay.html?bID=105
            >>>>"Dave" <anonymous@disc ussions.microso ft.com> wrote in[/color][/color]
            > message[color=green][color=darkred]
            >>>>news:083801 c4b94a$badc8870 $a501280a@phx.g bl...
            >>>>>I reinstalled SQL 2000 server after reformatting my drive.
            >>>>> Now I cannot open a database in my C## program as before.
            >>>>> If I use "Provider=SQLOL EDB;Data Source=localhos t; Initial
            >>>>> Catalog=master; Integrated Security=SSPI"; I
            >>>>> get an Invalid login error. If I use "Provider=SQLOL EDB;
            >>>>> Data Source=localhos t; Initial Catalog=master; User
            >>>>> ID=Dave;Passwor d=midn1te"; I get the following error,[/color][/color]
            > "User[color=green][color=darkred]
            >>>>> no associated with a trusted SQL server connection." What
            >>>>> did I do wrong on my installation? Anyone know what these
            >>>>> errors mean? I sure can't find the answers in the Help.
            >>>>> Dave
            >>>>
            >>>>
            >>>>.
            >>>>[/color]
            >>
            >>
            >>.
            >>[/color][/color]


            Comment

            Working...