Monday, September 15, 2014

Cannot start service SPAdminv4 on computer . PSConfig fails "InvalidOperation Exception" after SP2 Install

I was setting up a new SharePoint server and after installing SP2, ran the PSConfig wizard which failed with the error "System.InvalidOperationException, “Cannot start service SPAdminv4 on computer ‘.'”.

Found this blog and followed the steps given. It solved the problem for me. Hope it helps you as well.

Powershell to find Orphaned Databases

To get a list of orphaned databases : Get-SPDatabase | where {$_.exists -eq $false}

To delete the orphaned databases : Get-SPDatabase | where {$_.exists -eq $false} | foreach {$_.delete()}

Hope this helps you

Sunday, September 14, 2014

Exception from HRESULT: 0x80131904 -While updating a list item.

We had this issue, in one of our application in my farm. User's were not able to edit a list and it was throwing this error. "System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80131904".

Googling pointed  out that there might be a problem in the content database.

1) So we increased the Content DB Autogrowth size from 50MB to 500MB. This has not resolved the issue.

2) Dropped the indexes and recreated the indexes for the problematic list. This also did not resolve the issue.

Finally found the issue is with UserType look-up fields did not have target list defined and hence cannot locate the users it needs to. So had to update the affected fields to the correct reference of User Information List, exported the list, deleted the original list item from the list settings (Make sure you have content DB backup) and import the list again. This solved the problem.

Many people had different way of fixing the "HRESULT: 0x80131904" error , but in my case it was for look up column. Hope it helps.



Thursday, August 28, 2014

Powershell Command to get List Schema.xml in ClipBoard

Please use the following Power Shell command

$web = Get-SPWeb XXXX
$list= $web.lists[Your Lists]
$list.Fields.SchemaXml | clip


Tuesday, August 19, 2014

SharePoint Crawl DB size was too large

Our SharePoint 2010 farm's crawl DB was at 250 GB which is very unusual. According to this post the size of the crawl DB should be 0.046 × (sum of content databases). Sum of my content DB size is around 1TB and the crawl DB size should be around 46 GB.

Finally decided to reduce the size of it by applying host distribution rules or shrink the crawl DB. I chose to do the second option and did the following. Now the crawl DB size is close to the 45 GB .

1) Central Admin-> Search service admin -> Index Reset. This will erase all the content Index.
2) DB Server->Choose the Crawl DB ->Shrink the Crawl DB files. This will shrink all the mdf/ldf files and size of your DB will be meager.
3) Kicked off a full crawl.

But the shortcoming of these steps is I lost the entire crawl history. Hope this post helps you as well.

Tuesday, July 29, 2014

'\MSOLAP$POWERPIVOT:Memory\Memory Limit High KB' performance counter could not be found

I had problems in doing a data refresh for PowerPivot sheets. In the ULS logs I was getting the following error

System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken= ]]: The '\MSOLAP$POWERPIVOT:Memory\Memory Limit High KB' performance counter could not be found.  System error - Server stack trace:  

I checked the PerfMon and found that the MSOLAP counters were missing.

I tried the load the counters given in this link. But I got an error saying that the counters are already present. After lot of digging and discussion with Microsoft found that I need to set the following in the registry. For 64 bit Go to->  HKLM \ System \ CurrentControlSet \ Services\MSOLAP$POWERPIVOT\ Performance and set Disable Performance Counters = 2 .

For 32 bit installations set it to 0.

Restart the server that hosts the power-pivot and you should be able to see the  MSOLAP performance counters in PerfMon and PowerPivot data refresh should work.

In the first instance I do not know how the performance counters were disabled. Can anyone throw light on this?

Saturday, July 19, 2014

PDF will not open in client application in SharePoint 2010

My users preference is not to save the PDF's when they try to open it from a SharePoint Document Library.


My preference is, they should be able to open the PDF in PDF Viewer like word/excel client applications. We thought it is browser specific problem, and tested it in IE, Chrome and Firefox. IE requests the user to save the PDF document as given in the above picture and Chrome downloads the PDF's automatically.
So we concluded that this is not a browser issue and found the following solution.

The solution is to

  1. SharePoint 2010 Central Administration -> Application Management -> Manage Web Applications
  2. Select the choice of your web application
  3. Click General Settings in the ribbon
  4. Scroll down to Browser File Handling and choose Permissive
  5. Click OK to save the settings.


Also I checked the settings of "Opening Documents in the Browser " of user's document library is set to "open in client application". Now the users are able to open the PDF's in client application. Hope this helps you.

Thursday, July 17, 2014

How to change default open behavior for documents in a document library

One of my user asked me to find a way to set  the default open behavior for  documents in a document library as "Open in client application". He has many document libraries in his site.


I requested him to activate the site collection feature "Open Documents in Client Applications by Default" which will change the default open behavior for all the document libraries(Documents, Form Templates, Site Pages, Style Library etc) but not for Customized Reports document library.

Once he activated that feature, the default open behavior has been set to "Open in client application".
Can anyone tell me why the site collection feature "Open Documents in Client Applications by Default" did not change the default open behavior setting for Customized Reports document library?

Create a site collection which is already present in a web application

I wanted to check how SharePoint behaves, when we try to create a site collection with a title which is already present in the same web application.

SharePoint OOTB it prevents it by throwing a message "Another site already exists".

Saturday, July 12, 2014

Word WebApp encountered an unexpected error /Excel WebApp unable to process the request

In one of my newly created web application, the users tried to open Excel/Word documents using browsers. They were getting the following error and I had to investigate.




 I checked all the services on the WFE and Word viewer service, Excel calculation service were running. When i checked the event viewer for errors, I found the following in event viewer, which ringed the bell


Then I checked the Central Admin->Application Management-> Select the web application -> Service connections -> Configure service application associations and found that Excel Service and Word viewing service is not configured for this web application. When I enabled those for this application, users were able to view Excel/Word using browser. Hope this helps for you!!!