Age-old "SQL Server does not exist" error

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

    Age-old "SQL Server does not exist" error

    Judging from the sheer number of posts on this topic, I'm sensing this
    is a fairly common problem. Only problem is, I've tried just about
    every recommendation in all the posts I've found thus far and none have
    worked.

    I have XP on my workstation and two servers that run server 2003.
    I have sql server dev edition on all 3, but only VS.NET on my
    workstation.
    I have .NET framework 1.1 on all 3 machines.

    I can connect/interact just fine with the SQL Server instances on both
    servers using EM, Query Analyzer, and VS.NET "server explorer."
    However, pages I make on my workstation that connect to SQL Server on
    either of the two servers fail to work. If I take the EXACT same pages
    and run them on either server, they work fine.

    The error I get is "Exception Details:
    System.Data.Sql Client.SqlExcep tion: SQL Server does not exist or access
    denied." I strongly suspect that this is a security issue, but I don't
    know how to resolve it. I've given (as per other posts) the usernames
    ASPNET and NETWORK SECURITY broad rights on all sql server instances,
    yet still I can't run a webpage on my workstation that connects. It's
    infuriating. Help!


    Behold my latest connection string (since I know some of you will want
    to see it anyways... ;-)
    Dim MyConnection As New
    SqlConnection(" server=testserv er;uid=test;pwd =pass;database= adp")

    I've tried using IP's in place of the server name and all. I truly
    think this is some obscure security issue...

  • Lucas Tam

    #2
    Re: Age-old "SQL Server does not exist" error

    "Roy" <roy.anderson@g mail.com> wrote in news:1114442786 .921549.57350
    @f14g2000cwb.go oglegroups.com:
    [color=blue]
    > SqlConnection(" server=testserv er;uid=test;pwd =pass;database= adp")
    >
    > I've tried using IP's in place of the server name and all. I truly
    > think this is some obscure security issue...[/color]

    Try appending the SQL server port number to the address (1433)

    so:

    SqlConnection(" server=testserv er,1433;uid=tes t;pwd=pass;data base=adp")

    For some reason I had to do that at work... or else I couldn't connect...


    --
    Lucas Tam (REMOVEnntp@rog ers.com)
    Please delete "REMOVE" from the e-mail address when replying.

    Comment

    • TDAVISJR

      #3
      Re: Age-old &quot;SQL Server does not exist&quot; error

      Try connecting via Hostname or IP address.

      --
      TDAVISJR
      aka - Tampa.NET Koder


      "Roy" <roy.anderson@g mail.com> wrote in message
      news:1114442786 .921549.57350@f 14g2000cwb.goog legroups.com...[color=blue]
      > Judging from the sheer number of posts on this topic, I'm sensing this
      > is a fairly common problem. Only problem is, I've tried just about
      > every recommendation in all the posts I've found thus far and none have
      > worked.
      >
      > I have XP on my workstation and two servers that run server 2003.
      > I have sql server dev edition on all 3, but only VS.NET on my
      > workstation.
      > I have .NET framework 1.1 on all 3 machines.
      >
      > I can connect/interact just fine with the SQL Server instances on both
      > servers using EM, Query Analyzer, and VS.NET "server explorer."
      > However, pages I make on my workstation that connect to SQL Server on
      > either of the two servers fail to work. If I take the EXACT same pages
      > and run them on either server, they work fine.
      >
      > The error I get is "Exception Details:
      > System.Data.Sql Client.SqlExcep tion: SQL Server does not exist or access
      > denied." I strongly suspect that this is a security issue, but I don't
      > know how to resolve it. I've given (as per other posts) the usernames
      > ASPNET and NETWORK SECURITY broad rights on all sql server instances,
      > yet still I can't run a webpage on my workstation that connects. It's
      > infuriating. Help!
      >
      >
      > Behold my latest connection string (since I know some of you will want
      > to see it anyways... ;-)
      > Dim MyConnection As New
      > SqlConnection(" server=testserv er;uid=test;pwd =pass;database= adp")
      >
      > I've tried using IP's in place of the server name and all. I truly
      > think this is some obscure security issue...
      >[/color]


      Comment

      • Lucas Tam

        #4
        Re: Age-old &quot;SQL Server does not exist&quot; error

        "TDAVISJR" <anonymous@micr osoft.com> wrote in news:OzCzeRbSFH A.996
        @TK2MSFTNGP09.p hx.gbl:
        [color=blue]
        >
        > Try connecting via Hostname or IP address.[/color]

        Did you even read his post?
        [color=blue]
        > I've tried using IP's in place of the server name and all. I truly
        > think this is some obscure security issue...[/color]



        --
        Lucas Tam (REMOVEnntp@rog ers.com)
        Please delete "REMOVE" from the e-mail address when replying.

        Comment

        • Roy

          #5
          Re: Age-old &quot;SQL Server does not exist&quot; error

          heh
          Took the words outta my mouth Lucas...

          I tried hardcoding the port as you suggested. Still no go. :-/

          Comment

          • vMike

            #6
            Re: Age-old &quot;SQL Server does not exist&quot; error


            "Roy" <roy.anderson@g mail.com> wrote in message
            news:1114442786 .921549.57350@f 14g2000cwb.goog legroups.com...[color=blue]
            > Judging from the sheer number of posts on this topic, I'm sensing this
            > is a fairly common problem. Only problem is, I've tried just about
            > every recommendation in all the posts I've found thus far and none have
            > worked.
            >
            > I have XP on my workstation and two servers that run server 2003.
            > I have sql server dev edition on all 3, but only VS.NET on my
            > workstation.
            > I have .NET framework 1.1 on all 3 machines.
            >
            > I can connect/interact just fine with the SQL Server instances on both
            > servers using EM, Query Analyzer, and VS.NET "server explorer."
            > However, pages I make on my workstation that connect to SQL Server on
            > either of the two servers fail to work. If I take the EXACT same pages
            > and run them on either server, they work fine.
            >
            > The error I get is "Exception Details:
            > System.Data.Sql Client.SqlExcep tion: SQL Server does not exist or access
            > denied." I strongly suspect that this is a security issue, but I don't
            > know how to resolve it. I've given (as per other posts) the usernames
            > ASPNET and NETWORK SECURITY broad rights on all sql server instances,
            > yet still I can't run a webpage on my workstation that connects. It's
            > infuriating. Help!
            >
            >
            > Behold my latest connection string (since I know some of you will want
            > to see it anyways... ;-)
            > Dim MyConnection As New
            > SqlConnection(" server=testserv er;uid=test;pwd =pass;database= adp")
            >
            > I've tried using IP's in place of the server name and all. I truly
            > think this is some obscure security issue...
            >[/color]

            I had a similar problem. I know very little about sql but this sequence of
            steps helped me get my connection working maybe it will give you some ideas.
            You problably don't need to to this at dos. You probably can do it within
            sql server.

            #at dos prompt osql -E -S COMPUTERNAME
            exec sp_grantlogin 'COMPUTER_NAME\ ASPNET'
            go
            #Database_Name is name of sql database without file extension
            use Database_Name
            exec sp_grantdbacces s COMPUTER_NAME\A SPNET
            go
            use Database_Name
            exec sp_addrolemembe r 'db_owner', COMPUTER_NAME\A SPNET
            go
            exec sp_addrolemembe r 'db_datareader' , COMPUTER_NAME\A SPNET
            exec sp_addrolemembe r 'db_datawriter' , COMPUTER_NAME\A SPNET
            go
            #Also you may need to give broader rights to some store procedures
            grant execute on 'STORED_PROCEDU RE_NAME' to public


            Mike


            Comment

            • Roy

              #7
              Re: Age-old &quot;SQL Server does not exist&quot; error

              Thanks for the response Mike.
              I just tried your series of things and still nothing.
              :(

              Comment

              • TDAVISJR

                #8
                Re: Age-old &quot;SQL Server does not exist&quot; error

                Sorry guys, somehow I didn't get that

                --
                TDAVISJR
                aka - Tampa.NET Koder


                "Lucas Tam" <REMOVEnntp@rog ers.com> wrote in message
                news:Xns964381C 5D97D1nntproger scom@127.0.0.1. ..[color=blue]
                > "TDAVISJR" <anonymous@micr osoft.com> wrote in news:OzCzeRbSFH A.996
                > @TK2MSFTNGP09.p hx.gbl:
                >[color=green]
                >>
                >> Try connecting via Hostname or IP address.[/color]
                >
                > Did you even read his post?
                >[color=green]
                >> I've tried using IP's in place of the server name and all. I truly
                >> think this is some obscure security issue...[/color]
                >
                >
                >
                > --
                > Lucas Tam (REMOVEnntp@rog ers.com)
                > Please delete "REMOVE" from the e-mail address when replying.
                > http://members.ebay.com/aboutme/coolspot18/[/color]


                Comment

                • Shaw

                  #9
                  RE: Age-old &quot;SQL Server does not exist&quot; error

                  >I can connect/interact just fine with the SQL Server instances on both
                  servers >using EM, Query Analyzer, and VS.NET "server explorer."

                  If “Server explorer” works, why don’t you connect to your SQL server at 2003
                  and drag the db table in server explorer into your page. The VS.NET will
                  generate connection class automatically. Try to use this class to connect db
                  in code, and to see if it really works.

                  Shaw

                  Comment

                  • Lucas Tam

                    #10
                    Re: Age-old &quot;SQL Server does not exist&quot; error

                    "Roy" <roy.anderson@g mail.com> wrote in news:1114450422 .152727.132890
                    @l41g2000cwc.go oglegroups.com:
                    [color=blue]
                    > Thanks for the response Mike.
                    > I just tried your series of things and still nothing.
                    >:(
                    >[/color]

                    How about try connecting via a System DSN as a test?

                    Create a DSN for SQL server on the system... then use the System DSN in
                    your connection string.

                    --
                    Lucas Tam (REMOVEnntp@rog ers.com)
                    Please delete "REMOVE" from the e-mail address when replying.

                    Comment

                    • Roy

                      #11
                      Re: Age-old &quot;SQL Server does not exist&quot; error

                      I don't think I can use a system DSN in my connection string... I
                      looked it up in the documentation and got this:

                      Note The .NET Framework Data Provider for SQL Server uses its own
                      protocol to communicate with SQL Server. Therefore, it does not support
                      the use of an ODBC data source name (DSN) when connecting to SQL Server
                      because it does not add an ODBC layer.

                      Comment

                      Working...