Showing posts with label isp. Show all posts
Showing posts with label isp. Show all posts

Wednesday, March 28, 2012

How to connect to sql server on another machine through asp.net

Hi All,

I have been struggling with this problem for quite some time. Basically
i have an asp page (on the ISP server) that I want to connect to a sql
server on another machine (on my server) and I have been trying to
figure out how to do this. I tried to connect using an ip address in
the data source and it did not work. The asp.net code looks something
like this:

Conn.Open ("Provider=SQLOLEDB;Password=xxxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=mssqlxxx;Data
Source=xx.xxx.xxx.xxx,1433;Network Library=dbmssocn")

That did not work. Gave me an access denied or sql server does not
exist error. I tried playing around with or without the 1433 port,
still no luck.

Is there something I need to set up on sql server in order for me to
connect to this?? Can someone give me some suggestion how i can connect
to another computer?

My ISP offers sql server support and they give me an ip address to
connect directly to the sql server, code looks something like this:

conMyData = New SqlConnection( "Server=xxxxxxxxx.registeredsite.com;
UID=userxxxxxx; PWD=xxxxxx;Database=samplecom" )

now, my question is, how do I set up my sql server to have an ip
address so i can connect??

so i see 2 possible w ays to do this but i have no clue to make this
work. Any help is appreciated.This article might be useful:

http://www.aspfaq.com/show.asp?id=2126

Simon

Wednesday, March 21, 2012

How to connect from Sql Manager to a sql server 2000 database at an ISP

To use the front end tools in SQL Manager on the database at my ISP I want to connect directly. I have enabled TCP/IP and Named Pipes without succes.

My installation is based on SQL Server Developer Edition and VS 2005. With my previos installation based on Express versions of the product this worked fine.

To be more specific:

In VS 2005 I select Tools -> Connect to database and fill inn the dialog window with the serveraddress (sql01.active24.com), username and password. I then get the following message:

An errror has occurd while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the fefault settings SQL Server does not allow remote connections. (provider: Named pipes, errror: 40 - Could not opeen a connection to SQL Server

In the network configuration I have now disabled Named Pipes and enabled TCP/IP.

Thanks in advance!

Andreassql