Friday, December 11, 2009

[MOSS/WSSv3] SharePoint 2007 build numbers (UPDATE)

Here a list of build number of SharePoint 2007. Based on the build number you can determine which patchlevel your SharePoint environment is on:

12.0.0.6520 - MOSS 2007/WSS 3.0 October '09 Cumulative update
12.0.0.6514 - MOSS 2007/WSS 3.0 August '09 Cumulative update
12.0.0.6510 - MOSS 2007/WSS 3.0 June '09 Cumulative update
12.0.0.6504 - MOSS 2007/WSS 3.0 April '09 Cumulative update
12.0.0.6421 - MOSS 2007/WSS 3.0 SP2
12.0.0.6341 - MOSS 2007/WSS 3.0 February '09 Cumulative update
12.0.0.6335 - MOSS 2007/WSS 3.0 December '08 Cumulative update
12.0.0.6327 - MOSS 2007/WSS 3.0 August '08 Cumulative update
12.0.0.6318 - MOSS 2007/WSS 3.0 Infrastructure Update
12.0.0.6300 - MOSS 2007/WSS 3.0 post-SP1 hotfix
12.0.0.6219 - MOSS 2007/WSS 3.0 SP1
12.0.0.6039 - MOSS 2007/WSS 3.0 October '07 public update
12.0.0.6036 - MOSS 2007/WSS 3.0 August 24 '07 hotfix package
12.0.0.4518 - MOSS 2007/WSS 3.0 RTM

You can find the build number of your environment via:
Central Admin > Operations > Servers in Farm

Source

Friday, November 20, 2009

[MOSS] Event 5214 - The EXECUTE permission was denied on the object 'proc_FetchDocForUpdate'

[ISSUE]
The following event was occuring on our environment quite often:

Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Database
Event ID: 5214
Date: 11/19/2009
Time: 4:28:54 PM
User: N/A
Computer: [SERVER]
Description:
Insufficient SQL database permissions for user '[account]' in database 'SharePoint_AdminContent_3995bd54-8091-4157-b162-8aaaf7116355' on SQL Server instance '[SQL SERVER]'. Additional error information from SQL Server is included below.

The EXECUTE permission was denied on the object 'proc_FetchDocForUpdate, database 'SharePoint_AdminContent_3995bd54-8091-4157-b162-8aaaf7116355', schema 'dbo'.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

[SOLUTION]
To solve this issue, perform the following steps:

  • Open the SQL Management Studio
  • Browse to the database in question, in our case "'SharePoint_AdminContent_3995bd54-8091-4157-b162-8aaaf7116355"
  • Open the database and then Security > Roles > Database Roles
  • In the right part of the window, right click the WSS_Content_Application_Pools role and click Properties
  • Select the menu option "Securables"
  • Click "Add"
  • Select "Specific objects" and click "OK"
  • Click "Object Types", select "Stored Procedures" and click "OK"
  • Add the following stored procedures: proc_FetchDocForUpdate, proc_GetWebMetaInfo, proc_UpdateDirtyDocument, proc_UpdateListItem
  • Click "OK" to add these stored procedures
  • Select the added stored procedures and select "Execute" in the "Grant" column.
  • Click "Add" once more
  • Select "Specific objects" and click "OK"
  • Click "Object Types", select "Views" and click "OK"
  • Add the following view: UserData
  • Click "OK" to add this view
  • Select the added view and select "Select" in the "Grant" column.
  • Click "OK" to complete

Wednesday, November 04, 2009

[MOSS/WSSv3] Post Installation automation

Just ran into the following ver usefull tool on Codeplex: The Post Installation Tool or PIT. This tool automates various configuration changes after you have installed SharePoint. Via a config file you can customize some configuration tasks.

Saturday, October 24, 2009

[MOSS/WSSv3] Feature cleanup

Have you ever seen the following error in one of your logs:
Failed to determine definition for Feature with ID '<guid>'. Skipping this feature for element querying consideration.
This message is caused by a feature that has been removed from the environment, without being properly deactivated before removal. SharePoint still has a reference to the feature, so it tires to activate the feature. But because it doesn't exist anymore, it will skip the feature.

