CA->Application Management->Configure service application associations (Service applications)
select the application you need to configure.
select custom from the drop down list and check the service application you and click ok.
Tuesday, October 30, 2012
The search service is not able to connect to the machine...
Hi Folks,
Following are the some useful Powershell cmdlets for reference
Script to Remove SharePoint 2010 Search Service Application
$SearchServiceApplication = Get-SPServiceApplication |?{$_Name -eq "Search Service Application"}
Remove-SPSericeApplication -Identity $SearchServiceApplication.Id -RemoveData
If it Still didn't work, you can you the following command
stsadm.exe deleteconfigurationobject -id "GUID of the SearchService Application"
To obtain the GUID of the Search Service Application From the UI Navigate to the service applications page. Mouse-over the search application link, and observe the id in the status bar.
Remove Database reference
Get-SPDatabase | ft Name, Id
$DatabaseToDelete = Get-SPDatabase {GUID of the database to delete}
$DatabaseToDelete | ft Name, Id
$DatabaseToDelete.Delete()
Get-SPDatabase | ft Name, Id
DeleteService Applicaqtion Application pool
Get-SPServiceApplicationPool | Select Id, Name
$AppPoolToDelete = Get-SPServiceApplicationPool -Identity "NameOfTheServiceApplicationPool"
Remove-SPServiceApplicationPool $AppPoolToDelete
Get-SPServiceApplicationPool | Select Id, Name
Following are the some useful Powershell cmdlets for reference
Script to Remove SharePoint 2010 Search Service Application
$SearchServiceApplication = Get-SPServiceApplication |?{$_Name -eq "Search Service Application"}
Remove-SPSericeApplication -Identity $SearchServiceApplication.Id -RemoveData
If it Still didn't work, you can you the following command
stsadm.exe deleteconfigurationobject -id "GUID of the SearchService Application"
To obtain the GUID of the Search Service Application From the UI Navigate to the service applications page. Mouse-over the search application link, and observe the id in the status bar.
Remove Database reference
Get-SPDatabase | ft Name, Id
$DatabaseToDelete = Get-SPDatabase {GUID of the database to delete}
$DatabaseToDelete | ft Name, Id
$DatabaseToDelete.Delete()
Get-SPDatabase | ft Name, Id
DeleteService Applicaqtion Application pool
Get-SPServiceApplicationPool | Select Id, Name
$AppPoolToDelete = Get-SPServiceApplicationPool -Identity "NameOfTheServiceApplicationPool"
Remove-SPServiceApplicationPool $AppPoolToDelete
Get-SPServiceApplicationPool | Select Id, Name
ShrarePoint Search 2010 Administration Component not responding
Hi Folks,
I ran the following ugly error in SharePoint 2010 Search Administration Screen today. After lot of googling, many suggested to rebuild the farm, re-run configuration wizard, re-create search application. But the error can be resolved by the Simple stsadm command
Scenario: Search is not working, Admin Components couldn't connect and not able to view the topology
Problem: The search service is not able to connect to the machine that hosts the administration component. verify that the administration component '########-####-####-####-###########' in search application 'search service application' is in a good state and try again.
Resolution: Run the following stsadm command
stsadm -o provisionservice -action start -servicename osearch14 -servicetype "Microsoft.Office.Server.Search.Administration.SearchService, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
do a simple iisreset /noforce
Thats it!!! it will start working!!!
I ran the following ugly error in SharePoint 2010 Search Administration Screen today. After lot of googling, many suggested to rebuild the farm, re-run configuration wizard, re-create search application. But the error can be resolved by the Simple stsadm command
Scenario: Search is not working, Admin Components couldn't connect and not able to view the topology
Problem: The search service is not able to connect to the machine that hosts the administration component. verify that the administration component '########-####-####-####-###########' in search application 'search service application' is in a good state and try again.
Resolution: Run the following stsadm command
stsadm -o provisionservice -action start -servicename osearch14 -servicetype "Microsoft.Office.Server.Search.Administration.SearchService, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
do a simple iisreset /noforce
Thats it!!! it will start working!!!
Tuesday, February 14, 2012
SharePoint 2010 Search Administration Reports Not Working
Hi Folks,
Today I came across an unusual error while viewing "Administration Reports" under "Reports" section in "SharePoint 2010 Search Service Application".
I clicked on Administration Reports->"Search administration reports" folder->Clicked on the following reports
CrawlRatePerContentSource-> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetCrawlRatePerContentSource'".
CrawlRatePerType-> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetCrawlRatePerType'".
QueryLatency-> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetQueryLatency'".
QueryLatencyTrend -> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetQueryLatencyTrend'".
SharePointBackendQueryLatency -> Resulted in error. Error description as "Could not find stored Procedure 'dbo.Search_GetSharePointBackendQueryLatency'".
I traced the query in SQL Profiler. The queries are being submitted to the SQL Server against the database "WSS_UsageApplication" and went ahead to look for the stored procedures which SharePoint was referring as missing, to my surpise the stored procedures doesn't exists.
After digging around for a while, I identified there is a SharePoint Job named as "Search Health Monitoring - Trace Events" to be enabled and scheduled to get the reports and the data. Once I enabled this Job the relevant missing stored procedures are automatically created in "WSS_UsageApplication" database and reports started working :)
Scenario: Unable to view SharePoint 2010 Administration Reports for Search
Problem: Timer Job "Search Health Monitoring - Trace Events" not enabled
Resolution: Enable the timer Job "Search Health Monitoring - Trace Events"
Other relevant links: http://social.msdn.microsoft.com/Forums/is/sharepoint2010general/thread/9ff7086b-6fd1-428a-9def-229f25c4c5d5
Today I came across an unusual error while viewing "Administration Reports" under "Reports" section in "SharePoint 2010 Search Service Application".
I clicked on Administration Reports->"Search administration reports" folder->Clicked on the following reports
CrawlRatePerContentSource-> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetCrawlRatePerContentSource'".
CrawlRatePerType-> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetCrawlRatePerType'".
QueryLatency-> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetQueryLatency'".
QueryLatencyTrend -> Resulted in error. Error description as "Could not find stored procedure 'dbo.Search_GetQueryLatencyTrend'".
SharePointBackendQueryLatency -> Resulted in error. Error description as "Could not find stored Procedure 'dbo.Search_GetSharePointBackendQueryLatency'".
I traced the query in SQL Profiler. The queries are being submitted to the SQL Server against the database "WSS_UsageApplication" and went ahead to look for the stored procedures which SharePoint was referring as missing, to my surpise the stored procedures doesn't exists.
After digging around for a while, I identified there is a SharePoint Job named as "Search Health Monitoring - Trace Events" to be enabled and scheduled to get the reports and the data. Once I enabled this Job the relevant missing stored procedures are automatically created in "WSS_UsageApplication" database and reports started working :)
Scenario: Unable to view SharePoint 2010 Administration Reports for Search
Problem: Timer Job "Search Health Monitoring - Trace Events" not enabled
Resolution: Enable the timer Job "Search Health Monitoring - Trace Events"
Other relevant links: http://social.msdn.microsoft.com/Forums/is/sharepoint2010general/thread/9ff7086b-6fd1-428a-9def-229f25c4c5d5
Thursday, January 26, 2012
SharePoint 2010 Central Administration shows HTTP 404 Error after Installation
Hello Folks,
I have built lot of SharePoint Farms in my project. But came across with a new issue in IIS after the installation of first Application Server hosting Central Administration. Installation went successful oh la la!!! but there are other worries waiting for me when I tried to access SharePoint 2010 Central Administration page.
Guess what, it displayed a very simple page with a "HTTP 404 Error". I started to wonder what screwed up in the installation which caused Central Admin site to break. I quickly verified my log files all seems to be fine and cool.
I turned to the basics of Web sites and IIS, leaving SharePoint concepts and shifted my attention to verify IIS settings. Again as expected IIS is the culprit and got to know something new this time called "HTTP Verbs".
HTTP Verbs are the one responsible to allow or deny HTTP requests for the Web Server via Request Filtering
I verified the HTTP Verbs in some of the other Farms and added the following HTTP Verbs to be processed in IIS-> Request Filtering settings in my server
GET
POST
HEAD
CONNECT
PUT
DELETE
TRACE
OPTIONS
Problem: SharePoint Central Admin Page diplays HTTP 404 Error after Installation
Cause: HTTP Verbs are not configured to allow in IIS
Resolution: Go to the server where SharePoint Central Admin is hosted, Start -> Run -> Type inetmgr -> Click OK -> Expand Server_Name -> Expand Sites -> Click Web Application -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on HTTP Verbs->Click Allow from the top right corner and enter GET and click OK. Repeat the same steps to allow other verbs POST, HEAD, CONNECT, PUT, DELETE, TRACE, OPTIONS and Central Administration started to load properly
Note: If you require, future web applications not to face this issue, then the settings has to be applied to the IIS level as well. Following are the steps to apply the same
Go to the server where SharePoint Central Admin is hosted, Start -> Run -> Type inetmgr -> Click OK -> Click on Server_Name -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on HTTP Verbs->Click Allow from the top right corner and enter GET and click OK. Repeat the same steps to allow other verbs POST, HEAD, CONNECT, PUT, DELETE, TRACE, OPTIONS
Hope this helps!!!
I have built lot of SharePoint Farms in my project. But came across with a new issue in IIS after the installation of first Application Server hosting Central Administration. Installation went successful oh la la!!! but there are other worries waiting for me when I tried to access SharePoint 2010 Central Administration page.
Guess what, it displayed a very simple page with a "HTTP 404 Error". I started to wonder what screwed up in the installation which caused Central Admin site to break. I quickly verified my log files all seems to be fine and cool.
I turned to the basics of Web sites and IIS, leaving SharePoint concepts and shifted my attention to verify IIS settings. Again as expected IIS is the culprit and got to know something new this time called "HTTP Verbs".
HTTP Verbs are the one responsible to allow or deny HTTP requests for the Web Server via Request Filtering
I verified the HTTP Verbs in some of the other Farms and added the following HTTP Verbs to be processed in IIS-> Request Filtering settings in my server
GET
POST
HEAD
CONNECT
PUT
DELETE
TRACE
OPTIONS
Problem: SharePoint Central Admin Page diplays HTTP 404 Error after Installation
Cause: HTTP Verbs are not configured to allow in IIS
Resolution: Go to the server where SharePoint Central Admin is hosted, Start -> Run -> Type inetmgr -> Click OK -> Expand Server_Name -> Expand Sites -> Click Web Application -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on HTTP Verbs->Click Allow from the top right corner and enter GET and click OK. Repeat the same steps to allow other verbs POST, HEAD, CONNECT, PUT, DELETE, TRACE, OPTIONS and Central Administration started to load properly
Note: If you require, future web applications not to face this issue, then the settings has to be applied to the IIS level as well. Following are the steps to apply the same
Go to the server where SharePoint Central Admin is hosted, Start -> Run -> Type inetmgr -> Click OK -> Click on Server_Name -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on HTTP Verbs->Click Allow from the top right corner and enter GET and click OK. Repeat the same steps to allow other verbs POST, HEAD, CONNECT, PUT, DELETE, TRACE, OPTIONS
Hope this helps!!!
Wednesday, January 25, 2012
SharePoint 2010 - People Picker displays blank page
Hi,
Last week I came across an issue where SharePoint 2010 People Picker displayed a "Blank Page" instead of displaying the users. It was very strange as other SharePoint Pages were working fine. We have built lot of SharePoint 2010 farms before and never faced this issue, so that gave us a clue to rule out possible errors in SharePoint 2010. The other two bits which need to verify are windows firewall or IIS Settings.
Windows firewall - Should not be an issue as All pages in the server accessed via same port and other pages are working fine.
IIS Settings - hmm ya interesting to notice SQL Injection Settings applied on IIS Server. It was applied as part of Organization policy to block any SQL Query attacks to Databases via Query Strings. There was something bothering to proceed before confirming is SharePoint 2010 if fool proof enough to remove this settings. After googling around I found an article from MSDN which clarifies the same.
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/6b48e7ac-a393-48b4-ba24-6e56cd8b7ebc/
Once we removed the SQL Injection Settings from IIS on all the Web Front Ends. People Picker started to return expected results
Problem: People Picker returns Blank Page
Cause: SQL Injection Settings applied on the IIS
Resolution: Go to all Web Servers, Start -> Run -> Type inetmgr -> Click OK -> Expand Server_Name -> Expand Sites -> Click Web Application -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on Rules -> Click on Rules related to SQL Injection (name can be anything defined, most probably it will deny certain strings which has SQL Keywords in Query Strings) -> Either remove the rule completely or remove the denied strings within the rule Whichever is applicable. Repeat the steps for all the Web Front Ends, This will resolve the issue.
Note: If you require, future web applications not to face this issue then the settings has to be applied to the IIS level as well. Follow the following steps to apply the same
Go to all Web Servers, Start -> Run -> Type inetmgr -> Click OK -> Click on Server_Name -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on Rules -> Click on Rules related to SQL Injection (name can be anything defined, most probably it will deny certain strings which has SQL Keywords in Query Strings) -> Either remove the rule completely or remove the denied strings within the rule Whichever is applicable. Repeat the steps for all the Web Front Ends, This will make sure all future web applications will not face this issue.
Other Issues related:
The same issue is applicable while accessing "View All Site Collections Page" in SharePoint 2010 Central Administration Screen. SharePoint Central Admin ->
Application Management-> View All Site Collections.
Precuation:
The fix is for SharePoint 2010 Out of the box pages which are confirmed from MSDN that there are no vulnerable SQL Injection attacks by the Product. However for custom solutions or custom pages deployed in SharePoint 2010, it is responsiblity of the Deployment team to review this settings for custom code and approve it to be deployed.
Hope this helps!!!
Last week I came across an issue where SharePoint 2010 People Picker displayed a "Blank Page" instead of displaying the users. It was very strange as other SharePoint Pages were working fine. We have built lot of SharePoint 2010 farms before and never faced this issue, so that gave us a clue to rule out possible errors in SharePoint 2010. The other two bits which need to verify are windows firewall or IIS Settings.
Windows firewall - Should not be an issue as All pages in the server accessed via same port and other pages are working fine.
IIS Settings - hmm ya interesting to notice SQL Injection Settings applied on IIS Server. It was applied as part of Organization policy to block any SQL Query attacks to Databases via Query Strings. There was something bothering to proceed before confirming is SharePoint 2010 if fool proof enough to remove this settings. After googling around I found an article from MSDN which clarifies the same.
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/6b48e7ac-a393-48b4-ba24-6e56cd8b7ebc/
Once we removed the SQL Injection Settings from IIS on all the Web Front Ends. People Picker started to return expected results
Problem: People Picker returns Blank Page
Cause: SQL Injection Settings applied on the IIS
Resolution: Go to all Web Servers, Start -> Run -> Type inetmgr -> Click OK -> Expand Server_Name -> Expand Sites -> Click Web Application -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on Rules -> Click on Rules related to SQL Injection (name can be anything defined, most probably it will deny certain strings which has SQL Keywords in Query Strings) -> Either remove the rule completely or remove the denied strings within the rule Whichever is applicable. Repeat the steps for all the Web Front Ends, This will resolve the issue.
Note: If you require, future web applications not to face this issue then the settings has to be applied to the IIS level as well. Follow the following steps to apply the same
Go to all Web Servers, Start -> Run -> Type inetmgr -> Click OK -> Click on Server_Name -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on Rules -> Click on Rules related to SQL Injection (name can be anything defined, most probably it will deny certain strings which has SQL Keywords in Query Strings) -> Either remove the rule completely or remove the denied strings within the rule Whichever is applicable. Repeat the steps for all the Web Front Ends, This will make sure all future web applications will not face this issue.
Other Issues related:
The same issue is applicable while accessing "View All Site Collections Page" in SharePoint 2010 Central Administration Screen. SharePoint Central Admin ->
Application Management-> View All Site Collections.
Precuation:
The fix is for SharePoint 2010 Out of the box pages which are confirmed from MSDN that there are no vulnerable SQL Injection attacks by the Product. However for custom solutions or custom pages deployed in SharePoint 2010, it is responsiblity of the Deployment team to review this settings for custom code and approve it to be deployed.
Hope this helps!!!
Thursday, February 17, 2011
The path must point to a fixed, NTFS drive whose root directory exists.
Hi,
Just wanted to share a quick fix in SharePoint 2010 Search which I faced today, this error almost took me for a toll with no help in Internet :(, finally I was able to successfully
resolve the issue with bit of thinking and support from my colleague.
Scenario: Installed SharePoint via Power shell Scripts in SharePoint 2010 Farm (3 App Servers, 3 WFE's and 1 SQL Server). Unable to create Crawl or Index components in some of the machines.
Error: While creating new crawl components or Query & Index partitions, SharePoint 2010 keep on prompting the message "The path must point to a fixed, NTFS drive whose root directory exists."
Note: The error prompts while trying via Central Administration and via Powershell Scripts it hangs to activate the components
Solution: Execute the following command in Power shell and wait for 15 minutes to reflect the changes
Repair-SPManagedAccountDeployment
Via scripting, add the following lines at the top
Repair-SPManagedAccountDeployment
sleep 900
Hope this little fix will help other users to come up with a solution quickly.
Following is the complete script for Crawl and Query Components
Crawl Component
try
{
$ServerName = $env:COMPUTERNAME
Repair-SPManagedAccountDeployment
sleep 900
#Start Search Service Instance
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
if ($searchInstance.status -eq "Disabled")
{
Start-SpEnterpriseSearchServiceInstance -identity $ServerName
}
## Wait
Write-Host -ForegroundColor Blue " - Waiting for Search Service Instance to start..." -NoNewline
While ($searchInstance.status -ne "Online")
{
Write-Host -ForegroundColor Blue "." -NoNewline
start-sleep 1
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
}
Write-Host -BackgroundColor Blue -ForegroundColor Black " ......: Search Service Started!"
#Get Service Application
$searchApp = Get-SPServiceApplication | ? {$_.TypeName -eq "Search Service Application"}
write-host Getting Initial Crawl Topology
# Retrieve the active topology
$InitialCrawlTopology = $searchApp | Get-SPEnterpriseSearchCrawlTopology -Active
$InitialCrawlTopology
write-host Cloning Crawl Topology
# Clone the topology
$CrawlTopology = $searchApp | New-SPEnterpriseSearchCrawlTopology -Clone -CrawlTopology $InitialCrawlTopology
write-host Creating new crawl component
# Create the new crawl component
$CrawlDatabase0 = ([array]($searchApp | Get-SPEnterpriseSearchCrawlDatabase))[0]
$CrawlComponent0 = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase0 -SearchServiceInstance $searchInstance -IndexLocation $CrawlComponents
$CrawlComponent1 = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase0 -SearchServiceInstance $searchInstance -IndexLocation $CrawlComponents
write-host Activating new crawl topology
# Activate the new crawl topology
$CrawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active
Write-Host -ForegroundColor white Waiting for the old crawl topology to become inactive
do {write-host -NoNewline .;Start-Sleep 10;} while ($InitialCrawlTopology.State -ne "Inactive")
sleep 900
write-host Deleting Crawl Topology
# Delete the old crawl topology
$InitialCrawlTopology | Remove-SPEnterpriseSearchCrawlTopology
sleep 100
}
catch
{
Write-Output $_
}
Query Component
try
{
$ServerName = $env:COMPUTERNAME
Repair-SPManagedAccountDeployment
sleep 900
#Start Search Service Instance
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
if ($searchInstance.status -eq "Disabled")
{
Start-SpEnterpriseSearchServiceInstance -identity $ServerName
}
## Wait
Write-Host -ForegroundColor Blue " - Waiting for Search Service Instance to start" -NoNewline
While ($searchInstance.status -ne "Online")
{
Write-Host -ForegroundColor Blue "." -NoNewline
start-sleep 1
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
}
Write-Host -BackgroundColor Blue -ForegroundColor Black " ......Started!"
$searchApp = Get-SPServiceApplication | ? {$_.TypeName -eq "Search Service Application"}
write-host Retrieving Active Topology
# Retrieve the Active Query Topology
$InitialQueryTopology = $searchApp | Get-SPEnterpriseSearchQueryTopology -Active
$InitialQueryTopology
write-host Cloning Query Topology
# Create New topology
$QueryTopology = $searchApp | New-SPEnterpriseSearchQueryTopology -Partitions 2
write-host Adding Query Components
$IndexPartition0 = ([array](Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology))[0]
$QueryComponent0 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition0 -SearchServiceInstance $searchInstance -IndexLocation $QueryComponents
$IndexPartition1 = ([array](Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology))[1]
$QueryComponent1 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition1 -SearchServiceInstance $searchInstance -IndexLocation $QueryComponents
# Reuse the existing property database
$PropertyDatabase0 = ([array]($searchApp | Get-SPEnterpriseSearchPropertyDatabase))[0]
# Assign three index partitions to the property database
$IndexPartition0 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase0
$IndexPartition1 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase0
write-host Activating new query topology
# Activate the new query topology
$QueryTopology | Set-SPEnterpriseSearchQueryTopology -Active
Write-Host -ForegroundColor white Waiting for the old query topology to become inactive
do {write-host -NoNewline .;Start-Sleep 10;} while ($InitialQueryTopology.State -ne "Inactive")
sleep 900
write-host Deleting old query topology
# Delete the old query topology
$InitialQueryTopology | Remove-SPEnterpriseSearchQueryTopology
}
catch
{
Write-Output $_
}
Just wanted to share a quick fix in SharePoint 2010 Search which I faced today, this error almost took me for a toll with no help in Internet :(, finally I was able to successfully
resolve the issue with bit of thinking and support from my colleague.
Scenario: Installed SharePoint via Power shell Scripts in SharePoint 2010 Farm (3 App Servers, 3 WFE's and 1 SQL Server). Unable to create Crawl or Index components in some of the machines.
Error: While creating new crawl components or Query & Index partitions, SharePoint 2010 keep on prompting the message "The path must point to a fixed, NTFS drive whose root directory exists."
Note: The error prompts while trying via Central Administration and via Powershell Scripts it hangs to activate the components
Solution: Execute the following command in Power shell and wait for 15 minutes to reflect the changes
Repair-SPManagedAccountDeployment
Via scripting, add the following lines at the top
Repair-SPManagedAccountDeployment
sleep 900
Hope this little fix will help other users to come up with a solution quickly.
Following is the complete script for Crawl and Query Components
Crawl Component
try
{
$ServerName = $env:COMPUTERNAME
Repair-SPManagedAccountDeployment
sleep 900
#Start Search Service Instance
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
if ($searchInstance.status -eq "Disabled")
{
Start-SpEnterpriseSearchServiceInstance -identity $ServerName
}
## Wait
Write-Host -ForegroundColor Blue " - Waiting for Search Service Instance to start..." -NoNewline
While ($searchInstance.status -ne "Online")
{
Write-Host -ForegroundColor Blue "." -NoNewline
start-sleep 1
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
}
Write-Host -BackgroundColor Blue -ForegroundColor Black " ......: Search Service Started!"
#Get Service Application
$searchApp = Get-SPServiceApplication | ? {$_.TypeName -eq "Search Service Application"}
write-host Getting Initial Crawl Topology
# Retrieve the active topology
$InitialCrawlTopology = $searchApp | Get-SPEnterpriseSearchCrawlTopology -Active
$InitialCrawlTopology
write-host Cloning Crawl Topology
# Clone the topology
$CrawlTopology = $searchApp | New-SPEnterpriseSearchCrawlTopology -Clone -CrawlTopology $InitialCrawlTopology
write-host Creating new crawl component
# Create the new crawl component
$CrawlDatabase0 = ([array]($searchApp | Get-SPEnterpriseSearchCrawlDatabase))[0]
$CrawlComponent0 = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase0 -SearchServiceInstance $searchInstance -IndexLocation $CrawlComponents
$CrawlComponent1 = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase0 -SearchServiceInstance $searchInstance -IndexLocation $CrawlComponents
write-host Activating new crawl topology
# Activate the new crawl topology
$CrawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active
Write-Host -ForegroundColor white Waiting for the old crawl topology to become inactive
do {write-host -NoNewline .;Start-Sleep 10;} while ($InitialCrawlTopology.State -ne "Inactive")
sleep 900
write-host Deleting Crawl Topology
# Delete the old crawl topology
$InitialCrawlTopology | Remove-SPEnterpriseSearchCrawlTopology
sleep 100
}
catch
{
Write-Output $_
}
Query Component
try
{
$ServerName = $env:COMPUTERNAME
Repair-SPManagedAccountDeployment
sleep 900
#Start Search Service Instance
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
if ($searchInstance.status -eq "Disabled")
{
Start-SpEnterpriseSearchServiceInstance -identity $ServerName
}
## Wait
Write-Host -ForegroundColor Blue " - Waiting for Search Service Instance to start" -NoNewline
While ($searchInstance.status -ne "Online")
{
Write-Host -ForegroundColor Blue "." -NoNewline
start-sleep 1
$searchInstance = Get-SPEnterpriseSearchServiceInstance | where {($_.server) -match $ServerName}
}
Write-Host -BackgroundColor Blue -ForegroundColor Black " ......Started!"
$searchApp = Get-SPServiceApplication | ? {$_.TypeName -eq "Search Service Application"}
write-host Retrieving Active Topology
# Retrieve the Active Query Topology
$InitialQueryTopology = $searchApp | Get-SPEnterpriseSearchQueryTopology -Active
$InitialQueryTopology
write-host Cloning Query Topology
# Create New topology
$QueryTopology = $searchApp | New-SPEnterpriseSearchQueryTopology -Partitions 2
write-host Adding Query Components
$IndexPartition0 = ([array](Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology))[0]
$QueryComponent0 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition0 -SearchServiceInstance $searchInstance -IndexLocation $QueryComponents
$IndexPartition1 = ([array](Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology))[1]
$QueryComponent1 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition1 -SearchServiceInstance $searchInstance -IndexLocation $QueryComponents
# Reuse the existing property database
$PropertyDatabase0 = ([array]($searchApp | Get-SPEnterpriseSearchPropertyDatabase))[0]
# Assign three index partitions to the property database
$IndexPartition0 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase0
$IndexPartition1 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase0
write-host Activating new query topology
# Activate the new query topology
$QueryTopology | Set-SPEnterpriseSearchQueryTopology -Active
Write-Host -ForegroundColor white Waiting for the old query topology to become inactive
do {write-host -NoNewline .;Start-Sleep 10;} while ($InitialQueryTopology.State -ne "Inactive")
sleep 900
write-host Deleting old query topology
# Delete the old query topology
$InitialQueryTopology | Remove-SPEnterpriseSearchQueryTopology
}
catch
{
Write-Output $_
}
Sunday, November 9, 2008
Export spread sheet option in MOSS 2007
Hi all,
Last week i had a small requirement in my project, where i need to enable "Export spread sheet" to Sharepoint Viewers group(Usually users in Viewers group will not have access to use "Export to spread sheet" option) of the sharepoint site.
To accomplish this, I have decided to create a simple web part page where in i will drag and drop the list in the web part page and add another Content Editor Web part.
Now, Modify the content editor webpart to create the html link with the following url.
http://servername/Sitename/([Subsitename]/)_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[ListGUID]&View=[ViewGUID]&CacheControl=1
Save the changes, your job is done :-)
Last week i had a small requirement in my project, where i need to enable "Export spread sheet" to Sharepoint Viewers group(Usually users in Viewers group will not have access to use "Export to spread sheet" option) of the sharepoint site.
To accomplish this, I have decided to create a simple web part page where in i will drag and drop the list in the web part page and add another Content Editor Web part.
Now, Modify the content editor webpart to create the html link with the following url.
http://servername/Sitename/([Subsitename]/)_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[ListGUID]&View=[ViewGUID]&CacheControl=1
Save the changes, your job is done :-)
create a new search service application
Configuring Enterprise Search in SharePoint 2010
We all have to agree that search plays an integral part of any
successful SharePoint deployment and is an area that Microsoft continues
to invest in with each new release of SharePoint. Microsoft went as far
as acquiring FAST 2 years ago which it now offers as a separate add-on
to SharePoint for those willing to invest in high end enterprise search.
In addition to FAST, SharePoint 2010 search comes in a number
of flavors each offering their own feature set and capabilities which I
have duplicated at the end of this article as an Appendix for
convenience.
Today we will introduce SharePoint Server 2010 Search and eventually work our way up to Microsoft’s latest and greatest FAST Search Server in a near future article. Before we deep dive into the step by step guide I will begin by listing some of the new features that you will come to expect from SharePoint Server 2010 Search. These are as follows;
SharePoint Server Search is a service application which we have come to learn about over the past few articles that it is independent of other services and is no longer tied to the Shared Services Provider (SSP) that was introduced in SharePoint 2007.
SharePoint 2010 search architecture is made up of the Crawler, Indexing Engine, Query Engine and the User Interface and Query Object Model. We now have greater flexibility and expandability with our search design in 2010 and can setup not only multiple Query Servers but can now scale out our Index server and add multiple instances.
Below is a logical overview of the components that will make up our SharePoint 2010 search configuration.
Configuring the Service Application
As always we begin our journey in Central Administration / Application Management / Manage Service Applications.
Click New / Search Service Application.
Name: Enter a name for your Service Application.
FAST Service Application: Select “None” (we will leave the configuration of FAST for a future article)
Search Service Account: Click on Register new managed account and ensure your domain account has already been provisioned in Active Directory. I have created a separate search account; e.g. DOMAIN\sp_search
Application Pool for Search Admin Web Service: Create a new application pool for your search admin web service application.
Application Pool for Search Query and Site Settings Web Service: Create a new application pool for your search query web service application.
Click Create
The search service application will begin its configuration process.
You will eventually be presented with confirmation that the search service application was created successfully.
If we now navigate back to Application Management / Manage Service Applications, you will notice that 2 additional services have been added to our list. These are;
Our Default content access account should be set to the account that we had specified at the time of provisioning the Search Service Application; i.e. DOMAIN\sp_search
Confirming Permissions
There are a couple of areas to note that we should check to ensure that our Default content access acount (sp_search) has been provided with the appropriate access permissions. Let’s first begin by checking our User Profile Service Application by Navigating to Service Applications / User Profiles. Just highlight the User Profiles and select Administrators from the ribbon.
Our newly provisioned sp_search account should have “Retrieve People Data for Search Crawlers” selected as a permission.
We will also confirm that our sp_search account has the necessary “Read” permissions against the Web Applications being crawled.
Navigate to Central Administration / Application Management / Manage Web Applications. Again, highlight the Web Application in question and from the ribbon select User Policy.
Ensure that the Search Crawling Account is set to the sp_search domain account.
Content Sources
Let’s venture into our content sources listed in the Quick Launch navigation bar under Crawling. You do so by first navigating to your Search Application Service and clicking on Manage.
As was the case with SharePoint 2007, our Local SharePoint sites will be detected by default, albeit without a crawl schedule.
Check to see that your Start Addresses are located within your content source via editing the content source from the drop down menu. These includes all SharePoint Web Applications and the sps3 “User Profiles” address.
You can easily create your crawl schedule by clicking on Local SharePoint sites and scrolling down to Crawl Schedules.
Let’s initiate a Full Crawl by clicking on Start all Crawls from the Manage Content Sources page.
Once your crawl has completed, you should confirm that there were no errors encountered during the initial crawl. Usually any errors noted are most likely due to incorrect permission assignments.
Creating a “Basic Search Center” Site
If you haven’t done so already, from your top level site, click on Site Actions / New Site.
Select “Basic Search Center”
Enter a Name and URL and click on Create.
This will provision the Search Center similar to the below.
Creating an “Enterprise Search Center” Site
Let’s also create an Enterprise Search Center for comparison. The key difference here is that we are provided with two tabs for searching, one for Sites and the other for People. The “Enterprise Search Center” will be the search site of choice for most organizations running SharePoint Server.
From Central Administration / Application Management / Site Collections, click on Create site collections. Ensure you are creating the Site Collection below the relevant Web Application.
Enter your Title, Description etc and select the Enterprise Tab under Template selection. Select the Enterprise Search Center, specify your site collection administrators and click OK.
This will provision the Enterprise Search Center similar to the below.
As we have already completed an initial Full crawl earlier, I can now test my new search centers by performing a couple of searches.
Searching Content
Searching People
Now I ran into an issue when trying to search for content located in My Sites. The crawl log displayed the following warning;
“This item and all items under it will not be crawled because the owner has set the NoCrawl flag to prevent it from being searchable”
In order to fix this issue (and this is true for any Site Collection), is to navigate to your My Site host and click on Site Actions / Site Settings.
Click on “Search and offline availability” under Site Administration, and ensure that you have Indexing Site Content, Allow this site to appear in search results? set to “Yes”.
After enabling the indexing of My Sites, I was able to successfully perform My Site Content searches and the warning disappeared from the Crawl Log.
That’s all that is to it in setting up a search center in its most basic form. From here you can expand your service applications over multiple servers providing you with redundancy, scalability and increased performance . Until next time, happy searching
Subscribe to this blog and join our Facebook page and Twitter Page to keep up to date and be notified of our latest articles.
If you require any assistance with your SharePoint or other IT needs, the team at GKM2 are happy to assist. You can contact us via info@gkm2.com.au or 1300 797 288 within Australia.
References:
TechNet :: Getting Started with Enterprise Search in SharePoint 2010 Products
Appendix
SharePoint Versions Search Comparison
Today we will introduce SharePoint Server 2010 Search and eventually work our way up to Microsoft’s latest and greatest FAST Search Server in a near future article. Before we deep dive into the step by step guide I will begin by listing some of the new features that you will come to expect from SharePoint Server 2010 Search. These are as follows;
- Boolean query syntax has finally been introduced. These include AND, OR and NOT operators in your search queries.
- Suggestions whilst typing and after running search queries, a feature that we have come to love with major search engines such as Google and Bing.
- Integrating SharePoint enterprise search with Windows 7, allowing end users to utilise the Windows 7 search box to locate SharePoint 2010 content.
- Results display has been refined to provide filters for search results such as document type, categories and managed properties.
- View in Browser capabilities, allows end users to view documents within their own browser utilising Office Web Apps and not having to rely on launching the necessary Microsoft Office Application, or even the need of having it installed on their local machine. This is handy when browsing your SharePoint site via Kiosks and Internet Cafes that may not be running the Microsoft Office Suite.
- Last but not least, there have been a number of improvements to People Search, including phonetic name and nickname matching, and improved relevance and self search.
SharePoint Server Search is a service application which we have come to learn about over the past few articles that it is independent of other services and is no longer tied to the Shared Services Provider (SSP) that was introduced in SharePoint 2007.
SharePoint 2010 search architecture is made up of the Crawler, Indexing Engine, Query Engine and the User Interface and Query Object Model. We now have greater flexibility and expandability with our search design in 2010 and can setup not only multiple Query Servers but can now scale out our Index server and add multiple instances.
Below is a logical overview of the components that will make up our SharePoint 2010 search configuration.
Configuring the Service Application
As always we begin our journey in Central Administration / Application Management / Manage Service Applications.
Click New / Search Service Application.
Name: Enter a name for your Service Application.
FAST Service Application: Select “None” (we will leave the configuration of FAST for a future article)
Search Service Account: Click on Register new managed account and ensure your domain account has already been provisioned in Active Directory. I have created a separate search account; e.g. DOMAIN\sp_search
Application Pool for Search Admin Web Service: Create a new application pool for your search admin web service application.
Application Pool for Search Query and Site Settings Web Service: Create a new application pool for your search query web service application.
Click Create
The search service application will begin its configuration process.
You will eventually be presented with confirmation that the search service application was created successfully.
If we now navigate back to Application Management / Manage Service Applications, you will notice that 2 additional services have been added to our list. These are;
- Search Service Application (Typical Search Administration page which is similar to that in SharePoint 2007. From here we can create content crawl rules, reset indexes, setup content sources etc).
- WSS_UsageApplication (This is a new service in SharePoint 2010 that specifically handles our Usage and Health Data Collection Service Application. This service application handles web analytics such as usage, search query usage, rating usage etc More on this in a future article).
Our Default content access account should be set to the account that we had specified at the time of provisioning the Search Service Application; i.e. DOMAIN\sp_search
Confirming Permissions
There are a couple of areas to note that we should check to ensure that our Default content access acount (sp_search) has been provided with the appropriate access permissions. Let’s first begin by checking our User Profile Service Application by Navigating to Service Applications / User Profiles. Just highlight the User Profiles and select Administrators from the ribbon.
Our newly provisioned sp_search account should have “Retrieve People Data for Search Crawlers” selected as a permission.
We will also confirm that our sp_search account has the necessary “Read” permissions against the Web Applications being crawled.
Navigate to Central Administration / Application Management / Manage Web Applications. Again, highlight the Web Application in question and from the ribbon select User Policy.
Ensure that the Search Crawling Account is set to the sp_search domain account.
Content Sources
Let’s venture into our content sources listed in the Quick Launch navigation bar under Crawling. You do so by first navigating to your Search Application Service and clicking on Manage.
As was the case with SharePoint 2007, our Local SharePoint sites will be detected by default, albeit without a crawl schedule.
Check to see that your Start Addresses are located within your content source via editing the content source from the drop down menu. These includes all SharePoint Web Applications and the sps3 “User Profiles” address.
You can easily create your crawl schedule by clicking on Local SharePoint sites and scrolling down to Crawl Schedules.
Let’s initiate a Full Crawl by clicking on Start all Crawls from the Manage Content Sources page.
Once your crawl has completed, you should confirm that there were no errors encountered during the initial crawl. Usually any errors noted are most likely due to incorrect permission assignments.
Creating a “Basic Search Center” Site
If you haven’t done so already, from your top level site, click on Site Actions / New Site.
Select “Basic Search Center”
Enter a Name and URL and click on Create.
This will provision the Search Center similar to the below.
Creating an “Enterprise Search Center” Site
Let’s also create an Enterprise Search Center for comparison. The key difference here is that we are provided with two tabs for searching, one for Sites and the other for People. The “Enterprise Search Center” will be the search site of choice for most organizations running SharePoint Server.
From Central Administration / Application Management / Site Collections, click on Create site collections. Ensure you are creating the Site Collection below the relevant Web Application.
Enter your Title, Description etc and select the Enterprise Tab under Template selection. Select the Enterprise Search Center, specify your site collection administrators and click OK.
This will provision the Enterprise Search Center similar to the below.
As we have already completed an initial Full crawl earlier, I can now test my new search centers by performing a couple of searches.
Searching Content
Searching People
Now I ran into an issue when trying to search for content located in My Sites. The crawl log displayed the following warning;
“This item and all items under it will not be crawled because the owner has set the NoCrawl flag to prevent it from being searchable”
In order to fix this issue (and this is true for any Site Collection), is to navigate to your My Site host and click on Site Actions / Site Settings.
Click on “Search and offline availability” under Site Administration, and ensure that you have Indexing Site Content, Allow this site to appear in search results? set to “Yes”.
After enabling the indexing of My Sites, I was able to successfully perform My Site Content searches and the warning disappeared from the Crawl Log.
That’s all that is to it in setting up a search center in its most basic form. From here you can expand your service applications over multiple servers providing you with redundancy, scalability and increased performance . Until next time, happy searching
Subscribe to this blog and join our Facebook page and Twitter Page to keep up to date and be notified of our latest articles.
If you require any assistance with your SharePoint or other IT needs, the team at GKM2 are happy to assist. You can contact us via info@gkm2.com.au or 1300 797 288 within Australia.
References:
TechNet :: Getting Started with Enterprise Search in SharePoint 2010 Products
Appendix
SharePoint Versions Search Comparison
Feature | SharePoint Foundation 2010 | Search Server 2010 Express | Search Server 2010 | SharePoint Server 2010 | FAST Search Server 2010 for SharePoint |
Basic site search | Y | Y | Y | Y | Y |
Best Bets | Y | Y | Y | Y | |
Visual Best Bets | Y | ||||
Similar Results | Y | ||||
Duplicate Results | Y | ||||
Search Scopes | Y | Y | Y | Y | |
Search Enhancement based on user context | Y | ||||
Crawled and Managed Properties | Y | Y | Y | Y* | |
Query Federation | Y | Y | Y | Y | |
Query Suggestions | Y | Y | Y | Y | |
Sort Results on Managed Properties or Rank Profiles | Y | ||||
Relevancy Tuning by Document or Site Promotions | Y | Y | Y | Y* | |
Shallow Results Refinement | Y | Y | Y | Y | |
Deep Results Refinement | Y | ||||
Document Preview | Y | ||||
Windows 7 Federation | Y | Y | Y | Y | |
People Search | Y | Y | |||
Social Search | Y | Y | |||
Taxonomy Integration | Y | Y | |||
Multi-Tenant Hosting | Y | Y | |||
Rich Web Indexing Support | Y |
Subscribe to:
Posts (Atom)