473,473 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 5909
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.