Archive for May 28, 2012

Export MetaData Terms

Central administration provides a way to import metadata term sets and terms by uploading a CSV file. However, it does not provide a mechanism for exporting terms to a CSV.

There are quite a lot of PowerShell and command line utilities on the web for accomplishing this, however, the ones that I found did not cater for terms that are more than one level deep. After all, you can create a term hierarchy that is up to seven levels deep.

So, to help fill this gap I’ve written a simple PowerShell script that does exactly this.

One caveat with importing CSV files through Central Administration is that it can only import one term set per CSV. So when exporting more than one set you have to create a separate file for each of them. You’d have thought the import script would have been able to handle multiple sets…
Read more

SPRequest ULS Entries

The SharePoint ULS logs always report objects not being explicitly disposed of, even for some of the SharePoint object model calls, although these are supposedly false positives.

Now, not all entries that are flagged will be issues, but initially there’s no apparent easy way of determining if the object is indeed causing a memory leak.

A sample log entry will look like:

An SPRequest object was reclaimed by the garbage collector instead of being explicitly freed. To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it. Allocation Id: {FDE3179D-E9C7-476B-9E60-ED68C55827ED} To determine where this object was allocated, set Microsoft.SharePoint.Administration.SPWebService.ContentService. CollectSPRequestAllocationCallStacks = true.

The last line of this entry indicates a way of getting more useful information to allow you to diagnose the problem and determine if it requires fixing.
Read more


Get every new post delivered to your Inbox

Join other followers: