Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ramzex
Starting Member
3 Posts |
Posted - 2007-11-24 : 14:29:29
|
We want to move one of the sql servers to a new box.We have created and copied the databases to the new server and everything works well.The problem is that users on the old server use "localhost" as hostname for the sql connection in their scripts.I stopped the sql server on the old box, and I added a TCP/IP alias to the new server, but it does not work.Websites get refused connection error.I think the alias does not work and scripts are trying to connect to the old server.What could be the problem?I tested it some months ago, and it worked fine...Any idea?Thanks. |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-11-24 : 14:54:49
|
I doubt if you can alias localhost, it's a "built-in" name so it's going to bypass your alias. You need to change the server name to the new server name in their connection strings, it's not a great idea for them to be using localhost in the first place.You should be able to do a search and replace on the scripts so it shouldn't be difficult to do. |
 |
|
ramzex
Starting Member
3 Posts |
Posted - 2007-11-24 : 15:49:27
|
Is there any other solution except changing the "localhost" with the IP?I have about 1500 websites using "localhost", and it will be a little difficult to search and replace so many files. |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-11-24 : 21:28:25
|
Unless you move user apps to new sql server. |
 |
|
ramzex
Starting Member
3 Posts |
Posted - 2007-11-26 : 08:03:47
|
Found a solution.I setup a port forwarding service, so that incoming connections to port 1433 are forwarded to the remote server. |
 |
|
|
|
|