Domanda

Unknowingly,I have deleted search service application from a SharePoint standalone system.Now there is no option to create new search service application. In new option of Manage Service Application Page there is no entry called search service application.

Please help.

È stato utile?

Soluzione

as this is foundation so there is no way to create the search service via manage Service Application from Central admin. Only way is using the Config Wizard or you can try below powershell.

#Start the search service instance on the server
Start-SPEnterpriseSearchServiceInstance $env:computername 
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $env:computername

#Give a unique name to your search service application
$serviceAppName = "MyCleanDB Search Service Application"

#Get the application pools to use (make sure you change the value for your environment) 
$svcPool = Get-SPServiceApplicationPool "SharePoint Web Services Default" 
$adminPool = Get-SPServiceApplicationPool "SharePoint Web Services Default"

#Get the service from the service instance so we can call a method on it
$searchServiceInstance = Get-SPEnterpriseSearchServiceInstance –Local
$searchService = $searchServiceInstance.Service

#Define your unique DB names without the guids
$adminDB = "Search_Service_Application_DB"
$propertyStoreDB = "Search_Service_Application_PropertyStoreDB"
$crawlStoreDB = "Search_Service_Application_CrawlStoreDB"
$analysticsStoreDB = "Search_Service_Application_AnalyticsStoreDB"
$linkStoreDB = "Search_Service_Application_LinkStoreDB"

#Since this method takes in the value of object type Microsoft.SharePoint.Administration.SPDatabaseParameters we will create these from our clean DB names
$adminDBParameters = [Microsoft.SharePoint.Administration.SPDatabaseParameters]::CreateParameters($adminDB,"None")
$propertyDBParameters = [Microsoft.SharePoint.Administration.SPDatabaseParameters]::CreateParameters($propertyStoreDB,"None")
$crawlStoreDBParameters = [Microsoft.SharePoint.Administration.SPDatabaseParameters]::CreateParameters($crawlStoreDB,"None")
$analyticsStoreDBParameters = [Microsoft.SharePoint.Administration.SPDatabaseParameters]::CreateParameters($analysticsStoreDB,"None")
$linkStoreDBParameters = [Microsoft.SharePoint.Administration.SPDatabaseParameters]::CreateParameters($linkStoreDB,"None")

#Create the search service application by calling the function
$searchServiceApp = $searchService.CreateApplication($serviceAppName, $adminDBParameters, $propertyDBParameters, $crawlStoreDBParameters, $analyticsStoreDBParameters, $linkStoreDBParameters, [Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool]$svcPool, [Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool]$adminPool)

#Create the search service application proxy as usual (luckily PowerShell for this works and is bot blocked)
$searchProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$serviceAppName Proxy" -SearchApplication $searchServiceApp
#Provision the search service application 
$searchServiceApp.Provision()

Once the above code completed sucessfully then run the below to start topology.

#Get an updated handle on the SearchServiceInstance
$searchServiceInstance = Get-SPEnterpriseSearchServiceInstance –Local
#Now we will call the method to initiate the default topology component creation using reflection
$bindings = @("InvokeMethod", "NonPublic", "Instance")
$types = @([Microsoft.Office.Server.Search.Administration.SearchServiceInstance])
$values = @([Microsoft.Office.Server.Search.Administration.SearchServiceInstance]$searchServiceInstance)
$methodInfo = $searchServiceApp.GetType().GetMethod("InitDefaultTopology", $bindings, $null, $types, $null) 
$searchTopology = $methodInfo.Invoke($searchServiceApp, $values)

read more about this on this: Provision Search for SharePoint Foundation 2013 using PowerShell with clean DB names

Altri suggerimenti

It seems that the ONLY way you can add the Search Service to SharePoint Foundation 2013 is by using the SharePoint Configuration Wizard like so (you can’t even do it with PowerShell! ):

enter image description here

Visit the SharePoint Central administration site and select Configuration Wizards from the Quick Launch Menu on the left hand side.

enter image description here

Press the Start the Wizard button.

enter image description here

Select the account you wish to use for this service. It is always better to have one already created than try and create a new one on the fly here.

Scroll down for more options.

enter image description here

If you want just the Search Service Application then uncheck everything else and press the Next button.

enter image description here

SharePoint will bring out the traffic cones briefly while the service is configured.

enter image description here

You’ll then be asked to create a Site Collection, but since one has normally be created previously during the manual creation of SharePoint Foundation 2013, press the Skip button.

enter image description here

You should now see in the summary page that a Search Service Application has been configured. Interestingly, you’ll note that the following additional service have also been configured (even though they were unselected!):

  • Usage and Health Data Collection Service Application

If you press the Finish button and have then have a look at the Service Applications you should see:

enter image description here

Then if you have a look at Services on Server you’ll see:

enter image description here

Where you should now see that the SharePoint Server Search (at the bottom of the screen shot above) is now Started!

All credits to the blog post here

Follow the below steps:

  • Go to Central Administration Home Page
  • Launch the Farm Configuration Wizard
  • Click Start the Wizard
  • If need then add new service account, and select the Search service Application
  • Click Next

It will prompt for new site creation, Click the Cancel button.

Now your Search Service application is created.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top