Friday, December 30, 2011

Propagation shows waiting for initialization

This is the most common issue sometimes we face when try to add a server with Query role in to a farm
Scenario:
  • There are total 8 servers with MOSS 2007
  • 4 WEBs and 4 APPs
  • Indexer is on PRATIKAPP1 and other 3 have to be a query server
  • I have already added PRATIKAPP2 & PRATIKAPP3 as a query long time back and they are working fine and search is running smoothly
  • But recently we are facing heavy load in search and that’s why decided to go for another query server
  • So the plan is to add PRATIKAPP4 as a query in farm
Steps:
  • To achieve this goal I simply went to Central Administration > Operations > Services on Server
  • Selected the server from the drop down “PRATIKAPP4″
  • Then clicked on “Start” on “Office SharePoint Server Search” and applied path of Index folder shared on my APP4, hit OK
  • It took couple of minutes to be started
  • Checked timer job status and found the job to add PRATIKAPP4 has been initiated on PRATIKAPP1
  • Then checked Search Administration and found Propagation status showing “waiting for initialization (PRATIKAPP4)”
  • I had 400 GB of INDEX files data on other 2 query servers and periodically on PRATIKAPP4 INDEX folder was increasing in size, so I had to wait for some time.
  • Now the main villain came which destroyed my INDEX data and made it to count from 0 –zero
  • The reason was there are timer restart scripts ran on each server after 6 hours and I gone really mad when it INDEX file came back to zero from 250 GB.
  • All jobs again stated back from scratch.
Resolution:
  • Stopped OSearch from Central admin on PRATIKAPP4, which went to “Stopping” state
  • So manually stopped it using stsaadm command on PRATIKAPP4
    • stsaadm –o osearch –action stop
  • Then disable timer restart scripts on all servers
  • Again followed all above steps
  • Periodically checked INDEX folder on PRATIKAPP4
  • It was increasing in size but the speed was too slow
  • Finally it reached to 398 GB and under search administration I found the 3rd Query server added
  • Timer job status showed succeeded with 100 %
  • Propagation status showed IDLE
  • Everything was perfect as expected.
Thoughts:
  • What I was thinking to get this resolved?
  • Copy INDEX files from one location to another, but there were some active crawls going on and I did not want it to be stopped
  • Finally if the server was not listed then planned to run following stsaadm command on PRATIKAPP4
    • stsadm -o osearch -propagationlocation filePathtoPropagationShare
  • There are so many articles and suggestions available on internet which talks about this scenario, but what I suggest is to first check your environment and then go for resolution.
  • Resolution or any issue is easy and I bet we guys definitely aware with it, but the thing only thing required is proper analysis and crystal clear knowledge of own environment.
  • This is what I had faced and resolved, please feel free to provide me suggestions and inputs on my above steps.

Sunday, December 25, 2011

Merry Christmas

To all my Friends and Blog reader,

Let’s welcome the year which is fresh,
Let’s welcome the year which is fresh and new, 
Let’s cherish each moment it beholds,
Let’s celebrate this blissful New Year.


!! Merry Christmas !!





Tuesday, December 13, 2011

How to: display files extensions in SharePoint Document Library

There are 2 ways to show file extensions in a SharePoint document library


Method1:
  • Convert the document library List View web part to a XSLT dataview
  • Open the document library with FrontPage,
  • Right click and convert to DataView.
  • Modify the XSLT to add select=”@File_x0020_Type”/>


Method2:
  • Modify the display pattern in ONET.XML
  • Add
  • Name=”File_x0020_Type”/>
  • Before
  • Name=”Created_x0020_Date”>.
After making a change to ONET.XML you have to do IISRESET.

Tuesday, December 6, 2011

Let’s start customization

Here we go with some customization with a small piece of CODE to make SharePoint more stunning and more users friendly. I appeal to all of you, please share some customization tips to make SharePoint more BEAUTIFUL. 

Here are some codes we can add into Content Editor Web Part to get desired results. 

Hide QuickLaunch bar (Area remains – blank)
<style>
.ms-quicklaunch
{
display:none;
}
</style>

Hide QuickLaunch bar with Area
<style type=”text/css”>
.leftNavArea{display:none;}
</style>

Hide Allwebparts from page
<style>
.ms-navframe
{
display:none;
}
</style>

Hide QuickLaunch bar with Area and all Web Parts from the page
<style>
.ms-pagetitleareaframe
{
display: none;
}
.ms-navframe
{
display: none;
}
.ms-titleareaframe
{
display: none;
}
</style>

Tuesday, November 29, 2011

Create custom Search Result Page using a basic page (No search center required)


I know this is a very basic thing which all SharePoint experts know very well when they started their JOURNEY with SharePoint but there is something very interesting & simple we missed to check or use
Here are few steps with which we can create a custom search result page in very simple way. I use word because SIMPLE because it’s not required to create any search center sites or any search pages. This can be achieved with a simple Blank web part page and with ALL OOTB features.
  • First of all create a page, (i.e. Blank web part page). I call it “Simple Search”
  • Then click on Add a web part and add following web parts in sequence.
1.      Search box
2.      Search Paging
3.      Search Core Results
  • Now click on edit page and select Search Box web part > click “Modify Shared Web part”
  • Under Miscellaneous section change – Target search results page URL to the newly created page – i.e. http://sitename/doclib/simplesearch.aspx (i.e. http://sitename/pages/simplesearch.aspx for site with publishing enabled)
  • That’s all, now when user lands on Simple Search Page and query for search he / she will get all search results on the same page and it gives the same look and feel which is there on OSSearchResult page as we have added search paging.
  • Search paging gives number of pages containing search results.
There are few more customizations which we can do on the same page like creating a custom scope for a search box or by customizing search core results.
Here are some references
Search Core Results XSLT Transformation:
Creating a Custom Search Page and Tabs in the Search Center of SharePoint Server:
Search Core Results Web Part XSLT: