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. Database & SysAdmin
  3. Database
  4. SQL Server access across a network

SQL Server access across a network

Scheduled Pinned Locked Moved Database
sysadminhelpquestiondatabasesql-server
7 Posts 5 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.
  • S Offline
    S Offline
    StephenMcAllister
    wrote on last edited by
    #1

    Hi, I am running an application across a network which uses SQL server. When It runs I get an error 'Login failed for user guest' in the application. When I run the application on the machine where the server is it runs fine. How can I enable user access across a network to SQL Server? Thanks for any help.

    C R D 3 Replies Last reply
    0
    • S StephenMcAllister

      Hi, I am running an application across a network which uses SQL server. When It runs I get an error 'Login failed for user guest' in the application. When I run the application on the machine where the server is it runs fine. How can I enable user access across a network to SQL Server? Thanks for any help.

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Are you using a trusted connection? If so does the user you are logged in as on the remote machine have an account on the SQL Server?


      Do you want to know more?


      Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

      1 Reply Last reply
      0
      • S StephenMcAllister

        Hi, I am running an application across a network which uses SQL server. When It runs I get an error 'Login failed for user guest' in the application. When I run the application on the machine where the server is it runs fine. How can I enable user access across a network to SQL Server? Thanks for any help.

        R Offline
        R Offline
        ramkylaks
        wrote on last edited by
        #3

        Hi, If your using the SqlServer across the network you should not mention trusted connection = true if should specify as below myConnectionString = "Initial Catalog=Northwind;Data Source=servername;User ID=username;password=;Integrated Security=SSPI;"; thx. ramakrishna.j

        S 1 Reply Last reply
        0
        • R ramkylaks

          Hi, If your using the SqlServer across the network you should not mention trusted connection = true if should specify as below myConnectionString = "Initial Catalog=Northwind;Data Source=servername;User ID=username;password=;Integrated Security=SSPI;"; thx. ramakrishna.j

          S Offline
          S Offline
          StephenMcAllister
          wrote on last edited by
          #4

          The connection string i am using is as follows. sql_connection_string = "server=MICMACLAPTOP;Integrated Security=SSPI;database=humantouchSQL;Connect Timeout=20"; I have tried the below string sql_connection_string = "Initial Catalog=humantouchSQL;Data Source=MICMACLAPTOP;Integrated Security=SSPI;Connect Timeout=20"; But it still does not work. Any other suggestions?

          L R 2 Replies Last reply
          0
          • S StephenMcAllister

            The connection string i am using is as follows. sql_connection_string = "server=MICMACLAPTOP;Integrated Security=SSPI;database=humantouchSQL;Connect Timeout=20"; I have tried the below string sql_connection_string = "Initial Catalog=humantouchSQL;Data Source=MICMACLAPTOP;Integrated Security=SSPI;Connect Timeout=20"; But it still does not work. Any other suggestions?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Try to check the connection string from http://www.connectionstrings.com/[^]. Good luck :)


            A thousand mile of journey, begin with the first step. APO-CEDC Save Children Norway-Cambodia Office

            1 Reply Last reply
            0
            • S StephenMcAllister

              The connection string i am using is as follows. sql_connection_string = "server=MICMACLAPTOP;Integrated Security=SSPI;database=humantouchSQL;Connect Timeout=20"; I have tried the below string sql_connection_string = "Initial Catalog=humantouchSQL;Data Source=MICMACLAPTOP;Integrated Security=SSPI;Connect Timeout=20"; But it still does not work. Any other suggestions?

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

              Hi, You should pass the username and password to get sqlserver connection. thanks ramakrishna ramakrishna.j

              1 Reply Last reply
              0
              • S StephenMcAllister

                Hi, I am running an application across a network which uses SQL server. When It runs I get an error 'Login failed for user guest' in the application. When I run the application on the machine where the server is it runs fine. How can I enable user access across a network to SQL Server? Thanks for any help.

                D Offline
                D Offline
                DreadPirateRoberts
                wrote on last edited by
                #7

                If you're using a trusted connection, then make sure you log into the machine where you are running the app with an account that is also an account on the SQL Server database. (By your error message, it looks like you may have logged in as 'Guest.') To check this, on the SQL Server instance, check in the Security folder, and add your account to the list, and in the Database Access tab, check the database that this account needs to access. If you don't have rights to add a user to the server, then you will need to ask your DBA to do it for you.

                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