I'm trying to understand how a SQL Server alias works, but the documentation is lacking to say the least.
Most blogs/videos/documents I can find state that all you need to do is go to SQL Server Configuration Manager and add an "Alias" under SQL Native Client Configuration / SQL Native Client Configuration (32 Bit), which points to the same port as the instance you want to create an alias for. And that's it, done, nothing else required.
Now unless the SQL Server is in a domain, and allowed to register its own SPNs and only Kerberos is being used (and assuming that an alias gets its SPN automatically registered, which I can't find any documentation to either confirm or refute this statement)... I can't really see how this is enough!
Assuming that either the SQL box is not on the domain, or that SPNs are not registered, if I create an alias called SQLTEST
for SQL1
on port 1433 and, from a different computer, try to access SQLTEST
bearing in mind the lack of SPNs the first thing the client will do is try to resolve SQLTEST
to an IP address - yet there's no DNS record for SQLTEST
.
So how does this actually work? What are the true requirements to get aliases working?
How does creating an alias differ from just creating 'A' or 'CName' records in DNS without actually creating an alias in SQL itself?