473,372 Members | 1,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Connect To Local SQL Server DB From Remote Server

RN1
Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?

Thanks,

Ron
Aug 20 '08 #1
7 5903
RN1 wrote:
Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?

Thanks,

Ron
This should be helpful:

How to configure SQL Server 2005 to allow remove connections:
http://support.microsoft.com/default...b;EN-US;914277

How to configure Express to accept remote connections:
http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx

--
Göran Andersson
_____
http://www.guffa.com
Aug 20 '08 #2
Sure, but the server will need to connect to your machine IP address. Are
they on the same local network?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"RN1" <rn**@rediffmail.comwrote in message
news:bd**********************************@n33g2000 pri.googlegroups.com...
Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?

Thanks,

Ron

Aug 20 '08 #3
RN1
On Aug 20, 6:39*pm, Göran Andersson <gu...@guffa.comwrote:
RN1 wrote:
Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?
Thanks,
Ron

This should be helpful:

How to configure SQL Server 2005 to allow remove connections:http://support.microsoft.com/default...b;EN-US;914277

How to configure Express to accept remote connections:http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx

--
Göran Andersson
_____http://www.guffa.com
Thanks Goran for the prompt response. I had already gone through the 2
articles before posting my question. Actually my main intention is to
connect to a remote SQL Server 2005 dataabse from my local SSMS but am
not able to do so inspite of following all the steps that have been
stated in the 2 articles (& numerous other articles as well). I even
tried telnetting to the remote SQL Server but it generates an error
saying that "could not open port 1433".

This is the reason why I want to connect to my local SQL Server 2005
DB from the remote web server which is why I need the ConnectionString
to connect to my local SQL Server DB from the remote web server. As
such, to connect to my local SQL Server 2005 DB from my local web
server, I use the following ConnectionString in ASP.NET pages:

