This project has moved and is read-only. For the latest updates, please go here.

SQL Aliases for a non-SQL type

Sep 13, 2012 at 4:53 PM

I am not a SQL guru and our DBA is is deployed (US Army).

Can someone explain what a SQL Alias is and why it is recommended.  I have gone the Google route but I am just not getting my head wrapped around it.


Sep 13, 2012 at 11:16 PM
Edited Sep 13, 2012 at 11:17 PM

In short you create an alias for your SQL server within SharePoint (on the SharePoint boxes) - this is client side. Example:

SQL Server: SQLDEV123


If you then look in SharePoint and database server, it will say SQLDEV - not SQLDEV123.

If something happens to SQLDEV123, you could easily restore all the databases on another SQL box with a different name and just update the alias on the SharePoint boxes. If you didn't have an alias you would either need to - build up another SQL box with the same name, or rebuild SharePoint to cater for the new SQL Server.

You should always use an alias. Really simple to setup and configure, AutoSPInstaller takes care of it for, and can save you heaps of time in the future.

Sep 17, 2012 at 2:05 PM

Thanks for the info.  That was exactly what I needed.

With autospinstaller, there is a lot of places to make an alias.  Do I need to create a new alias for each DB or can I just put them all under one alias.  If so, how would I do that with the script?

Sep 17, 2012 at 11:18 PM
Edited Sep 17, 2012 at 11:21 PM

You just do it at the start and that will work throughout the whole script. Your DB Server is then the alias, ie, SQLDEV123 and NOT the server name.

The reason for them throughout the script, depending on the SharePoint Farm setup - some databases might be on other SQL servers. Example: Search, UPS etc. or, they are required to be different names.


  <DBAlias Create="true" DBInstance="SQLSERVERHERE" DBPort=" " />
     The above is at the start of the file, if you don't need to change it - that should be the only time you need to enter it.
   If you are creating an alias (recommended!), <DBServer> is actually the value of the SQL alias; otherwise it's the NetBIOS name of the SQL server or instance. 
    If you leave <DBServer> blank throughout the script, the default DBServer value for the farm is used. The above appears throughout the script, it will use <DBServer> from the start.