Wednesday, February 19, 2014

Database is in compatibility range and upgrade is recommended


Problem Description

I had moved the SharePoint content databases from one farm to another recently. After the migration was completed I browsed to Central Administration -> Upgrade and Migration -> Review Database Status. The migrated SharePoint content database had the Status as "Database is in compatibility range and upgrade is recommended".

This indicated I had to manually upgrade these content databases.
 

Cause
This was because I moved the content databases from SharePoint 2010 SP1 to SharePoint 2010 SP2.

Resolution
Test-SPContentDatabase -Name ContentDBName -WebApplication http://webapp/ > c:\file1.txt (to confirm that there are no Upgrade Blocking categories that equal true)

Upgrade-SPContentDatabase ContentDBName (Depending on the size of the database, this process could take time.)
 
 

On seeing 100 % completion of database upgrade, browse to Central Administration -> Upgrade and Migration -> Review Database Status. Confirm that the content database now has Status as "No action required"
 
 

Tuesday, February 18, 2014

SharePoint 2010: Usage files are not deleted, causing timer service problems.

On a SharePoint Server 2010 server, the Usage Provider (.usage) files are not deleted from the file system. Additionally, the .usage files keep growing."

The ULS logs were filled with the below errors :

Trace Management Service unable to delete file 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS\VSWSP02N01-20140115-2103.usage'.  Error 00000020

Symptoms

1) The “Microsoft SharePoint Foundation Usage Data Import” timer job never completes.

2) The .usage logs are never deleted. There should typically be no more than 6 .usage files at any given time, but when you have this problem, you may find hundreds or thousands of usage logs in the logging directory.

3) Memory bloat (leak) within owstimer.exe. You may see the timer service consume much more memory than normal. Restarting the timer service will bring it back to normal, but it will build up again over time.
To clear the old .usage files from the file system, I had to restart the SharePoint Timer Services. The .usage files were not getting automatically deleted and this is a known issue.

MS recommends the below action to fix this:

1. Installing December 2013 CU for SharePoint 2010 (I would not recommend this as this too new to install on a PRODUCTION environment)

2. Set up a scheduled task to manually recycle the timer service (at least) once a day -- every 4 to 6 hours would be better.  You can use a PowerShell command like this to recycle the service:  

restart-service -Name SPTimerV4

Then you just need to set up a scheduled task to run it every 6 hours on every SharePoint server in the farm.  When the timer service is manually recycled, the open handles to the .usage files are released, and they will be automatically deleted when the next instance of the Usage Data Import timer job runs (by default every 30 minutes).  There should be no need to manually delete the files. 

Additional Details

Operating System: Windows Server 2012 R2
SharePoint Version: SharePoint Server 2010 SP2


Monday, February 10, 2014

The list cannot be displayed in datasheet view for one or more of the following reasons:

The list cannot be displayed in datasheet view for one or more of the following reasons:

Issue Description
The end user is trying to edit a SP list in datasheet view and gets an error in IE that says:
The list cannot be displayed in datasheet view for one or more of the following reasons:
- A datasheet component compatible view with MS SP foundation is not installed
- Your web browser does not support Active X controls
- A component is not properly configured for 32 or 64 bit support


Fix

Download and install the below component.
2007 Office System Driver: Data Connectivity Components

Thursday, January 2, 2014

Windows Server 2012 R2 compatibility with SharePoint

For SharePoint 2010

“Before the release of Service Pack 2 (SP2) for Microsoft SharePoint Server 2010, Microsoft did not support SharePoint Server 2010 in a Windows Server 2012 or Windows Server 2012 R2 environment.
However, SharePoint Server 2010 with SP2 has now been released, and this configuration is supported in Windows Server 2012 and Windows Server 2012 R2.” as of Nov 21, 2013 Reference

For SharePoint 2013


“Currently, Microsoft SharePoint Server 2013 is not supported for installation on computers running the Windows Server 2012 R2 operating system.” as of Sep 20, 2013 Reference

SharePoint Server 2013: Navigation link error for network file shares

Issue Description

Since May 2013 I have been working with Sharepoint 2013.I have been coming across new things almost everyday.Recently, I had to add a URL link to navigation menu which redirect users to a folder on the network.


On the SharePoint 2013 site based on team Site template, when a user clicks on left navigation links pointing to a file share he gets the error "Invalid Page URL:".



The problem is this was working on SharePoint 2010 and I tested this in a 2010 environemnt and it was still working.

I tried giving the locations in the below formats:

No luck!!! L

I tested the same by pasting the location in Internet Explorer and it opens up.

I had opened a ticket with Microsoft which was actually identified as a bug with Sharepoint 2013.This issue has been fixed with December 10, 2013 Cumulative Update for SharePoint 2013.

Fix for the issue

Disable the MDS feature to fix this. The issue is not in a publishing site(When publishing is enabled, this feature is disabled automatically.)

Site Actions -> Site Settings -> Site Actions ->Manage site features -> Minimal Download Strategy -> Activate

SharePoint Storage Metrics

To fetch the information on size of a SharePoint site, list or document library

Browse to Site Actions ->Site Settings -> Site Collection administration ->Storage Metrics.



Alternately you can browse to the page directly:
For Sharepoint 2010,
http://sharepoint2010siteurl/_layouts/storman.aspx



In SharePoint 2013, append the following _layouts/15/storman.aspx
http:// sharepoint2013siteurl/_layouts/15/storman.aspx



Thursday, December 19, 2013

How to Hide the Breadcrumb Navigation Links and the SharePoint Ribbon on a page

1) Browse to the page where the Breadcrumb Navigation Links and the SharePoint Ribbon needs to be hidden. Add a Content Editor webpart on the page. Add the below style code in a content editor web part.

<style type=”text/css”>
#ctl00_PlaceHolderTitleBreadcrumb_ContentMap {display=none;}
</style>

2) Edit the web part, click in the content zone, then on the ribbon, Editing Tools -> Format Text area, select the HTML drop down and click Edit HTML source. Paste the code in there, and save.

3) In the webpart properties, make the Chrome Type as None and under Layout, check Layout as Hidden.

4) Stop editing the page and save it. 

Friday, December 13, 2013

SharePoint 2013 Site Collection | HTTP 404 error intermittently

Problem Description

Recently I came across a weird issue, a site collection in the SharePoint farm was giving HTTP 404 intermittently. My initial thought was maybe the whole web application had the issue but didn’t see this happening with any other site collections on the same web application. And I got this error only 1 out of 10 times. But another user seemed to have got it from the first try itself. It really baffled me for couple of hours. So I did an IIS reset and even restarted the SharePoint timer service on the SharePoint web front ends. That didn’t seem to help either.


Resolution

At some point, I realized that this was a site collection specific issue. This site collection had its own dedicated database. I had to detach and attach the content database of this site collection from the web application using Powershell (read dismount and mount)to resolve this issue.

Few weeks back I had done a detach/attach of the same content database from Central Administration. I think performing dismount and mount from Central Administration console led to this behavior. I still find this weird though.

P.S.: Please make a note of the Content DB name before you start this operation

Dismount-SPContentDatabase "<ContentDBName>"

Mount-SPContentDatabase "< ContentDBName >" -DatabaseServer "<DBServerNAme>" -WebApplication http://SiteName