KB2775511 – Blowing up my Usage Data Import Timer Job

This issue is described here: http://support.microsoft.com/kb/2916922 

This patch (along with  KB2682011 or KB2882822) could cause the Usage Data Import timer job to not import the .Usage files into the Usage Logging Database. When this timer job runs you will notice the following in the ULS logs:

OWSTIMER.EXE (0x51A0) 0x59E4 SharePoint Foundation Usage Infrastructure a5rv High Failed to delete usage log file ‘E:\Logs\ServerName-20130701-2117.usage’ after data import. Exception: System.IO.IOException: The process cannot access the file because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileInfo.MoveTo(String destFileName) at Microsoft.SharePoint.Administration.SPProvisioningAssistant.MoveFileOrDirectory(FileSystemInfo fi, String newPath) at Microsoft.SharePoint.Administration.SPProvisioningAssistant.DeleteFileOrDirectory(FileSystemInfo fi) at Microsoft.SharePoint.Administration.SPUsageLogImporter.ImportUsageLogFiles(List`1 usageLogFileList)

This causes a few unwanted side effects: The usage logs will grow as they are not getting imported and purged and this timer job will take a looong time to run and can cause your timer service recycle timer job to fail. I was manually restarting the timer service each day for a while, but we ended up uninstalling the patch as a longer term solution. This issue is fixed in the December 2013 CU, but that was not an option in this case.

This is why I always recommend you have a test environment…This was caught before it got pushed to PROD!


SharePoint List Error – Exception from HRESULT: 0x80131904

Short version – This was fixed with the following procedure:

  1. Go into List Settings for the list in question
  2. Under columns I clicked the Column Ordering link
  3. Changed Title’s position from Top to be 1 (It was 2 from the top in my case)

Explanation – This list had a lot of columns (60 to be exact). After further research there’s something unique that happens when you have 16 columns in a list. Any time someone creates 16 columns in a list and then sets any column that was created in position 16+ to position 1 (It doesn’t matter the type of column) in the list you will receive that error.

Technical Explanation:  The problem here is because SharePoint utilizes SQL server row wrapping to allow a maximum number of columns in a SharePoint list where SharePoint Server will create several rows in the database when data will not fit on a single row. This is controlled via the property RowOrdinal, which identifies which row a certain field should be stored. When RowOrdinal = 0, the field is stored in the first row of the row set for that list item and when RowOrdinal = 1, the field is stored in the second row of the row set for that list item.

Lets take a look at this in action:

  1. Save list as template, open Manifest.xml
  2. Find the <Fields> Section (Notice The RowOrdinal values??)<FieldName=”Test_Task” Version=”2″ DisplayName=”Test Task” Type=”Choice” RowOrdinal=”1″ ColName=”nvarchar35″ StaticName=”Test_x0020_Task” SourceID=”{f62365c4-32fa-4f67-a714-963aa49a3f8a}” ID=”{402b7fff-701c-45b4-bc06-ffaf51dd3fe8}” FillInChoice=”FALSE” Format=”Dropdown” Indexed=”FALSE” EnforceUniqueValues=”FALSE” Required=”TRUE”>

    <FieldName=”Title” Version=”2″ DisplayName=”$Resources:core,Title;” Type=”Text” RowOrdinal=”0″ MaxLength=”255″ Indexed=”FALSE” EnforceUniqueValues=”FALSE” ColName=”nvarchar1″ FromBaseType=”TRUE” StaticName=”Title” SourceID=”http://schemas.microsoft.com/sharepoint/v3” Required=”FALSE” ID=”{fa564e0f-0c70-4ab9-b863-0177e6ddd247}”/>

Errors in ULS Logs:

System.Data.SqlClient.SqlException: Cannot insert the value NULL into column ‘tp_DocId’, table ‘SP2010_Content_10030.dbo.AllUserData'; column does not allow nulls. INSERT fails. The statement has been terminated.

This issue is similar to http://blogs.msdn.com/b/allenwang/archive/2012/05/21/sp2010-survey-list-error-and-event-id-5586.aspx

SharePoint Error – Database is too old and upgrade is required

I was recently working on a SharePoint Migration Project where we migrated from a SharePoint 2010 farm to a shiny new SharePoint 2013 SP1 farm. Some of the sites were to stay in “2010 Site Collection Mode” until the site owner was ready to upgrade and others were upgraded to 2013 right away. Below is a screenshot or Central Admin showing the database upgrade status for 3 content databases:

  1. The top database was completely upgraded to 2013. Looks beautimus!
  2. The middle database has some sites upgraded and others in 2010 mode…Looks OK..
  3. The bottom database SHOULD have some site collection in 2010 mode and others in 2013 mode just like the middle database. Something looks off here right? Running the Upgrade-SPContentDatabase cmdlet did nothing and PSConfig did nothing.


Looking at the eventvwr Application Log shows some interesting new errors:


Nothing has changed in the farm from a SharePoint Server perspective…I was able to run the Get-SPContentDatabase command on each content database in this state and get back the appropriate webapp object for each. When clicking the content database anywhere in Central Admin I would get the error “Object Reference not set to an Instance of an Object” and this was causing other errors in the environment:

  1. Alerts were not working
  2. Issues with editing files/check-in and check-out
  3. Not able to select any site collection in Central Admin

Users could still get to the site collections…The experience just wasn’t optimal. I took a look through ULS, Eventvwr, and SQL Logs and couldn’t find anything besides a larger stack trace for the Object Reference Error and not much else.

Something happened between this content database and the SharePoint server causing the database to be in this funky state. PowerShell to the rescue!
The Fix: Running the Dismount-SPContentDatabse and Mount-SPContentDatabase fixed the issue.

For example:

SharePoint – Query User Information List in SQL

NOTE: DIRECTLY querying any SharePoint SQL database is NOT SUPPORTED (Except the Logging Database). If testing the query below I’d recommend backing up and restoring the content database to a different SQL Server (Non SharePoint and Non Production) and running through this.

Now that we got the disclaimer out of the way, here is the background –  I was working with Microsoft on a support issue which involved user accounts not showing up in the User Information List correctly. Here’s a SQL script that Microsoft provided that helps query this information in SQL.

Replace the sitecollectionurl with the site collection URL and ADAccount with the samAccountName in question. This will return quite a bit of information about that user in the specified site collection.

SharePoint – Publishing Site Collection Features Enabled and then Disabled. Save Site As Template is gone!

I ran into an issue recently where we enabled the SharePoint Server Publishing Site/Site Collection features and then disabled them at a later time. Microsoft doesn’t allow Publishing sites to be saved as a template per: http://support.microsoft.com/kb/2492356

When you disable the site collection/site feature it SHOULD bring back the Save Site as Template option, but in my case it did not. I tried enabling and disabling the feature a few times, but no such luck. PowerShell to the rescue!

Run the following script to bring back the Save Site as Template Option (Make sure you have already disabled the Publishing site collection feature):

Leaving a Yammer Network

I recently decided to leave my first Yammer network…I joined too many networks to keep up with so something had to give. It took me a while to find the “Leave Network” option so I figured I’d post it out there for you/me to reference in the future :) Pretty simple stuff, but I couldn’t find a blog or article that was high in Bing search results

  1. Click the Ellipses (. . .)
  2. Click Edit Profile
  3. Click Networks
  4. Click Leave Network
  5. Wave Goodbye




SharePoint 2013 SP1 – Windows Server 2012 R2 Prereq Install Error

So I got my hands on the SharePoint 2013 w/ SP1 ISO as well as a shiny new Windows Server 2012 R2 ISO and decided to give it a go! I installed Server 2012 R2 (Return of the shiny “start” button in the lower left), then installed SQL 2012 w/ SP1, and then moved on to SharePoint 2013 SP1. I fired up the splash screen and chose to install the Prerequisites…Good news is IIS installed/configured on the first attempt. In Server 2012 RTM there was a bug where sometimes IIS would fail to configure and you would have to install IIS manually and then let the prerequisite installer configure it appropriately. I DID get an install error though! This time the culprit is the Microsoft Information Protection and Control Client. I tried rebooting a few different times and could not get it to install so I decided to give an offline install a whirl.

You can download the install file for the Protections and Control Client here: http://go.microsoft.com/fwlink/p/?LinkID=219568

After downloading setup_msipc_x64.msi save it somewhere on the SharePoint server.

Then open CMD and type the following commands (If the CD drive is different than D change the directory to that drive letter):

After this you will be all set!


Also, my last post talked about installing SP1 after installing RTM + March 2013 PU…I did find one other difference with the ISO. The yellow bar at the top for Yammer/Office 365 is green if you install with the SP2013 SP1 Iso! Check it out:



SharePoint 2013 – Service Pack 1

SharePoint 2013 SP1 has been released! I’m a day late…so this isn’t exactly hot off the press


Check out the new addition to the Central Administration menu! SharePoint got Yammered..



Testing Notes: I setup a SharePoint 2013 Server (Windows Server 2012 RTM/SQL Server 2012 SP1) Farm to test out Service Pack 1 and what it brings to the table. This was a fresh installation – installed the Server OS > installed SQL 2012 > installed SP2013 RTM bits > upgraded to March 2013 PU bits > upgraded to SP1 bits > ran config wizard.

The Bad:

  1.  The Document Conversions Load Balancer Service appears to be in a state where it will NOT start: (NOTE: This also happened using a SP2013 SP1 ISO)ServicesOnServerErrorLB
    1. I am able to click the LB Service link, which brings me to the settings page
    2. LBSettings
    3. But when I click Start I get redirected to this error page:
    4. Error Starting Load Balancer
  2. Also, apparently Yammer and OneDrive for business are critical issues (You can just click the X to close)
  3. YammerO365CriticalError

The Good:

  1. When creating a new User Profile Service Application you are presented with the option to use Yammer for Social Collaboration!
  2. SP1UPSCreation
  3. This adds  the following entry to the navigation bar (Starting to look more and more like O365):
  4. SP1NavBarYammer
    1. Clicking Yammer Redirects to http://webappurl/_layouts/15/Yammer.aspx
    2. sp1clickyammer
    3. Clicking TAKE ME TO YAMMER redirects to https://www.yammer.com/?trk_event=sp_landing
  5. By clicking the Office 365 link on the left (Current) navigation in Central Administration you can configure Yammer (Which is just an activate/deactivate functionality for the link in the navigation bar..discussed above) and you can configure Office 365 settings for the OneDrive and Sites links in the top navigation bar.
  6. This is the screen you are presented with..pretty cool! I actually just worked on a project where we deployed an IIS HTTP Handler to rewrite URL’s to an Office 365 tenant…now this functionality is baked into SharePoint
  7. OneDriveConfigSP1
  8. I did some testing by typing in my trial Office 365 tenant so I could play around here.
  9. After clicking OK the change was nearly instant (I did need to clear browser cache in IE..but I tested in Firefox/Chrome right away which I wasn’t previously authenticated to the SharePoint site and the links were updated within a matter of seconds).
  10. Clicking  OneDrive and Sites Redirected Perfectly!
  11.   OneDriveO365Redirect
  12. For every good thing there is a bad thing though. The About Me link still redirects to the On Premise MySite Host…This is OK because most of the content here is directly synchronized from Active Directory, which makes the profile pages On Prem/Office 365 very similar (minus manually typed in information – Skills, About Me, Ask Me About, etc.). If the user had permissions within the UPS to create a personal site and has ALREADY done so..the links to that On Prem personal site collection will still show as links on the left-hand side. If you are looking for a truly hybrid environment there will need to be settings adjustments to lock down users being redirected to Office 365 (UPS Permissions settings, Decide if you want to use audiencing/targeting to send some user on prem/some users to Office 365, etc.
  13. Just note setting these features in Central Admin to redirect users to an Office 365 tenant will not change user permissions settings in the UPS (This is very similar to using Trusted MySite Locations pre-SP1…and then using audiencing to route specific users to the MySite Tenant. In the past you could point a MySite Location at an Office 365 tenant, but the About Me link would be broke (User Not Found) and when clicking on a people column containing that user it would give the same error (Because the URL structure after person.aspx is different for on premise and Office 365..Hence the need for a HTTP Handler or some other form of URL redirect). Otherwise you may end up managing personal site collections on prem, when these users actually have storage in Office 365.
  14. MyProfile

SharePoint Server Licensing – Failover Rights

I was working on a SharePoint installation where we would be using VMWare vCenter Site Recovery Manager to failover from the primary datacenter to a secondary datacenter for DR purposes. There would be identical infrastructure in the secondary datacenter, but it would be on standby. This got me thinking about licensing…I called Microsoft and they indicated that a SharePoint Server license by itself does NOT include failover rights and that you would need to purchase Software Assurance to be supported in this scenario. Good thing I called..