SQL Server Trusted Connection

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

    SQL Server Trusted Connection

    I'm trying to get my program to connect to a SQL Server 2005 database over the internet.
    The remote computer is on another network and it's connected to our network through Windows VPN. I'm running Windows Small Business Server 2005 on our server with SQL Server 2005 and ISA Server 2004.

    I can do this at home with my laptop using the following connection string:

    strCnn = "Provider=SQLOL EDB.1;Integrate d Security=SSPI;P ersist Security Info=False;" & "User ID=" & _
    sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" & sysServer & ";"
    db.CursorLocati on = ADODB.CursorLoc ationEnum.adUse Client
    db.Open(strCnn)

    I'm using the local IP address of the server as 'sysServer' - 192.168.1.2
    But my laptop has Visual Studio 2008 and SQL Server Express on it.

    When I try to do it from this other remote computer, I get:

    Login failed for user ''. The user is not associated with a trusted SQL Server connection.

    SQL Server is set on Windows authentication and I'd rather not have to change that. I don't want the users to have to use their Windows password to get into my program.

    What do I need to change to get this to work?
  • sloan

    #2
    Re: SQL Server Trusted Connection


    What domain is the Server on?
    Has the laptop (machine) been added to the domain?
    What login are you using on the laptop computer?
    ........(and repeat the question for the "other remote")
    Has the (other remote computer)(machi ne) been added to the domain?
    What login are you using on the (other remote computer) computer?





    "Kevinp" <kevinp@nospam. comwrote in message
    news:s73sf4dgs2 0r967ddds0mp3m1 eqspkib2k@4ax.c om...
    I'm trying to get my program to connect to a SQL Server 2005 database over
    the internet.
    The remote computer is on another network and it's connected to our
    network through Windows VPN. I'm running Windows Small Business Server
    2005 on our server with SQL Server 2005 and ISA Server 2004.
    >
    I can do this at home with my laptop using the following connection
    string:
    >
    strCnn = "Provider=SQLOL EDB.1;Integrate d Security=SSPI;P ersist Security
    Info=False;" & "User ID=" & _
    sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" &
    sysServer & ";"
    db.CursorLocati on = ADODB.CursorLoc ationEnum.adUse Client
    db.Open(strCnn)
    >
    I'm using the local IP address of the server as 'sysServer' - 192.168.1.2
    But my laptop has Visual Studio 2008 and SQL Server Express on it.
    >
    When I try to do it from this other remote computer, I get:
    >
    Login failed for user ''. The user is not associated with a trusted SQL
    Server connection.
    >
    SQL Server is set on Windows authentication and I'd rather not have to
    change that. I don't want the users to have to use their Windows password
    to get into my program.
    >
    What do I need to change to get this to work?

    Comment

    • Kevinp

      #3
      Re: SQL Server Trusted Connection

      The server is on the domain here at our office. My laptop has not been assigned to any domain. It's actually part of my home workgroup, but it has been connected to the domain at the office. The computer I'm trying to connect with is on a completely
      different domain and has never been a part of our domain except for VPN.

      I use the same username and password on my laptop as I do with my office computer (obviously the domains are not the same). The remote computer uses a completely different username/password/domain.


      On Tue, 21 Oct 2008 15:35:57 -0400, "sloan" <sloan@ipass.ne twrote:
      >
      >What domain is the Server on?
      >Has the laptop (machine) been added to the domain?
      >What login are you using on the laptop computer?
      >.......(and repeat the question for the "other remote")
      >Has the (other remote computer)(machi ne) been added to the domain?
      >What login are you using on the (other remote computer) computer?
      >
      >
      >
      >
      >
      >"Kevinp" <kevinp@nospam. comwrote in message
      >news:s73sf4dgs 20r967ddds0mp3m 1eqspkib2k@4ax. com...
      >I'm trying to get my program to connect to a SQL Server 2005 database over
      >the internet.
      >The remote computer is on another network and it's connected to our
      >network through Windows VPN. I'm running Windows Small Business Server
      >2005 on our server with SQL Server 2005 and ISA Server 2004.
      >>
      >I can do this at home with my laptop using the following connection
      >string:
      >>
      >strCnn = "Provider=SQLOL EDB.1;Integrate d Security=SSPI;P ersist Security
      >Info=False;" & "User ID=" & _
      > sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" &
      >sysServer & ";"
      >db.CursorLocat ion = ADODB.CursorLoc ationEnum.adUse Client
      >db.Open(strCnn )
      >>
      >I'm using the local IP address of the server as 'sysServer' - 192.168.1.2
      >But my laptop has Visual Studio 2008 and SQL Server Express on it.
      >>
      >When I try to do it from this other remote computer, I get:
      >>
      >Login failed for user ''. The user is not associated with a trusted SQL
      >Server connection.
      >>
      >SQL Server is set on Windows authentication and I'd rather not have to
      >change that. I don't want the users to have to use their Windows password
      >to get into my program.
      >>
      >What do I need to change to get this to work?
      >

      Comment

      • sloan

        #4
        Re: SQL Server Trusted Connection

        //The remote computer uses a completely different
        username/password/domain.//

        Then I don't think you can use integrated security with this and will have
        to go to mixed authentication.

        This happens to me when I "go on the road" with my personal laptop for work
        stuff.
        Because my personal laptop isn't on the domain, I have to have the dba's
        create a sql authenication account for me, with lots of right of course.

        ..............

        Basically, if you go through the "Security/Login" in Sql Server........a nd
        hit the "Browse" button (for usernames on the domain), and you can't see
        the user logged into Laptop1 (in your scenario)...the n trusted isn't going
        to work.
        ............... .


        Security / Logins / New Login ............... .... Windows Authentication /
        Search.

        If you don't find it in there, then you can't use Integrated. If you do
        find it in there, you have to ADD the user...and assign privs.




        "Kevinp" <kevinp@nospam. comwrote in message
        news:3mtsf4t01o vgkgbp190k6vjp7 9umkn4ism@4ax.c om...
        The server is on the domain here at our office. My laptop has not been
        assigned to any domain. It's actually part of my home workgroup, but it
        has been connected to the domain at the office. The computer I'm trying to
        connect with is on a completely
        different domain and has never been a part of our domain except for VPN.
        >
        I use the same username and password on my laptop as I do with my office
        computer (obviously the domains are not the same). The remote computer
        uses a completely different username/password/domain.
        >
        >
        On Tue, 21 Oct 2008 15:35:57 -0400, "sloan" <sloan@ipass.ne twrote:
        >
        >>
        >>What domain is the Server on?
        >>Has the laptop (machine) been added to the domain?
        >>What login are you using on the laptop computer?
        >>.......(and repeat the question for the "other remote")
        >>Has the (other remote computer)(machi ne) been added to the domain?
        >>What login are you using on the (other remote computer) computer?
        >>
        >>
        >>
        >>
        >>
        >>"Kevinp" <kevinp@nospam. comwrote in message
        >>news:s73sf4dg s20r967ddds0mp3 m1eqspkib2k@4ax .com...
        >>I'm trying to get my program to connect to a SQL Server 2005 database
        >>over
        >>the internet.
        >>The remote computer is on another network and it's connected to our
        >>network through Windows VPN. I'm running Windows Small Business Server
        >>2005 on our server with SQL Server 2005 and ISA Server 2004.
        >>>
        >>I can do this at home with my laptop using the following connection
        >>string:
        >>>
        >>strCnn = "Provider=SQLOL EDB.1;Integrate d Security=SSPI;P ersist Security
        >>Info=False; " & "User ID=" & _
        >> sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" &
        >>sysServer & ";"
        >>db.CursorLoca tion = ADODB.CursorLoc ationEnum.adUse Client
        >>db.Open(strCn n)
        >>>
        >>I'm using the local IP address of the server as 'sysServer' -
        >>192.168.1.2
        >>But my laptop has Visual Studio 2008 and SQL Server Express on it.
        >>>
        >>When I try to do it from this other remote computer, I get:
        >>>
        >>Login failed for user ''. The user is not associated with a trusted SQL
        >>Server connection.
        >>>
        >>SQL Server is set on Windows authentication and I'd rather not have to
        >>change that. I don't want the users to have to use their Windows
        >>password
        >>to get into my program.
        >>>
        >>What do I need to change to get this to work?
        >>

        Comment

        Working...