EnterpriseSearch database not working with named SQL instance

Nov 4, 2011 at 6:51 PM

I just wanted to post this out there in case anyone else runs across it.

First off, THANKS for an awesome script.  I can't tell people how important it is that you not do random GUI things in a highly controlled production environment, and your script is the beginning of a well-governed production farm.  (Not to mention the easy setup of development and qa farms!)

However, we use clustered SQL servers, and most are with named instances.  I had AutoSPInstaller create the alias, and all seemed well until EnterpriseSearch was trying to be configured.  It would create FARM_EnterpriseSearch on the SQL side, but then fail.  (Yes, I ensured that PROD_EnterpriseSearch did NOT exist at start time)

- Creating Search Service Application...New-SPEnterpriseSearchServiceApplication : A SharePoint database named PROD_EnterpriseSearch already exists.  You must supply another name for the new database.

In my XML, I had specified  

  <EnterpriseSearchServiceApplication Name="Search Service Application"
                                                    DatabaseServer="SQLCLUSTER05\SQL05"
                                                    DatabaseName="EnterpriseSearch"
                                                    FailoverDatabaseServer=""  etc

 

Fix: It wasn't until I created a SQL Alias in CLICONFIG (well I used "SQL Server Configuration Manager-SQL Native Client 10.0 configuration-Aliases") and created an alias WITHOUT the "server/instance" as the Alias Name - in my case, I created Alias=SQL5, server=sqlcluster05\sql05 port=xxxxx

then I replaced that in the XML

  <EnterpriseSearchServiceApplication Name="Search Service Application"
                                                    DatabaseServer="SQL05"
                                                    DatabaseName="EnterpriseSearch"

and the script runs to completion, happy farm!

Hope this saves someone time when doing a SQL clustered installation..