SharePoint Dragons

Nikander & Margriet on SharePoint

Tag Archives: sharepoint2010

SharePoint 2010 Recycle Bin Blues

Let’s do a recap of the SharePoint 2010 Recycle Bin functionality. There are two stages, the site recycle bin and the site collection recycle bin. When the end user throws away content, it first is thrown into the site recycle bin (where, by default, it stays for 30 days). After this retention policy causes the deletion of content from the site collection bin, its added to the site collection recycle bin, where only site collection admins can restore it. Both recycle bins are enabled by default.

Check the recycle bin settings by doing this:

Controleer eerst de thresholds en settings voor beide recycle bins:

1. Open SCA

2. Go to Application Management > Manage Web Applications

3. Select the web application your interested in

4. In the ribbon, click General Settings

5. Check the recycle bin settings

If you can’t find an item in the site recycle bin, pay attention to a couple of things:

  • The end user who has deleted the content will see it in the site recycle bin, other end users won’t. The site collection admin will see all deleted content.
  • If you delete a folder, it will show up in the recycle bin. Individual sub items located in that folder won’t, and you can’t navigate thru that folder to find them.
  • Be careful, the content may have been renamed or relocated instead of deleted.

When the content is not there, a couple of things may have happened:

  • An administrator used SCA to turn off the recycle bins which causes the deletion of all recycle bins (and may even have turned it back on again, which makes no difference).
  • A recycle bin threshold has been reached which caused the automatic deletion of content.
  • An administrator deleted the content permanently from the site collection recycle bin.

When the content has been deleted permanently, there’s only one way to get it back: get it from an old back-up. This goes something like this:

1. Create a back-up of the current environment.

2. Restore the old content.

3. Export the content that is deleted in the current environment to the file system.

4. Restore the back-up of the current environment.

5. Upload important files.

Of course, you can only do this in production if there’s a time slot that allows for this, and it’s usually better to restore the content in another environment. The following blog post describes an interesting variant on the back-up/restore scenario: http://blogs.msdn.com/b/modonovan/archive/2007/09/14/how-to-recover-sharepoint-document-once-deleted-from-recycle-bin.aspx

If you don’t have access to old back-ups, you’re in a dark place where unfortunately you won’t be able to restore the lost files. One last thing, be aware that end users may be confused by the fact that deleted items may still show up in searches. This confusion will go away eventually after indexing as taken place.

Advertisements

Field Of Dreams

For the TechNet Wiki Ninja blog, Margriet wrote about the movie Field of Dreams, heimwee and fernwee and the Ping tools for SharePoint: http://blogs.technet.com/b/wikininjas/archive/2012/12/18/field-of-dreams.aspx

SharePoint 2010: Enable-SPFeature vs good old stsadm

Installing SharePoint 2010 features via SharePoint solutions can easily be done via the good old stsadm tool, using something like this:

stsadm -o addsolution -filename mine.wsp
stsadm -o deploysolution -immediate -name mine.wsp -allowGacDeployment
stsadm -o execadmsvcjobs
iisreset

stsadm -o activatefeature -name mine -url http://mysrv
iisreset

The equivalent in PowerShell is also pretty easy, doing something like this:

Add-SPSolution “C:\software\myfolder\mine.wsp”
stsadm -o execadmsvcjobs

Install-SPSolution –Identity mine.wsp –GACDeployment
stsadm -o execadmsvcjobs

Enable-SPFeature –Identity mine –url http://mysrv
stsadm -o execadmsvcjobs

For symmetry purposes, and if you work in IT you need to have some love for symmetry, we’re also including how uninstalling it via both stsadm and PowerShell. First, the stsadm tool:
stsadm -o deactivatefeature -name mine.wsp -url http://mysrv
iisreset

stsadm -o retractsolution -name mine.wsp -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name mine.wsp -override
iisreset

In PowerShell, installing goes like this:
Disable-SPFeature –Identity mine –url http://mysrv
stsadm -o execadmsvcjobs