Last week I ran into a tool which can scan your environment for such a "faulty feature". This tool is called the "SharePoint Feature Administration and Clean Up Tool" and can be found on Codeplex.

When you have started the tool, it contains a button called "Find Faulty Feature in Farm", which starts the scan for faulty features.

Have fun with this great tool!

Wednesday, October 21, 2009

[MOSS/WSSv3] Content Deployment/StsAdm export/import issue

[SITUATION]
At a customer the developers created a custom solution that displayed image in a picture library on a page and used the image title to overlay across the image. If the image title would be empty, the solution would use the site title. The solution worked fine on our staging environment.

We use Content Deployment to deploy the sites from the staging environment to a live environment. On the live environment, the overlayed text suddenly became the picture name instead of the picture title.

[ISSUE]
After some troubleshooting it turned out that Content Deployment deploys the site just fine from staging to live, however when an image title field is empty, Content Deployment populates this field with the image name! After performing some tests we discovered that this behavior is also occuring when:
  • Deploying a document with an empty title. The document name is used.
  • Using stsadm export/import to deploy the site instead of Content Deployment.
[CAUSE]
We raised a support call at Microsoft, but although they were able to reproduce the issue they are not going to fix this. According to "internal resources" this behavior is "by design". We could raise a design change, but that would probably be denied because other customers would deliberately use this behavior.

[SOLUTION/NEXT STEPS]
In this situation we had to modify our code to check if the title field is empty OR equal to the image name. Although this workaround works, we do not believe that this behavior is by design. When creating a "backup" using stsadm export and "restore" with stsadm import, you would expect no data to be changed in that process..........

Monday, October 05, 2009

[MOSS/WSSv3] Mergecontentdbs change

I have used the STSAdm operation MergeContentDbs many times in the past. But since I heard of the bug in this operation I temporarily stopped using it.

Fortunately the bug was fixed in the April Cumulative Update. So this weekend I moved some larger site collections to their own database and then I ran into an issue I didn't experience before:

MergeContentDbs used to copy the content to the new database and remove it from the old database to free up the data. However this time the amount of free space in the database did not change! Searching the Internet revealed a change in functionality of the operation.


"If a site collection is very large, an attempt to delete the site collection from a Web application fails. This causes the stsadm -o mergecontentdbs command to fail when you try to move site collections from one content database to another. This issue is resolved by adding an optional -gradualdelete parameter to the stsadm -o deletesite command. If this parameter is present, SharePoint marks the site collection as deleted to prevent further access while a SharePoint Timer job gradually deletes the data in the site collection. After you install the hotfix package that this article describes, the stsadm -o mergecontentdbs command uses this gradual delete functionality by default."



To remove the data from the database you can do two things:
  1. Run stsadm -o databaserepair to remove all orphans
  2. Wait until the daily timer job "Site Collection: Delete" runs, most of the times during the night.

- mergecontentdbs gotcha
-
Article updates for the April Cumulative Update

Wednesday, September 23, 2009

[MOSS/WSSv3] Anonymous access causes documents to appear in search and accessible for users

[ISSUE]
A customer was running into a strange issue with documents that were located in a document library which had strict permissions, but the documents were returned in the search results to all users AND users were able to open them. So it looked like SharePoint didn't obey the security settings.

[SITUATION]
In the past someone played around with the anonymous access setting. Because the environment is used as an intranet this was not supposed to be configured, so we disabled anonymous access on web application level. A few weeks ago, we noticed that users were able to open sites and documents even though they did not have permissions to it.

[CAUSE]
After some investigation and checking with Microsoft it turns out that SharePoint had some left over anonymous settings. Even though anonymous access was disabled at web application level, users were still able to access the documents anonymously.

As it turns out does the disabling anonymous access on the web application level only remove the administration pages of anonymous access, it does not remove all settings that have been configured before that. To make matters worse, we even ran into an extra issue:
After we re-enabled anonymous access, configured anonymous access on site level to None instead of Entire Web Site and a full crawl ran, the documents were still returned and available for users. Some more investigation turned out that, just like permissions, the anonymous access settings were also copied when breaking inheritance. Picture the following situation:
  • Enable anonymous access on the web application
  • Configure anonymous access on a top level site to Entire Web Site
  • Break the permissions inheritance of a document library and change the permissions
  • Set anonymous access on a top level site back to None
  • Disable anoymous access on the web application
