How to share a SQL DataBase over the internet

Jack_Sparrow

Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    21105xj.jpg


    According above figure
    how to share a DB in a server over the internet
    and allow to a remote PC to connect using the static IP given by ISP (220.223.169.12) using a connection string... :baffled:
     

    vidura99

    Well-known member
  • Oct 16, 2009
    14,307
    1,361
    113
    Colombo
    You just need to know the ip address of the sql server to connect to and the authentication details for that server. Use a connection string like the following.But not sure machan

    "Provider=SQLOLEDB;Data Source=some_ipaddress;UID=some_user_name;PWD=_some_password;DATABASE=some_database_name"
     
    • Like
    Reactions: Jack_Sparrow

    Jack_Sparrow

    Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    You just need to know the ip address of the sql server to connect to and the authentication details for that server. Use a connection string like the following.But not sure machan

    "Provider=SQLOLEDB;Data Source=some_ipaddress;UID=some_user_name;PWD=_some_password;DATABASE=some_database_name"


    when DB is hosted in the server, server/ip (192.168.2.1) can be used to get connected within the local network, this can be done the con string yu mentioned....

    but when it comes to internet, ISP static IP address directly connected to the ADSL router... all i want is to use ISP IP add and connect to the DB resides on server...

    So i think some configuration has to be done at router.. ip forwading or something like that :eek:
     

    vidura99

    Well-known member
  • Oct 16, 2009
    14,307
    1,361
    113
    Colombo
    when DB is hosted in the server, server/ip (192.168.2.1) can be used to get connected within the local network, this can be done the con string yu mentioned....

    but when it comes to internet, ISP static IP address directly connected to the ADSL router... all i want is to use ISP IP add and connect to the DB resides on server...

    So i think some configuration has to be done at router.. ip forwading or something like that :eek:


    Machan. That private IP to public IP translation done via the NAT (Network address translation) at the router. For this purpose you have to have a advanced router like CISCO
     

    Jack_Sparrow

    Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    Machan. That private IP to public IP translation done via the NAT (Network address translation) at the router. For this purpose you have to have a advanced router like CISCO


    ehema netuwa berida nikan router ekakin :baffled::baffled: mala magulai wenne :baffled:
    den etakota IIS server ekak host karannat CISCO router onida?
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    21105xj.jpg


    According above figure
    how to share a DB in a server over the internet
    and allow to a remote PC to connect using the static IP given by ISP (220.223.169.12) using a connection string... :baffled:

    1. On the SQL server, enable SQL authentication and set a password for the sa account (if the password is empty) and set a username & password for the required database.

    2. On the SQL server, set it to listen on TCP/IP on port 1433

    3. On the windows server, open port 1433 for incoming connections.

    4. on the Router, set up port forwarding and forward TCP port 1433 to 192.168.2.1 on port 1433

    after this, you can access the SQL server using the router IP (202.223.169.12 ) using the sql user name and password.
     

    Jack_Sparrow

    Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    1. On the SQL server, enable SQL authentication and set a password for the sa account (if the password is empty) and set a username & password for the required database.

    2. On the SQL server, set it to listen on TCP/IP on port 1433

    3. On the windows server, open port 1433 for incoming connections.

    4. on the Router, set up port forwarding and forward TCP port 1433 to 192.168.2.1 on port 1433

    after this, you can access the SQL server using the router IP (202.223.169.12 ) using the sql user name and password.

    thanks a lot buwa
    in router for local or remote 192.168.2.1 on port 1433 should has to be step up?

    x2kqhg.gif
     
    Last edited: