Unable to complete upgrate after installing Aug 2011 Cu for Sharepoint 2010 and getting error of Exception: localStoragePath

Every upgrade attemp is one of challage for IT team. So this time we are working on a problem which is occured after Aug 2011 Cumulative Update.
the symptom is Sharepoint Configuration Wizard can not able to complete and finishing with failure.

First of all once we check the PSCDiagnostics logs we could not able to find something useful:

Configuration of SharePoint Products failed.  Configuration must be performed in order for this product to operate properly.  To diagnose the problem, review the extended error information located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS\PSCDiagnostics_10_7_2011_9_55_26_860_989474110.log, fix the problem, and run this configuration wizard again

Cool but it say nothing. So we peek that let check “upgrade” logs …
And see some error. LocalStoragePath. What is actually LocalStoragePath and why we are getting this error while upgrading. It is definitly something wrong with search db.

[OWSTIMER] [SPUpgradeSession] [ERROR] [10/7/2011 10:05:49 AM]: Exception: localStoragePath
[OWSTIMER] [SPUpgradeSession] [INFO] [10/7/2011 10:05:49 AM]: SearchAdminDatabase Name=Fast_Query_SSA_DB_3a64d349dc2249679a8be
[OWSTIMER] [SPUpgradeSession] [ERROR] [10/7/2011 10:05:49 AM]:    at Microsoft.Office.Server.Search.Administration.SearchApi.AssertParameter(String parameterName, Boolean condition)
   at Microsoft.Office.Server.Search.Administration.SearchApi.UpdateAdminComponent(String serverName, Guid serverId, String localStoragePath, Boolean standalone, Nullable`1 settingsInRegistry)
   at Microsoft.Office.Server.Search.Upgrade.SearchAdminDatabaseSequence.InitializeTopologyBasedOn2007Settings()
   at Microsoft.Office.Server.Search.Upgrade.SearchAdminDatabaseSequence.PostUpgrade()
   at Microsoft.SharePoint.Upgrade.SPUpgradeSession.Upgrade(Object o, Boolean bRecurse)

The problem in our scenario is some how psconfig can not update the topology, possible cause for this may be service name changes may be an old conf. backup restored or even more the server name has changed.  

Resolution

1. Checked the Upgrade error log and notice following information
[OWSTIMER] [SPUpgradeSession] [INFO] [10/7/2011 10:05:49 AM]: SearchAdminDatabase Name=Fast_Query_SSA_DB_3a64d349dc2249679a8be…

2.Use Get-SPEnterpriseSearchServiceApplication cmdlet and list all search service applications. we try to delete the Search Service Application. Unable to delete the service Application through GUI hence tried successfully with following Powershell command.

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 4e6d0c5c-f47b-425e-a637-e8a44aca12ae
$ssa.Delete()  

We had 2 search application more so we deleted all of them .

3. Run the configuration wizard

4. created a new SSA to after configuration wizard has run.

Advertisements

Getting error of “Unable to display this Web Part” on WSS2.0/SPS2003 after installing MS11-074

September Security Bulletin (MS11-04) is affecting WSS 2.0/SPS2003 ,  After installing security update MS11-074 for Windows SharePoint Services 2.0 / SharePoint Portal Server 2003 (KB 2494007), we are faced with problems with some DataViewWebPart s.
The error message is :
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as FrontPage. If the problem persists, contact your Web server administrator.”

the problem is cause by The Security Update breaks some XSLT ddwrt functions in the Data View Web Part, for example, ddwrt:FormatDate(string szDate, long lcid, long formatFlag) and ddwrt:FilterLink().

For resolving this issue you ;

1) Upgrade to Windows SharePoint Services 3.0 or Office SharePoint Server 2007.
2. Evaluate how widely the Data View Web Part is used and apply the following workaround if there are very few pages affected:
Remove broken ddwrt functions in the Extensible Stylesheet Language Transformation (XSLT) code of the Data View Web Part.
Here is an example when the broken ddwrt function is
ddwrt:FormatDate(string szDate, long lcid, long formatFlag):

Replace code “ddwrt:FormatDate(string(@someDateField), 1033, 5)” with “@someDateField”. By applying this work around, the Data View will render in browser, however, the formatting of the Date field will be changed as following:

Before the security update, the date is in this format: 9/27/2011 6:21 PM
After above work around, the date is in this format: 2011-09-27T18:21:03

Another example, ddwrt:FilterLink(), this function returns an empty string. Just remove the function, the Data View should render the same way as before.

The above concept can be applied to other ddwrt functions with caution. There are possibilities that removing ddwrt functions will impair the function of XSLT so that the data displayed in Data View is not in the desired format. In those situations, please consider option 1 or 3.

3. Rollback the WSS 2.0/SPS 2003 farm to a state prior to installing the above Security Update. A backup of the farm/content databases before the security update is required for this to be successful.

Create all users’ personal site via Powershell script – Sharepoint 2010

#PowerShell Script - Create All Users Personel Sites - SharePoint 2010 #The scripts is distributet "as-is." Use it on your own risk. 
#Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

[Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")

$mysiteHostUrl = "http://my"
$personalSiteGlobalAdmin = "DOMAIN\padm"
$personalSiteGlobalAdminNot ="padm@bugrapostaci.com"
$personalSiteGlobalAdminDisplayName = "Personel Site admin"
$mysite = Get-SPSite $mysiteHostUrl

$context = [Microsoft.Office.Server.ServerContext]::GetContext($mysite)
$upm =  New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

$AllProfiles = $upm.GetEnumerator()

foreach($profile in $AllProfiles)
{

    $DisplayName = $profile.DisplayName
    $AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value
       #Add your restrictions for users.        if($Accountname -like "YourDomain*")
       {
          if($profile.PersonalSite -eq $Null)
          {
               write-host "Creating personel site for ", $AccountName
               $profile.CreatePersonalSite()
               #Adding an extra admin for personel sites                $pweb = $profile.PersonalSite.OpenWeb()
               $pweb.AllUsers.Add($personalSiteGlobalAdmin,$personalSiteGlobalAdminNot,$personalSiteGlobalAdminDisplayName,$null);
               $padm= $pweb.AllUsers[$personalSiteGlobalAdmin];
               $padm.IsSiteAdmin = $true;
               $padm.Update();
               $pweb.Dispose();
               write-host "Personal Site Admin has assigned"
          }
          else
          {
               write-host $AccountName ," has already personel site"
          }
   }
}
$mysite.Dispose();

Sharepoint 2010 – Delete all users’ personel sites via powershell

#PowerShell Script - Delete All Users Personel Sites - SharePoint 2010
#The scripts is distributet "as-is." Use it on your own risk. The author give no warranties, guarantees or conditions.

#Add SharePoint PowerShell SnapIn if not already added
 if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
[Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")

$mysiteHostUrl = "http://my"
$mysite = Get-SPSite $mysiteHostUrl
$context = [Microsoft.Office.Server.ServerContext]::GetContext($mysite)

$upm =  New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

$AllProfiles = $upm.GetEnumerator()

foreach($profile in $AllProfiles)
{
   $DisplayName = $profile.DisplayName
   $AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value  

   if($profile.PersonalSite -ne $Null)
   {

	   $profile.PersonalSite.Delete()
	   write-host $AccountName , " personel site deleted successfully"
   }
}
$mysite.Dispose();