shutterstock_184473665.jpg

Summit 7 Team Blogs

Modify Names of FAST Search Service Applications Databases

SharePoint loves GUIDS!

For some unexplained reason, the automated processes that create databases love to add the GUIDs to the names as if administrators could actually remember them.

There are many times when the complicated database names with the appended GUIDs created by the wonderful wizards and central administration pages need to be cleaned up with the databases renamed to something short and plain.

There are several posts available which are very useful for renaming standard SharePoint 2010 databases including those used by Search Service Applications:

While most of the information needed for SharePoint Search Service Applications can be found in these posts, FAST Search Service Applications present some unique issues. Since the databases used by the Content SSA are different from the those used by standard Search Service Applications, the SharePoint PowerShell scripts that create databases will fail if used to create databases for the FAST SSA.

I have collected information from the above posts and other sources and modified them as testing required for the databases used by the FAST Content SSA and FAST Query SSA.

I hope this post with consolidate instructions will be useful for those who need to modify the FAST SSA databases.

First, let's prepare the SQL databases.

Logon a computer that has SQL Server Management Studio installed and can access the SQL server hosting the SharePoint farm databases. Your logon account must have at least DBO rights on the FAST SSA databases.

Each FAST Search SSA has at least three databases as shown below:

The admin databases for each have the name with just "db_<GUID>."

We will be concerned with the admin databases and the PropertyStoreDB for the Content SSA. The other databases can be renamed in Central Administration.

For each database follow these instructions:

  1. Right click the database name to expose drop menu. Select Tasks > Backup.

?

The Backup Dialogue box opens:

 

  1. Accept defaults and click OK. After a short time the success message appears:

Note:
Database names in screenshots are representative and do not reflect actual names being used.
 

  1. Right click the database again and this time select Tasks > Restore which opens the Restore Dialogue box:

 

  1. In the To database box, remove the GUID and modify the name as required. Click OK. After a short time the success message appears:

Repeat steps 1 through 4 each database. I prefer to include "admin" in the admin database names for clarity.
The new databases should appear in SQL Manager:

 

I prefer to capture a screenshot to document new database names for future reference.

We must use PowerShell to change the FAST Search Service Applications to use the new Administration databases. Since the FAST Content SSA Property Database name is not exposed in the Central Administration UI, we must use PowerShell to rename it as well.

  1. Login as a SharePoint farm administrator on the SharePoint Server 2010 that hosts the FAST Service applications. Open the SharePoint Management Shell by clicking Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell > Run as administrator.
  2. In the
    SharePoint PowerShell console, enter the following command:

$searchapp = Get-SPEnterpriseSearchServiceApplication –identity "< FAST Content SSA >"

The prompt returns with no message.

  1. Enter the following command:

$searchapp

Information about SSA is returned. Confirm that correct SSA was selected.

 

  1. The database cannot be changed while the service is running. Enter the following command to pause the search application:

$searchapp.Pause()

Command returns "True".

 

  1. The new admin database name created earlier in SQL Enterprise Manager will be used for the < New FAST Content SSA Admin database name >.Enter the following command:

$searchapp | Set-SPEnterpriseSearchServiceApplication -DatabaseName "< New FAST Content SSA Admin database name > " –DatabaseServer "< dbServerName >"

Command line returns with no message.

  1. Enter the following command:

Get-spdatabase > C:workdirdatabases.txt

Note: this command assumes that the C:Workdir exists. Open the C:workdirdatabases.txt file in notepad. The file contents are in a format similar to:

 ?

  1. Locate the current property database for the FAST Content SSA. The full names are not exposed in the file, but the current name will have underscores between words in the name. The GUID Id will be used as the < Database Id > in the next command.
    The new property database name created earlier in SQL Enterprise Manager will be used for the < New FAST Content SSA Property database name >.
  2. Enter the following command:

