SharePoint 2010 Tips

14. August 2011 15:24 by Eric in SharePoint, SQL Server  //   Comments (0)

Just came across those SharePoint 2010 tips lately, and would like to share with everyone if interested:

At its core, SharePoint Foundation is a provisioning engine - Inside Microsoft SharePoint 2010

"STS" stands for "SharePoint Team Services" - SharePoint 2010 Professional Administration

"vti" stands for Vermeer Technologies, Inc., the company that created FrontPage - Various sources

20 Web applications per SP2010 farm is a reasonable limit - Spencer Harbars

The client-side object model was introduced in SharePoint 2010. - Inside Microsoft SharePoint 2010

SharePoint 2010 projects must be configured to target .NET Framework 3.5 - Inside Microsoft SharePoint 2010

SharePoint 2010 is 64-bit only, no exceptions. - Technet

Never access the SharePoint configuration database or any of the content databases directly. Use the OM. - Inside Microsoft SharePoint 2010

The MSFT recommended limit of 10 applies to content application pools only, not service endpoints. -Spencer Harbars

16 GB RAM is recommended for DB servers in medium sized SP2010 farms. - Technet

Pre-grow SP2010 content databases for performance reasons. - Technet

A SP2010 Standard FIS license is limited to a single AD domain and related subdomains. - sharepoint.microsoft.com

BLOB caching can be used with host-named site collections in SP2010. - SharePoint Server Caches Overview

Use an XML webpart with XSL to create a RSS feed viewer in SP2010 Foundation. - Dux Raymond

Restoring a SharePoint SQL config DB backup is NOT supported, so ensure you document/backup your farm settings! - Sean McDonough

Look after your SQL tempdb. It is used constantly! - Michael Noel

Splitting your tempdb for performance should be based on physical - not virtual - CPU cores. - Michael Noel

SQL Server 2008 R2 is strongly recommended over RTM for performance reasons. - Michael Noel

Implement a 1:1 ratio of physical to virtual cores in your virtualised SP2010 farm for performance. - Michael Noel

Office 365 represents a shift from capital expenditure to operational expenditure. - Matt Groves

Following an upgrade to SP2010, you can still switch back to V3 visuals using PowerShell. - Todd Klindt

A feature instance is what gets created when a user activates your feature definition. - Inside Microsoft SharePoint 2010

SharePoint creates feature instances with entries in either a content db or the config db depending upon feature activation scope. - Inside Microsoft SharePoint 2010

The only file that is required for every feature definition is the feature manifest file that must be named feature.xml. - Inside Microsoft SharePoint 2010

The 4 possible feature activation scopes are Web, Site, WebApplication and Farm. - Inside Microsoft SharePoint 2010

SharePoint does not allow two versions of a feature definition to be installed side by side within the same farm: Updated versions overwrite earlier versions. - Inside Microsoft SharePoint 2010

The only way to back up your AAM configuration is to document it - Spencer Harbars

SP2010 automates SQL index defragmentation & statistics maintenance - "Database Maintenance for Microsoft® SharePoint® 2010 Products"

The DBCC CHECKDB command should be run on SharePoint DBs once a week. - "Database Maintenance for Microsoft® SharePoint® 2010 Products"

Do not auto-shrink databases or configure a maintenance plan that programmatically shrinks your databases. - "Database Maintenance for Microsoft® SharePoint® 2010 Products"

Shrink a database only when 50% or more of the content in it has been removed by user or administrator deletions. - "Database Maintenance for Microsoft® SharePoint® 2010 Products"

A BLOB cache persists across application pool recycles. - SharePoint Server Caches Overview

BLOBs are immutable. Accordingly, a new copy of the BLOB must be stored for each version. - Technet

Missing Server side dependencies - Problems and Solutions

10. August 2011 12:28 by Eric in SharePoint, SQL Server  //   Comments (0)

Quite recently, I have successfully managed the site-collection environment movement from the staging to the live hosting infrastructure with all the corresponding content and permissions. Then, we looked into the "Health Analyzer" from the central administration to find out a few interesting errors, which basically is complaining about "Missing Server side dependencies".

After fiddling around a bit, it turns out that some 3rd-party web-part hasn't been re-installed on the new production environment, which leads to this error to ask me to "Please install any feature/solution which contains this web. One or more web pages are referenced in the database".

Well, it occurs to me that the quickest way to work out the solution is to re-install the 3rd web parts all over again, then turn the features on, then reset the web server, then the problem goes away.

After going through all that, sadly, it didn't work out at all, which got me thinking about what the relationship between the web-parts and pages, because the part of the error message kept saying "WebPart class [xxxxx-xxxxx-xxxxx-xxxxx-xxxxx]" is referenced [11] times on the current farm". Based on that, it must be referenced in the content database somewhere about this information, so that it could keep tracking of all those relationship and load them up into the page load.

After opening the pandora box (Site-collection content database), I came up the following SQL query to narrow down what pages in this particular site collection has been referenced by those 3rd-party web parts.

SELECT distinct Webs.FullUrl, Webs.Title, AllDocs.DirName, AllDocs.LeafName
FROM AllDocs, Sites, AllWebParts, Webs
WHERE Webs.Id = Sites.RootWebId 
AND AllDocs.Id = AllWebParts.tp_PageUrlID
AND Sites.Id = AllDocs.SiteId 
AND tp_WebPartTypeId IN (
    SELECT DISTINCT tp_WebPartTypeId FROM AllWebParts (NOLOCK)

    WHERE tp_WebPartTypeId = 'WebPartClassId')

Once those pages are revealed, all I need to do is to delete site-collection, then remove them from recycle-bin, lastly remove them from site-collection recycle-bin

After a quick iisreset, magically, the issue has gone away.

In summary, this's the procedure of my solution

  • Step 1:  to identify what feature/web-part falling out (Feature-ID and Web-Part Class-ID) 
    Get-SPSolution <SolutionName>
  • if it turns out that  it’s to do with the feature, then disable the feature with ‘-force’ switch, then verify that by 
    stsadm -o displaysolution -name SOLUTION-NAME
  • Step 3: if it’s to do with web-part we have no longer used, then deleted the related pages permanently

    Once we done all that, we could  simply use my script to verify on the SQL Server level:  
    SELECT distinct Webs.FullUrl, Webs.Title, AllDocs.DirName, AllDocs.LeafName
    FROM AllDocs, Sites, AllWebParts, Webs
    WHERE Webs.Id = Sites.RootWebId 
    AND AllDocs.Id = AllWebParts.tp_PageUrlID
    AND Sites.Id = AllDocs.SiteId 
    AND tp_WebPartTypeId IN (
        SELECT DISTINCT tp_WebPartTypeId FROM AllWebParts (NOLOCK)
    
        WHERE tp_WebPartTypeId = 'WebPartClassId')


    If no result-set appear from the SQL query, it means that all related pages have been removed completely from the SharePoint (wait, not 100%, it might still appear from Search simply because Search using different database and caching modules)
  • Step 4: “iisreset -noforce”, then check the “Health Analyzer” for verifications.

 

What an quick-win tip! Hopefully, it will help anyone who has this similar issue later on.