In this situation, because the permissions inheritance was broken when its parent has anonymous access configured, the document library also has anonymous access configured. The only way to correct this through the GUI is to enable anonymous access on the web application level AND site level, so the anonymous access administration pages are enabled again on the document library.


[BACKGROUND]
Basically what happens: If you remove anonymous access form the web application only, on the webs it remains set. In case of the document library. By default it inherits permissions form its parent. The permission inheritance most probably was broken on the doclib when anonymous access was still enabled. The permissions were copied from the parent and the anonymous access remained enabled.

[SOLUTION]
In order to fix this issue, I have written a PowerShell script which loops through the site collection, checking each web and each library or list. If it encounters a web or list that has anonymous access configured, it disables that access.



[Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$site = new-object Microsoft.SharePoint.SPSite("http://<site collection url>")

foreach ($web in $site.AllWebs) {
$web.Url
if ($web.AnonymousPermMask64.ToString() -ne "EmptyMask") {
$web.AllowAnonymousAccess
$web.AnonymousPermMask64
$web.AnonymousPermMask64 = [Microsoft.SharePoint.SPBasePermissions]::EmptyMask
$web.Update()
}

foreach ($list in $web.lists) {
if ($list.AnonymousPermMask64.ToString() -ne "EmptyMask") {
$list.DefaultViewUrl
$list.AnonymousPermMask64
$list.AnonymousPermMask64 = [Microsoft.SharePoint.SPBasePermissions]::EmptyMask
$list.Update()
}
}
$web.dispose()
}


More info

Tuesday, September 22, 2009

[MOSS/WSSv3] Error 1387 when removing users from Farm Administrators group

[ISSUE]
Today I tried to remove the user accounts from the Farm Administrators group, that have left the company a while ago. Unfortunately I was unable to do so, SharePoint presented me with an error 1387.

[CAUSE]
Using Google I ran into the following blog post Unable to remove user from SharePoint Farm Administrators group : Error 1387. Here Tim was talking about the fact that the accounts were deleted and SharePoint was performing some kind of check.

[SOLUTION]
After temporarily recreating the accounts of the users, I was able to delete the accounts from the group successfully!

Tuesday, September 08, 2009

[MOSS/WSSv3] SharePoint 2007 build numbers

Here a list of build number of SharePoint 2007. Based on the build number you can determine which patchlevel your SharePoint environment is on:

12.0.0.6510 - MOSS 2007/WSS 3.0 June '09 Cumulative update
12.0.0.6504 - MOSS 2007/WSS 3.0 April '09 Cumulative update
12.0.0.6421 - MOSS 2007/WSS 3.0 SP2
12.0.0.6341 - MOSS 2007/WSS 3.0 February '09 Cumulative update
12.0.0.6335 - MOSS 2007/WSS 3.0 December '08 Cumulative update
12.0.0.6327 - MOSS 2007/WSS 3.0 August '08 Cumulative update
12.0.0.6318 - MOSS 2007/WSS 3.0 Infrastructure Update
12.0.0.6300 - MOSS 2007/WSS 3.0 post-SP1 hotfix
12.0.0.6219 - MOSS 2007/WSS 3.0 SP1
12.0.0.6039 - MOSS 2007/WSS 3.0 October '07 public update
12.0.0.6036 - MOSS 2007/WSS 3.0 August 24 '07 hotfix package
12.0.0.4518 - MOSS 2007/WSS 3.0 RTM

You can find the build number of your environment via:
Central Admin > Operations > Servers in Farm

[MOSS2007/WSSv3] "The expected version of the product was not found on the system" while installing update

[ISSUE]
I just tried to install the June Cumulative Update on a test environment. After the "Running detection" step, I got the following error:

"The expected version of the product was not found on the system"

[CAUSE]
Some troubleshooting revealed that we had installed SP2 for WSS and MOSS on the environment, but not for the installed language packs. After we installed SP2 for the WSS and MOSS Language Packs, the update installed just fine.