Sunday, March 25, 2012

Renaming an instance of SQL Server

If you have ever renamed a host computer AFTER installing SQL Server on the machine, you may encounter some issues with connectivity to the database server after the host rename.

If you are simply using it as a development box, most .Net development connection strings will use something like (local) OR (local)\SQLExpress.  However, products like SharePoint 2010 do not support the use of (local) for database connectivity.  Therefore, you have to use the actual host name of the SQL Server when establishing database connections.

Well, unfortunately, applications like SharePoint generally use the following query to determine the actual SQL Server host name: "SELECT @@SERVERNAME".

Well, if you have recently renamed your computer, then the result returned by this query will return the old host name rather than the new host name.

Therefore, you will need to follow the directions described in this MSDN article to resolve this issue:  http://msdn.microsoft.com/en-us/library/ms143799.aspx

Once you have done that, applications such as SharePoint 2010 should now properly recognize the SQL Server host name during the installation process.


No comments:

Post a Comment