Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2005
    Posts
    36

    Unanswered: Using a client to connect to a remote sql db

    hey i created a client app.. i want to connect it to a remote db.. but i am not able to connect through the internet. but its working for LAN.

    is there anything that i must change in the settings of the enterprise manager??

    i am connecting through an sa password and i allowed other sql servers to connect remotely to this sql server using rpc...

    i am using this code to connect . i am using vb.net

    "Data Source=x.x.x.x;Network Library=DBMSSOCN;Initial Catalog=test;User ID=sa;Password="

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    First things first.

    Do not use an sa account as an application connection.

    Do not have a blank password for your sa account.

    Finally, and I do not like this either for security reasons, this is possible but you have to open up your firewall to listen to to the IP address and the port number.

    The topic in SQL Server Books Online is "Connections to SQL Server Over the Internet"

    There other ways to do this that require Virtual Private Networking (VPN) that are more secure.

    Either way you are likely to encounter performance issues. Ideally you should have done this as a web application on a web server (like asp on IIS) that has connections through a firewall to the database server.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Feb 2005
    Posts
    36
    ok.. the funny thing is i am not using a firewall. i have an open connection.

    i am able to connect to my own database with an ip. i tested it through enterprise manager. but i am not able to connect through the string i posted earlier.

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    OK, how about providing a provider to the begining of your connection string Like "Provider=SQLOLEDB.1;".

    When your connection fails what is the complete particular error message?

    Are the client and server both running the same network libraries for TCPIP or multi-protocol?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Feb 2005
    Posts
    36
    i got that connection string from

    http://www.connectionstrings.com/

    the error message is system error.
    i don't use sockets or anything
    i just make a connection straight to the database

    the only thing i import is
    systems.data.sqlclient

  6. #6
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    are you addung the port number to the end of your ip like your web site told you to?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  7. #7
    Join Date
    Feb 2005
    Posts
    36
    yes i added that also...
    i heard you have to change some settings in enterprise manager or somethign like that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •