Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Connection

Status
Not open for further replies.

jl280328

Programmer
Jun 15, 2006
97
US
I have a SQL connection that used to work, but the client it was working for changed his IP address and had a new router installed. I tried to just plug in the new IP address to get it working again but had no luck. I am thinking it has something to do with the router, but have no idea what or what to do. Do I need to try and open up a port on the router or soemthing, and if so can this be done on the server, I have remote access to the server, or do I need to work specifically with the router? I already posted this once in the ASP forum below is the link.
 
Is this a "connect to database through internet" type of issue?

If it is, then you will definetly need to change the configuration of the router. Most routers have a 'default' page, so if you open internet explorer and type the IP Address of the router in to the address, then the default page should appear. These things are almost always password protected, so you'll need to know the password for the router.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Yes it connects from a web page, written in ASP, from a different server. I have the proper user name and password that prompts me when I try to connect to the site containing the database.
This is the web address that I use to connect to the site: where i have to enter the user name and password. I tried to connect via the IP address which is 70.90.150.170 but got a page cannot be displayed message, this is the right IP address b/c it is the address that I use to connect to the server remotely. Can I change the configuration of the router remotely by logging onto the server? I'm not sure where I need to look to do this.
 
1. Is the client using Windows Authenication? Is the IP address a new domain? If so, it might not be a trusted domain. Test this by giving them a temporary SQL Server authentication login to try.

2. Firewall could be blocking it. Some firewall people only open ports to specific IP addresses.

-SQLBill


Posting advice: FAQ481-4875
 
The router is not allowing access to the web server.
telnet 70.90.150.170 80
Connecting To 70.90.150.170...Could not open connection to the host, on port 80:
Connect failed

The router needs to be reconfigured to allow traffic from the internet to the web server.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Thank you for your help mrdenny it is greatly appreciated. Can I reconfigure the router when I remotely connect to the web server, and if so where do I begin? Or do I need to go to the office and reconfigure it there? I am mostly just a developer so am very ignorant about the administration side of things. FOr what it is worth the router is a Digital Trends Model SMC 8013WG.
 
Unless you have enabled remote administration on the router (which is never recommended) you'll need to be at the office to open up the port.

Some of the folks in the networking forums can probably walk you through redirecting the port on the router.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Is there a specific port that you recommend opening up, is it an advantage to open one up rather than another?
 
It's not a matter of recommendation. You need to know the port that sql server uses. By default, it's 1433.

To know for sure:

on the database server
start -> run
svrnetcn
OK
click TCP/IP in the enabled protocols list.
click properties

The port that sql server uses will be shown. This is the port you need to configure in the router.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
If you are trying to connect to a web site you need access over port 80. If you need access to a SQL Server you'll need access to port 1433.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
So supposedly they opened up the router through port 1433, but my connection still won't get through I was wondering how to test if the port actually is opened up using the telnet commance like mrdenny did. I tried my connection with this string
Code:
Conn.Open "Driver={SQL Server};Server=70.90.150.170, 1433;Database=ABSOLUTE;Uid=****;Pwd=****;"

but had no luck, this is driving me crazy!
 
Code:
Conn.Open "Provider=sqloledb;Data Source=70.90.150.170,1433;Initial Catalog=ABSOLUTE;User Id=***;Password=****;

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks for your help George, but No Luck this is the error I have been seing forever it seems like:
"Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

/Landing.asp, line 144
 
Ordinarily, you can test whether SQL Server is listening on the port by using the telnet command.

Click Start-> Run
CMD
Click OK

In the DOS window, type:
Telnet 70.90.150.170 1433
press Enter

If the SQL Server is listening to that port, then you will get a black window with a blinking cursor.

I ran the telnet command from here, and I got a blank window with a blinking cursor. So... It seems like the router and server are configured properly.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
THis is the line I had on the cmd window

C:\>Telnet 70.90.150.170 1433

and this is what it said:

'Telnet is not a recognized as an internal or external command, operable program or batch file
 
I am using the same exact connection string as I was before when it was working, then they had a router put in, and they just opened port 1433, is there anything else that could be keeping it? This is the same string as one from a page on the server locally, but with IP address changed and which port it should connect through.
 
Quote: They opened Port 1433. Are you positive SQL Server is using Port 1433? That IS the default, but it could be using a different port.

Second, I had asked previously if the client was part of a new domain and you never answered. Trusted authentication requires a common 'authenticator', normally a domain controller that both domains authenticate with.

-SQLBill

Posting advice: FAQ481-4875
 
No the domain is still the same as it was before, I access there internal site the same way with the same address. I will have to make sure the Port has not been changed.
 
The SQL Server at that IP is listing on port 1433. I can connect and get a password failure (since I don't have a valid account on that SQL Server).

It appears that someone at the web hosting side is not allowing access to the SQL Server.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top