Uninstall-SPSolution –Identity mine.wsp
stsadm -o execadmsvcjobs

Remove-SPSolution –Identity mine.wsp
stsadm -o execadmsvcjobs

Optionally, check out if it worked by getting a list of all features for a site collection:

get-spfeature site http://mysrv

Now, let’s get on to the reason we wrote the blog post. What should you choose: Enable-SPFeature or the good old stsadm tool? Surprisingly, when it comes to actually activating features, we’re going go with the good old stsadm tool.

Why? The Enable-SPFeature PowerShell command doesn’t give extensive feedback regarding everything surrounding the feature activation. In other words, it might tell you that feature activation succeeded, but won’t tell you anything if custom code in the FeatureActivated event receiver (which runs after feature activation) throws an exception. The execution of custom code in a FeatureActivated event receiver is usually the tricky part of an installation, so this is not ideal.

The stsadm equivalent of  the Enable-SPFeature PowerShell command, stsadm -o activatefeature -name mine -url http://mysrv , does provide this information and displays the error message of the exception. This is a lot more helpful and the behavior you’re typically looking for. More than that, it sure looks like the Feature Activation deployment step in Visual Studio 2010 does exactly the same thing.

In other words, when it comes to feature activation, we still prefer the use of the good old stsadm tool!

Ping Dragon for SharePoint 2010 (ppclient)

The Ping Dragon pings a SharePoint page, using Windows authentication. It will request a SharePoint page and returns the HTTP status code as well as the time it took the request to complete. Ping Dragon is a supporting tool for the forthcoming PressurePoint Dragon for SharePoint 2010, a performance/load/stress testing tool.

Ping dragon is easy to use, you need to start a command prompt and pass it the following parameters:

– URL of SharePoint page

– user name

– password

– domain name

Get the Ping Dragon at http://gallery.technet.microsoft.com/Ping-Dragon-for-SharePoint-70fb299e

SharePoint Emulators for SharePoint 2010

SharePoint Emulators for SharePoint 2010 make unit testing a lot easier: http://blogs.msdn.com/b/visualstudioalm/archive/2012/11/26/introducing-sharepoint-emulators.aspx Now, we just need emulators for SharePoint 2013/CSOM, because this seems to be a little too late.

SharePoint migration and content databases that are too big

In his first job, Nikander started out as a junior internet engineer for the newly founded Internet division of a large Dutch media company (Wegener). The internet division was called WIN (Wegener Internet Nederland) but didn’t exist long (only 2-3 months) because Wegener decided to buy one of the most successful Dutch internet companies of the time: Riverland (later this company was called Netcast, but it also doesn’t exist anymore).

Because of this lucrative take over, the ceo’s of Riverland decided it would be a good idea to move to a different location and expand. The ceo’s even had a better idea: they understood that they could save some money by letting all junior developers move the stuff and let them do the cabling for the building, instead of hiring professionals to do the job. During this period of a couple of weeks, Nikander only saw computers from a distance, but did get his hands on miles of cables and hundreds of cable ties. We stumbled upon this web site, so for old time sake, if you want to be like Nikander and have fun with cable ties, please check out cable ties and hundreds of cable ties.

Once Nikander was allowed access to computers again, one of the first problems he was dealing with was a database not performing well because of its size. Recently, a customer experienced the same thing. They have a single SharePoint content database, used by a single site collection containing many subsites, which is gaining rapidly in size, already surpassing 200 GB. How to deal with this?

