During the Add Farm operation you can meet such error

The SharePoint SQL database server cannot be reached at ams-w2k8moss. Please verify that the firewall does not block SQL Server ports on ams-w2k8moss and ams-w2k8sp2010. SQL aliases used on SharePoint front-end servers must also be configured for ams-w2k8sp2010.

db-cannot-be-reached.PNG

This is caused by the fact that SQL Server is configured to listen on a specific(non-default) TCP port. One of the ways to connect to a specific port with Site Administrator for SharePoint is creating an alias on the client, specifying the port number using SQL Server Configuration Manager. It is a snap-in for the Microsoft Management Console program and not a stand-alone program. If you don't have this tool installed you can do it from the SQL Server setup. For example for SQL 2008 you just have to select "Client Tools Connectivity". It's necessary to do it on the client machine, where the Site Administrator is insalled. To open SQL Server Configuration Manager, in the Search charm, type SQLServerManager11.msc (for SQL Server 2012) or SQLServerManager10.msc for (SQL Server 2008), and then press Enter.  Then follow next instructions:

  • In SQL Server Configuration Manager, expand SQL Server Native Client Configuration, right-click Aliases, and then click New Alias.
  • In the Alias Name box, type the name of the alias. It's should be Client applications use this name when they connect.
  • In the Server box, type the name or IP address of a server. For a named instance append the instance name.

sql-server-alias.PNG

After that the error will go away.

PS.

If you don't have SQL Server Configuration Manager you can use another tool cliconfg.exe, but it's necessary to execute 32bit version C:\Windows\SysWOW64\cliconfg.exe.

sql-server-alias-2.PNG