Accessing SQL Server 2005 Over the Web after Port Change

I need to access a SQL Server 2005 database over the web.

This worked fine before by simply using the IP address of the server that hosted SQL.

For security reasons the port was changed to 666 and I just assumed that the server name would change to nn.nn.nn.nn:666 but this doesn't work.

Can anyone suggest what I need to do to access SQL on the server.
VFPSQLDeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brejkCommented:
In connection string use the following format of IP address and port:

nnn.nnn.nnn.nnn,666
0
VFPSQLDeveloperAuthor Commented:
Unfortunatley that still doesn't work.

I'm testing this by creating a test.udl on the desktop and entering the server name and login and password etc.
0
brejkCommented:
Please provide the error message you're getting.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

brejkCommented:
1) Is the SQL Server using SQL Server and Windows authentication?
2) Is firewall open for 666 TCP port on the server?
0
VFPSQLDeveloperAuthor Commented:
The error message is the standard 'I can't connect' message:

Test connection failed because of an error in initializing provider. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

1) I'm just using SQL authentication (e.g. login and pasword).
2) A website uses port 666 (e.g. URL re-driected to IP and port) but I'm not sure how to check if it's enable for TCP.


0
brejkCommented:
So finally this port 666 refers to your website or SQL Server? Cause now I really don't know...
0
VFPSQLDeveloperAuthor Commented:
Sorry if I wasn't clear.
A customer hosts their own web site on their own server in their own offices, which includes a database running under a SQL 2005 instance on the same box.
The URL was purchased and this gets re-directed to the IP address of this server, which works fine.
For security reasons the port for the web site access on the server was changed to 666.
So the URL gets re-directed to nnn.nnn.nnn.nnn:666, which also works fine.
I need to remotely access the database and assumed I could use nnn.nnn.nnn.nnn:666 for the server name, but this does not work.
0
brejkCommented:
Ok, now I see. First you need to find out if you are able to access the database server via TCP/IP (this protocol can be disabled to prevent remote access to the databases). If you are able to access SQL Server via TCP/IP then you need to know the TCP port of SQL Server (for default instances it can be 1433 but the administrator may change it) and be sure that the firewall will let the communication to this port through. When you know the port and you know that you are able to connect to SQL Server (I imagine few people in the world would put SQL Server for direct access from the Internet...) then connect to the database server using the following format:

tcp:SERVERNAME,TCPPort
0
VFPSQLDeveloperAuthor Commented:
Ok, I tried tcp:SERVERNAME,TCPPort (assuming tcp was the IP address) with 1433 and 66 as the port and neither of these worked.
I looked in Configuration manager and it says TCP/IP is Active for IP1 & 2 but not Enabled. If I enable these there is no port showing. Should I be changing these values?
0
brejkCommented:
Set the TcpPort for IPAll to some static port (1435 for example). Set TCP Dynamic Ports to empty everywhere. Then restart SQL Server service and try again to connect to the server (using TCP 1435 port).
0
VFPSQLDeveloperAuthor Commented:
IpAll has TCP Dynamic Ports and (which has 1361 ub it) and TCP Port (empty) which should I use?
0
brejkCommented:
Try this 1361 port but remember that with TCP Dynamic Ports set on the instance can change the port everytime the service starts again.
0
VFPSQLDeveloperAuthor Commented:
This is going from bad to worse!
I can't re-start the service. It says 'Unable to start the service' 'The xxxx service was started then stopped (object explorer)'.
I returned all the TCP/IP settings back whre they were and it re-started!


0
brejkCommented:
What did you set in Configuration Manager?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VFPSQLDeveloperAuthor Commented:
I enabled IP1 & IP2 and set TCP Port in IPAll to 1361
0
VFPSQLDeveloperAuthor Commented:
Hi brejk,
I really need to get this working.
What do you think I should do to get adviceon how to achieve this? It must be possible somehow!!
Chris
0
NetocratCommented:
Go to www.elance.com and hire an experienced Windows administrator. He will fix it in 20 minutes and about $30. It seems to be the best way if you need it to be done asap.
0
VFPSQLDeveloperAuthor Commented:
Funnily enough I just did the same with a PHP installation problem (connected to the same project) with RentaCoder.
It was 30$ and the guy fixed it in under an hour. I paid him a 30$ bonus and we were both happy!

If no-one objects I'll split point between brejk for trying to help and Netocrat for good advice.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.