Set-SPEnterpriseSearchPropertyDatabase –Identity "< Database Id >" -SearchApplication $searchApp -DatabaseName "< New FAST Content SSA Property database name >" -DatabaseServer "< dbServerName >"

The command line returns with no message.

 

  1. Enter the following command:

$searchapp.Resume()

After some time the command returns "True".

 

  1. Enter the following command:

Do {write-host -NoNewline .;Sleep 10; $searchInstance = Get-SPEnterpriseSearchServiceInstance -Local} while ($searchInstance.Status -ne "Online")

The command line will display a "." Every 10 seconds until all search components are in an online state.

Repeat steps 2 – 6 and 9 - 10 for the FAST Query SSA.

We can rename the crawl database in Central Administration.

  1. Open the Central Administration Home page, click General Application Settings and then under Search heading click Farm Search Administration to display this page:


 

  1. Click Modify Topology link for the FAST Content SSA name. Note that the Administration Database name has changed to the new shorter version without the GUID.

 


  1. Under Databases select the original
    Crawl database
    and from the drop down menu, click Edit properties:

 

  1. In the database name box, delete the GUID and the underscores in the name. Click OK. The database now appears on the Manage Search Topology page tagged as "Pending creation" in the Pending Changes column.


Note that crawl databases created manually after the service application was created do not have the GUID in the name.

  1. Click Apply Topology Changes. Progress dialogues will display for several minutes until the success dialogues displays:

 

  1. Close success report by clicking OK.
  2. The Search Management page for FAST Search Connector SSA opens with topology section at the bottom. Review new database names.

 

Return to the Farm Search Administration page and this time select Modify Topology for the FAST Query SSA. Following the steps above, rename the crawl and property databases as needed.

Unfortunately, the PowerShell scripts do not remove the references to the old database names from the SharePoint configuration database. The following steps will remove References to the old databases from ConfigDB:

  1. On SharePoint Server 2010, on the Central Administration Home page, click Upgrade and Migration and then within the Upgrade and Patch Management page, click Review database status. The Manage Databases Upgrade Status page opens displaying databases referenced in farm configuration:

 

  1. Note that some unused databases are still referenced and minimize browser for future use.
  2. Open the SharePoint Management Shell by clicking Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell > Run as administrator. ?
  3. In the SharePoint PowerShell console enter the following command:

Get-SPdatabase >> e:workdirbaddatabase.txt

This command assumes that E:Workdir folder exists. The baddatabase.txt file is created with content similar to:


  1. Open E:workdirbaddatabase.txt and remove listings for all databases not used by FAST SSAs. Identify databases with old names which are no longer being used. There should be three:
  • The old < FAST Connector SSA Admin database >
  • The old < FAST Connector SSA Property database >
  • The old < FAST Query SSA Admin database >

Note: While the complete names are not exposed, the old databases had underscores between all words and we removed them from the new names. Shortened list of databases remain with old databases highlighted:

  1. Copy the id (GUID) of the first old database and return to the PowerShell console. Enter the following command:

$DeleteDB = Get-SPdatabase "< copied GUID>

Command line returns with no message.

  1. Enter the following command to confirm that the appropriate database was selected:

$DeleteDB

The command line returns details on database selected:

 

  1. Enter the following command:

$DeleteDB.Delete()

Command line returns with no message.

?

Repeat steps 6 – 8 for each of the other two databases from step 5.

  1. Enter the following command to confirm the removal of the databases from the farm configuration database:

Get-SPdatabase

  1. Maximize browser with Manage Databases Upgrade Status page open and refresh page to show the removal of unnecessary database references.

The last steps are to clean up the SQL databases. Return to SQL Enterprise Manager and carefully delete ONLY the databases that you originally backed up and are no longer being used.

 

Disclaimer
The sample scripts are not supported under any Summit 7 Systems standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Summit 7 Systems further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Summit 7 Systems, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Summit 7 Systems has been advised of the possibility of such damages.

SHARE THIS STORY | |