Why CNAMEs are great for SQL migrations
- sqldba

- Aug 17, 2018
- 1 min read
Updated: Dec 11, 2025
See how using CNAMEs during SQL migrations can reduce risk and save time with fever reconfiguration needed.

Migrations are full of risk and CNAMEs offer a great way to mitigate some of that risk. It also saves a lot of time and reduces overall configuration complexity.
If you are brave enough to do in-place upgrades then this one isn't for you though.
For the rest of us however there is a simple way to point all the old server names to your brand new SQL installation, just use CNAMEs.
Imagine a SQL migration. After migrating all content off SQL servers marked for deprecation, you now need to go reconfigure all your applications and clients connecting to that old server.
It sounds painful, and luckily there is an easier way.
1. Simply rename the old server (let's call it OLDSQL1) to a new name(OLDSQL1_OLD works well)
2. Add a new CNAME record in DNS using the old server name that points to the SQL AG listener(SQLTARGET1).
3. Now requests for OLDSQL1 go to SQLTARGET1 instead of the old server. Magic.
“Your DNS server will now route all traffic looking for the old server, SERVER, to the SQL Listener you configure in the CNAME.”
This does not work with named instances though, as you will have to create the same named instances in your new environment.
This also does not wok with IPs.




Comments