Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Remote connection to SQL Server

Remote connection to SQL Server

Scheduled Pinned Locked Moved Visual Basic
sysadminhelpdatabasesql-serversecurity
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raaman
    wrote on last edited by
    #1

    I m trying to connect to the SQL Server 2000 installed in a network machine n have tried to connect with the following connection string: conn.Open "Provider=SQLOLEDB" & _ ";Data Source=192.168.0.5,1433" & _ ";Network Library=DBMSSOCN" & _ ";Initial Catalog=" & "master" But i have an error as below; Runtime-error '-2147467259 (80004005)' Invalid authorization specification Pls help me wats goin wrong.

    raamay

    O B 2 Replies Last reply
    0
    • R raaman

      I m trying to connect to the SQL Server 2000 installed in a network machine n have tried to connect with the following connection string: conn.Open "Provider=SQLOLEDB" & _ ";Data Source=192.168.0.5,1433" & _ ";Network Library=DBMSSOCN" & _ ";Initial Catalog=" & "master" But i have an error as below; Runtime-error '-2147467259 (80004005)' Invalid authorization specification Pls help me wats goin wrong.

      raamay

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      Check your connection string against: ConnectionStrings.com - Sql Server[^]

      1 Reply Last reply
      0
      • R raaman

        I m trying to connect to the SQL Server 2000 installed in a network machine n have tried to connect with the following connection string: conn.Open "Provider=SQLOLEDB" & _ ";Data Source=192.168.0.5,1433" & _ ";Network Library=DBMSSOCN" & _ ";Initial Catalog=" & "master" But i have an error as below; Runtime-error '-2147467259 (80004005)' Invalid authorization specification Pls help me wats goin wrong.

        raamay

        B Offline
        B Offline
        Burnsys2
        wrote on last edited by
        #3

        You are not specifying the security options. For NT Authentication: "provider=sqloledb;Data Source=SERVER;Initial Catalog=DATABASE;Integrated Security=SSPI;" For Sql Authentication: "provider=sqloledb;Data Source=SERVER;Initial Catalog=DATABASE;UID=SA;PWD=Pass"

        R 1 Reply Last reply
        0
        • B Burnsys2

          You are not specifying the security options. For NT Authentication: "provider=sqloledb;Data Source=SERVER;Initial Catalog=DATABASE;Integrated Security=SSPI;" For Sql Authentication: "provider=sqloledb;Data Source=SERVER;Initial Catalog=DATABASE;UID=SA;PWD=Pass"

          R Offline
          R Offline
          raaman
          wrote on last edited by
          #4

          Yes i added the security options and now i get the error 'SQL Server doesnot exist or access denied' . I m sure the connection string is okey but i doubt we need to configure SQL Server and its remote access properties which i dont find plus dont have any idea what to do & wat to change. So, u got da idea i wud b immensely grateful.

          raamay

          B 1 Reply Last reply
          0
          • R raaman

            Yes i added the security options and now i get the error 'SQL Server doesnot exist or access denied' . I m sure the connection string is okey but i doubt we need to configure SQL Server and its remote access properties which i dont find plus dont have any idea what to do & wat to change. So, u got da idea i wud b immensely grateful.

            raamay

            B Offline
            B Offline
            Burnsys2
            wrote on last edited by
            #5

            That looks like a conection problem, First try to ping the server from Dos by it's name, it should at least resolve it's ip address Then from the client machine try this: Start Run CliConfg And then set the "Default network library" to "TCP/IP" If it still not working try Telnet Server 1433 If it says that could not connect, then you have a network problem! -- modified at 12:00 Wednesday 29th August, 2007

            R 1 Reply Last reply
            0
            • B Burnsys2

              That looks like a conection problem, First try to ping the server from Dos by it's name, it should at least resolve it's ip address Then from the client machine try this: Start Run CliConfg And then set the "Default network library" to "TCP/IP" If it still not working try Telnet Server 1433 If it says that could not connect, then you have a network problem! -- modified at 12:00 Wednesday 29th August, 2007

              R Offline
              R Offline
              raaman
              wrote on last edited by
              #6

              thanx n i tried every thing as u suggested. i tried pinging n it works plus moved to the second step whereby the Default network library is already set to "TCP/IP". And the 3rd one, there is no msg at all. it starts by saying connecting to the server and then disappears. infact i wanted 2 say tht my network is a very small network n i m 100% confident it doesnt 've a problem. Probably i think i must use Sql Server authentication because during installation, i made the all authentication based on windows. Plus, i get the error "Login failed for user 'server\Guest'" now. i tried the sa login but failed to connect. Any way thanks 4 ur support, pls lemme know further if u get any ideas.

              raamay

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups