sql server alias for clients

  • Thread starter Thread starter Paolo Liverani
  • Start date Start date
P

Paolo Liverani

I have some programs (written in vb6 & vb.net) that connect to sql server on
a W2k machine.
I should change the machine (moving to a new one) but for a few days the two
machine will co-exist so I cannot give to the new machine the name of the
old one. I would like to have the programs accessing sql with a dummy alias
(ideally set in the dns or in Active Directory) so that I would be able to
move sql to any other machine without having to change anything on every
single client.
Regards,
Paolo Liverani
 
Hi Paolo,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to move a database on the
server to a new one, and need the clients access the new SQL server
transparently. If there is any misunderstanding, please feel free to let me
know.

As far as I know, we cannot achieve this without making configurations on
the client side. I think there are two ways to make the client application
point to the new server. (Assume that the old server name is A and new
server name is B.)

1. Modify the connection string in the client application like this: Data
Source = B;
2. If you have SQL client utilities installed on the client machine, you
can create alias for server B.
1) Start Client Network Utility from the start menu.
2) In the Alias tab, click Add button.
3) In Server Alias textbox, type "A" (without quotes) as alias, and type
"B" (without quotes) in the Server Name textbox. Click OK.
Thus, we create an alias for server B. All the applications on this client
machine which accesses server A will be redirected to server B.

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Kevin,
your understanding is quite correct.
The only thing that I do not like is that both of your suggestions are
exactly what I would like to avoid (i.e. having to change anything in each
client).
I was hoping that there could be something like registering aliases in dns
servers.
Anyway I was already trying to have solution B deployed through the policies
(from what I see is only a matter of a key in the registry).
Regards,
Paolo
 
Hi Paolo,

Based on my research, this cannot be achieved by server side
configurations. Registering alias on DNS requires the old server removed
from the network and I think that's impossible. The simplest way might be
giving the new machine the name of the old one. And rename the old machine
with another name. If this cannot be done either, I'm afraid the only way
is to modify the clients. I'm sorry for the inconvenience.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Kevin,
I understand that I cannot register a dns alias for the old machine
without actually removing it, but what I would like to have (now) is finding
the better (and fastest) way to get the move done for the next time.
Can you confirm that:
- creating a new alias (lets's say SQL-SRV) pointing to an ip address of a
W2k server running SQL server
- having the programs in the clients pc pointing to SQL-SRV
allow me to have the programs using the SQL server on the machine pointed
from SQL-SRV?
Regards,
Paolo
 
As long as the clients are connecting using the host name and not the IP
address you should be able to do this with a DNS change.

Mike O.
 
Hi Paolo,

Assume that the old server name is A and the new server is B. If we need to
redirect all the clients accessing A to B, the only thing we can do is to
register an alias 'A' on DNS for B. However, this requires that server A to
be removed from the network, because there can be only one server which 'A'
stands for available. So I don't think this can be achieved with both A and
B available and without modifying the clients. A faster and easiest way
might be rename B to A and rename A to C. HTH. :-)

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Ok, so what I am going to do is the following
- creating a 'C' alias pointing to 'B' (the new machine)
- modify clients to point to 'C'
so that next time I will only need to change the 'C' alias on the dns
server.
Thank you Kevin.
Paolo
 
Hi Paolo,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top