Solved

Connect to MS SQL on different subnet

Posted on 2004-10-11
8
1,205 Views
Last Modified: 2008-02-26
I have a remote hosting environment which includes two machines - a web server and an ms sql server. The sql machine uses an internal IP 192.168.0.10 and the web server has a real IP as well as an internal IP (used to connect to sql server). Using this setup its not possible to ping or connect to the sql machine remotly. Is it possible to somehow setup a way to connect to the sql server via either Enterprise manager or Query Analyzer remotely?

If this is not possible is there any other way I can connect to it? I have full control of both machines so I can make any needed changes.
0
Comment
Question by:rot299
8 Comments
 
LVL 6

Expert Comment

by:mcp111
ID: 12283346
What happens when you try to register in Enterprise manager using IP 192.168.0.10
0
 
LVL 1

Author Comment

by:rot299
ID: 12283378
I didn't try because I know my remote machine (connected via the internet, not on the same network as the web and SQL server) will not find the internal IP. Sorry if I didn't make it clear that I want to connect to the sql box over the internet/remotley.
0
 
LVL 5

Assisted Solution

by:LlamaJoe
LlamaJoe earned 250 total points
ID: 12283466
If you are connecting remotely, then you have to give the SQL server an external IP...  

or, install sql on the web box and setup a linked server to your SQL box - then connect to the Web box and use the linked server as a means to connect...

or, specify a random port north of 2000 on the Web box to be forwarded to port 1433 on the sql box, then use the client network utility on your remote machine to create an alias to this new port on the Web box and connect through the alias.(this is much easier if you have a router between the web box and the internet)

or, download the SQL Server Web Data Administrator and see if that will work on your web box... (this is enterprise manager with a web front end)
http://www.microsoft.com/downloads/details.aspx?FamilyID=C039A798-C57A-419E-ACBC-2A332CB7F959&displaylang=en

or, run terminal services on your web box and then connect

or, create a vpn connection to your web box and then your remote machine is part of that network...

or, or, or... lots of options still can be dreamt of.  It really depends on the setup of your network and what pieces are available to be mucked with.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

by:rot299
ID: 12283709
I currently do connect to the sql box by connecting via terminal to the web box then accessing the sql box but wanted a more direct method. I like the idea of forwarding a port on the web box to the sql box. I will try this out.

Thanks for the info

0
 
LVL 34

Accepted Solution

by:
arbert earned 250 total points
ID: 12283837
You don't have to give the SQL box and external IP address (in fact, I wouldn't recommend it).  However, you do need to be able to set up forwarding or NAT on your router/firewall to allow port 1433 to be routed to your SQL Server on the internal network.

Brett
0
 
LVL 1

Author Comment

by:rot299
ID: 12283998
Ok thanks. Can I setup the port forwarding on the web server machine or does this have to be done on the router? The only issue is that the router isn't mine although I can probably ask the owner to set the forwarding if there is no other way.

Do you have any links to information on how to set this up?
0
 
LVL 34

Expert Comment

by:arbert
ID: 12284220
You would want to set it up at the router.....

As far as how to do it, really depends on the router....Some call it port forwarding, some call it virtual servers, just depends....
0
 
LVL 1

Author Comment

by:rot299
ID: 12284233
Ok, well thanks for all the help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question