sqlConn = New SqlConnection("Data Source=RON\SQLEXPRESS;Initial
Catalog=MyDB;Integrated Security=True")

But the above won't work with the ASP.NET pages in the remote web
server. I have gone through the ConnectionStrings at www.connectionstrings.com
but couldn't find anything relevant.

Could you please help me out with the ConnectionString?

Thanks,

Ron
Aug 20 '08 #4
RN1
On Aug 20, 6:40*pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
Sure, but the server will need to connect to your machine IP address. Are
they on the same local network?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net

"RN1" <r...@rediffmail.comwrote in message

news:bd**********************************@n33g2000 pri.googlegroups.com...
Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?
Thanks,
Ron- Hide quoted text -

- Show quoted text -
>Sure, but the server will need to connect to your machine IP address. Are
they on the same local network?
Sorry I didn't get you. What do you mean by "server" here - local SQL
Server, local web server, remote SQL Server or remote web server?

Ron
Aug 20 '08 #5
RN1 wrote:
On Aug 20, 6:39 pm, Göran Andersson <gu...@guffa.comwrote:
>RN1 wrote:
>>Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?
Thanks,
Ron
This should be helpful:

How to configure SQL Server 2005 to allow remove connections:http://support.microsoft.com/default...b;EN-US;914277

How to configure Express to accept remote connections:http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx

--
Göran Andersson
_____http://www.guffa.com

Thanks Goran for the prompt response. I had already gone through the 2
articles before posting my question. Actually my main intention is to
connect to a remote SQL Server 2005 dataabse from my local SSMS but am
not able to do so inspite of following all the steps that have been
stated in the 2 articles (& numerous other articles as well). I even
tried telnetting to the remote SQL Server but it generates an error
saying that "could not open port 1433".

This is the reason why I want to connect to my local SQL Server 2005
DB from the remote web server which is why I need the ConnectionString
to connect to my local SQL Server DB from the remote web server. As
such, to connect to my local SQL Server 2005 DB from my local web
server, I use the following ConnectionString in ASP.NET pages:

sqlConn = New SqlConnection("Data Source=RON\SQLEXPRESS;Initial
Catalog=MyDB;Integrated Security=True")

But the above won't work with the ASP.NET pages in the remote web
server. I have gone through the ConnectionStrings at www.connectionstrings.com
but couldn't find anything relevant.

Could you please help me out with the ConnectionString?

Thanks,

Ron
Do you have any firewalls, on your computer, between your computer and
the network, or between the network and the server?

Are your computer on the same local network as the server? Otherwise you
have to specify your IP address in the connection string instead of the
computer name "RON".

If you get a local IP adrress by DHCP, you can browse to a site like
http://www.whatismyip.com/ to get your external IP address.

--
Göran Andersson
_____
http://www.guffa.com
Aug 20 '08 #6
RN1
On Aug 20, 8:33*pm, Göran Andersson <gu...@guffa.comwrote:
RN1 wrote:
On Aug 20, 6:39 pm, Göran Andersson <gu...@guffa.comwrote:
RN1 wrote:
Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?
Thanks,
Ron
This should be helpful:
How to configure SQL Server 2005 to allow remove connections:http://support.microsoft.com/default...b;EN-US;914277
How to configure Express to accept remote connections:http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx
--
Göran Andersson
_____http://www.guffa.com
Thanks Goran for the prompt response. I had already gone through the 2
articles before posting my question. Actually my main intention is to
connect to a remote SQL Server 2005 dataabse from my local SSMS but am
not able to do so inspite of following all the steps that have been
stated in the 2 articles (& numerous other articles as well). I even
tried telnetting to the remote SQL Server but it generates an error
saying that "could not open port 1433".
This is the reason why I want to connect to my local SQL Server 2005
DB from the remote web server which is why I need the ConnectionString
to connect to my local SQL Server DB from the remote web server. As
such, to connect to my local SQL Server 2005 DB from my local web
server, I use the following ConnectionString in ASP.NET pages:
sqlConn = New SqlConnection("Data Source=RON\SQLEXPRESS;Initial
Catalog=MyDB;Integrated Security=True")
But the above won't work with the ASP.NET pages in the remote web
server. I have gone through the ConnectionStrings atwww.connectionstrings.com
but couldn't find anything relevant.
Could you please help me out with the ConnectionString?
Thanks,
Ron

Do you have any firewalls, on your computer, between your computer and
the network, or between the network and the server?

Are your computer on the same local network as the server? Otherwise you
have to specify your IP address in the connection string instead of the
computer name "RON".

If you get a local IP adrress by DHCP, you can browse to a site likehttp://www.whatismyip.com/to get your external IP address.

--
Göran Andersson
_____http://www.guffa.com- Hide quoted text -

- Show quoted text -
>Are your computer on the same local network as the server?
No
>Otherwise you
have to specify your IP address in the connection string instead of the
computer name "RON".
>If you get a local IP adrress by DHCP, you can browse to a site like
http://www.whatismyip.com/ to get your external IP address.
I don't get a local IP address by DHCP (I figured this out by running
the command - ipconfig /all - & the output showed that it is not DHCP
enabled). I browsed to www.whatismyip.com & I used the IP address it
generated instead of "RON" in the ConnectionString but I still
couldn't make the ASP.NET page residing in the remote web server
connect to my local SQL Server. It generated an error saying "Error
locating Server/Instance specified".

I also browsed to http://www.chamisplace.com/asp/info.asp?f=ip to
cross-check the IP generated by whatismyip.com but the former
generated the same IP address as the latter.

What could be the problem now?

Thanks,

Ron
Aug 21 '08 #7
"RN1" <rn**@rediffmail.comwrote in message
news:bd**********************************@n33g2000 pri.googlegroups.com...
Is it possible to connect to my local SQL Server 2005 database from a
remote web server? If yes, what ConnectionString do I use?

Thanks,

Ron
What is your local IP address? If it's 192.x.x.x or similar, it won't work.
That's an internal network address. Are you at home? Do you go through
Comcast or a similar ISP? Probably won't work either. From the remote
machine, at a minimum, it will need to be able to ping your IP. Your SQL
instance needs to be on a hosted server with a public-facing IP address.
Aug 21 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
7
by: Michi Henning | last post by:
Hi, I'm using a non-blocking connect to connect to a server. Works fine -- the server gets and accepts the connection. However, once the connection is established, I cannot retrieve either the...
5
by: Mike L | last post by:
I'm able to connect to my stored procedure in my local database but not able to connect to my stored procedure in the remote database. I use several different UserID and Password that all should...
2
by: bk | last post by:
This is driving me crazy. I get "SQL Server is unavailable or does not exist" error while developing asp.net application in vs2003's IDE development mode but when I install the application on the...
4
by: BenM | last post by:
I have to connect to two SQLServers in my script. One server is local, the other is remote. I am using ODBC for the local connection: pasConnStr = "Driver={SQL Server};" & _ "Server=(local);"...
14
by: DaTurk | last post by:
I am makeing a Multicast server client setup and was wondering what the difference is between Socket.Connect, and Socket.Bind. It may be a stupid question, but I was just curious. Because I...
0
by: Larry Rebich | last post by:
I am trying to use the sample web template that is distributed with Visual Studio 2005 called 'Personal Web Site Starter Kit'. After running for awhile it fails with the following message: ...
5
by: Alan Silver | last post by:
Hello, Server configuration: Windows 2003 Server SP2 SQL Server 2000 SP4 ..NET v2.0.50727 just built up a new server using the same configuration as my current one. I even used the same CDs...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.