Create a SQL Alias

Moving / Migrating Microsoft SharePoint Server Databases from one server to another might be difficult as you need to reconfigure all the related DB(s) to point at the new server. For this reason having SharePoint connect to a SQL Alias instead of the NetBIOS name is always a good idea.

The main benefit is, if you ever have to switch the SQL Server or connect to a SQL Cluster VIP address, you just change the Alias to point to the SQL Cluster name on the SharePoint Server and restart the SharePoint Timer Service and you are good to go. This can save huge amount of time and headache.

Follow the steps below to create a SQL Alias on all your SharePoint Servers:

Go to Start >> Run >> Type CliConfg.exe and the below screen will appear:

al1

Select the Alias Tab and click Add:

al2

Select TCP/IP from the Network Libraries and Enter the following Values:

Server Alias: This is the Old SQL Server Network Name

Server Name: This is the New SQL Server Name Network Name

  • In Case of SQL Server FCI then this could be the cluster name
  • In Case of SQL Server AlwaysOn AG this could be the SQL Listener Name

Port Number (if needed)

al3

Last step is validate SQL Alias

  • Create a new text file on SharePoint Server and name it “TestDBConnection.udl”
  • Double click to open the file and enter your SQL Server Alias name
  • Use Windows Integrated Security
  • You should be able to see all your SharePoint databases when you click on “Select the database on the Server”

And that’s its, you will see the new SQL Server Alias added as shown and you are ready to start using the new Database.

Hope it helps!

Advertisements

One thought on “Create a SQL Alias

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s