First some pieces of relevant knowledge:

  • A site collection can be moved to another content database.
  • A single site collection is connected to a single content database.
  • You can set the content database status to offline to prevent new site collections being connected to such a content database.
  • Offline content databases will still continue to grow in size because of new content in existing site collections.
  • Don’t let the content database stay in offline status for too long (see http://www.sharepointsteve.com/2011/02/side-effect-of-setting-content-databases-to-offline for more info).
  • You can have +/- 300 content databases per SharePoint web application.
  • You can have +/- 2000 site collections per content database, and 250,000 (non personal) site collections in a farm.
  • The recommended maximum site collection size is 100 GB.
  • The recommended maximum content database size is 200 GB.

BTW, if you like some help with checking SharePoint requirements, try the SharePoint Max Dragon (http://gallery.technet.microsoft.com/Maxer-for-SharePoint-2010-8cd0f26f).

In this scenario, the approach of dealing with a large content database goes something like this:

  • Create new content databases.
  • Put the current one in offline status.
  • Promote current sites to site collections via custom code.
  • Divide site content equally among new content databases to share the load and adhere to MS size recommendations.
  • Change old content database status back to normal.

As a rule of thumb, we like to go for content databases of approx. 50 GB in size.

Now, we know not everybody has the possibility to use custom code, and most of the time it’s not even the best approach. Instead, you can use one of the quality sharepoint migration tools out there.

RBS Back Up

If you use RBS (see http://www.loisandclark.eu/Pages/blob.aspx for detailed info) and back-up and recover the SharePoint farm or content database, or use SQL Server backup and recovery, RBS data will automatically be backed up and recovered as well using the SQL FileStream provider. This won’t happen in cases where you’re using a 3rd party RBS provider. The following link contains a nice overview of what gets backed up using which method: http://technet.microsoft.com/en-us/library/cc261687(office.14).aspx.

Colligo Briefcase

It looks like Colligo succeeded in bridging the gap between SharePoint and iPad (or iPhone) with their product Colligo Briefcase. Colligo Briefcase (http://www.colligobriefcase.com/) is a secure solution to work with SharePoint on an iPad/iPhone or iPod. Let’s take a look at some of the features of Colligo Briefcase:

  • You can view all your SharePoint files, including Office documents, PDFs, images and emails with the appropriate icons.
  • You can edit files, lists and metadata, even while offline and sync these changes when you’re online again.
  • You can choose what you want to sync, so you can choose to sync only the documents that you need.
  • You have a Favorites option where you can add documents that you want to access very often.
  • Using the search capabilities makes it easy to find content.

Installing and configuring Colligo Briefcase is rather simple. You can find Colligo Briefcase in the App Store. After installing the tool you will find an icon on your device. Next is the configuring part, by clicking the Colligo Briefcase icon you will be able to add a SharePoint site. The basic things you have to know are: Url, Username and Password. But that shouldn’t be a problem because you’re using SharePoint all the time ;-). You can also set the sync interval (there are several choices), the storage limit (from 20 MB to Unlimited) and the lists to sync (which lists do you want to sync on your device). After configuring these settings and clicking Done Colligo will start syncing your content:

clip_image002

Using Colligo Briefcase is very intuitive. On the left you will find the lists (as you’re used to have in SharePoint). By selecting a list you will get an overview of the contents of that list on the right. Okay, it is not SharePoint but it works almost the same. You have to get used to it but that will take only 30 minutes and after that you can work on your iPad in your SharePoint site.

A cool feature of Colligo Briefcase is the preview option. You can select a document library, click on a document and click Preview. You can also read the full version but a preview version is handy to know if you’ve got the right document.

clip_image004

If you are looking for a product to work with on your Apple device, you should definitely take a look at Colligo Briefcase. Right now Colligo Briefcase has a special launch price of $2.99, plus it’s a universal app so you can install it on both your iPad and iPhone!

Slideshow web part

SharePoint Ad Rotator is a nice slideshow web part: http://spadrotator.codeplex.com/ It randomly displays images from a SharePoint library and displays images one at a time or all using a transition effect.

Batch check-in follow up

Some time ago, we wrote about doing batch check-ins  at https://sharepointdragons.com/2012/04/19/batch-check-in/#comment-676 The comments to this article proved to be very interesting. Recently, Chris Ang added to the discussion and if you’re interested in batch check-ins, you should check out the comments of this article.