Archive | SharePoint Updates RSS for this section

SharePoint 2013–March 2013 PU BCS database didn’t upgrade

This happened to me quite a while ago but I haven’t found the time to blog about it.

When you applied the March2013 PU (see here Stefan Goßners Blog post – about it and why you should apply it) it happened that your BCS database didn’t upgrade and was listed in central administration as a database for which additional actions are required.

To fix this open your good friend Powershell and do the following:

$bcsdb = Get-SPDatabase | where{$_.type -eq “Microsoft.SharePoint.BusinessData.SharedService.BdcServiceDatabase”}
$bcsdb.provision()

When you now check central admin you should find it marked with “no action required”

DISCLAIMER: If your farm gets broken by whatever reasons, don’t blame me. Don’t ever run scripts you just found on the internet on your prod environment, if you don’t understand what they are doing.

Advertisements

“Database is up to date, but some sites are not completely upgraded” – and the journey to straighten things out

I faced an interesting thing in the SharePoint environments of one of my customers the other day…obviously the cool stuff never happens on your local environments Smiley.

This customer had patched their environment lately, everything was running smooth, nobody was complaining about anything, then, by incident, I checked the databasestatus.aspx page in central admin and found some databases marked with:

“Database is up to date, but some sites are not completely upgraded”.

image

So my first idea was, because they had a awful lot of databases in this state, to loop through all the databases and perform an upgrade-spcontentdatabase on the ones which contain not upgraded sites.

After running the script I found nothing changed on the UI (turns out if you do an IIS reset or an AppPool recycle this changes quite quickly). So after doing an IIS reset on the CA box I found some databases in the desired state “No action required” others though still in the same state.

So I checked the upgradestatus.aspx in the CA and found some warnings and errors for the databases containing sites which are not upgraded in the referenced upgrade logs. The most warnings I saw stated that

“Feature could not be upgraded. Exception: Unable to access web scoped feature (id: FeatureID) because it references a non-existent or broken web (id: webID) on site “siteurl”. Exception: System.ArgumentException: Value does not fall within the exptected range.”

When I checked the mentioned site and searched for the specific web I found this web existing in the recycle bin of the site.

So my next step was to create a PowerShell script to loop through all the sites and figure out which sites contain web objects in their recycle bin.

Once I have done that I created another PowerShell script removing all the webs from the recycle bin of the affected sites.

After that I ran my upgrade script again and found all databases in the “No action required” state except for two.

The first one was easy, this database was taken offline and for that couldn’t be upgraded.

For the second one I found Errors in the upgrade logs telling me:

Microsoft.SharePoint.Portal.Upgrade.MossSiteSequence failed.

Exception: Attempted to perform an unauthorized operation.                      

at Microsoft.SharePoint.SPSite.set_AllowDesigner(Boolean value)
   at Microsoft.SharePoint.Portal.Upgrade.AllowMasterPageEditingAction.Upgrade(SPSite site)
   at Microsoft.Office.Server.Upgrade.SiteAction.Upgrade()
   at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()

This confused me because I knew that my customer had SharePoint Designer disabled for this webapplication.

After some asking around it turned out this wasn’t always the case, they had it enabled for a short timeframe… So my assumption is one of their sitecollection administrators must have enabled SharePoint Designer on his or her site during that short timeframe and maybe even modified something with it… scary huh?

Now SharePoint Designer being disabled on webapplication level SharePoint seems to have a little problem with that when performing upgrade operations on this site.

To overcome this issue I enabled SharePoint Designer for the webapplication and rerun my upgrade script again and afterwards disabled the SharePoint Designer settings again on the webapp level. After that I had all databases in every SharePoint Admins favorite state “No action required”

Status list webpart continues to load…

Recently I was with a client and encountered some very interesting behaviour on one of their SharePoint 2010 sites.

Lets assume you have a list containing data and a status list which visualizes some of the data of the list in form of an graphical KPI, now you place a status list webpart on one of you pages displaying the information from your status list… everything works just fine. Unfortunately clients don’t call me in to show me how fine things are working…My client wanted to place a second (and even more) status list webparts on the same page and here is what they experienced:

image

The webpart which was placed last on the page will continue to show you the status bar instead of your beloved KPI.

After some investigation I found that my client was running on the December 2011 CU:

image

I reproduced this issue on my local environment after putting the February 2012 CU on the issue was fixed (I put February on on purpose to see how far back this issue has been fixed…)

image

image

“Upgrade required” and missing SQL aliases a funny little fact

I encountered an interesting issue today when I was scaling out a existing SharePoint 2010 farm. So after installing SharePoint, several language packs, service pack and CUs I successfully joined the server to the farm.

No issues so far.

When I was checking the “servers in farm” link within Central admin I found right next to my newly joined server a big red “Upgrade required” message. But it wasn’t highlighting what component it wants to have upgraded. Normally this component would also be highlighted in red.

So I double checked my installation and made sure that I had all components installed properly, I even ran the configuration wizard one more time. Still the same result.

So my next step was to force SharePoint to write me some upgradelogs and give me some more details on what it actually was missing.

For that I used the commandline psconfig:

psconfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

Once it was done I checked Central admin for the upgrade status and found the upgrade failed as expected but now SharePoint wrote me some nice upgradelog which I could look into.

After checking the log I found a few errors telling me that SharePoint tries to upgrade databases located under a certain SQL alias but it could not find them.

So I fired up cliconfg and found the SQL alias not existing after adding it (and also adding it to the x64 version of cliconfg) I just re-ran the SharePoint configuration wizard and after checking the servers in the farm section in central admin tataaaaaa the server was added with a nice grey “no action required” right next to it.

And what is the key takeaway from this? If you use SQL aliases (which I am a pretty big fan of) make sure to have them configured consistent across all your servers and when you see a warning telling you that an “upgrade is required” don’t  immediately think that you have to install software but also check your configuration.

SharePoint UPS SyncDB Maintenance

When I was reading Spencer Harbar’s blogpost on User Profile Service Application Sync Database Maintenance with the February 2012 Cumulative Update I was curious about what exactly will be changed storeprocedure-wise when you deploy the February 2012 CU. So before patching one of my test-environments I decided to do a simple check up front to see what is there storeprocedure-wise and compare it to the same output after the installation of the CU.

I found a nice blogpost on how to extract the StoreProcs of a database by David Cumps (here).

Here is the output of my comparison (As Spencer mentions in his blogpost there is a lot of updating of existing storeprocs and even the db schema update) I was just curious about what has been removed and what has been added.

Store Procedure Removed with  CU Added with CU
DeleteObjectReferences  

x

mms_getmvobjecttype  

x

mms_GetObjectIDsForCSLinkIDs  

x

mms_getrowwithrdnpobjid

x

 

mms_getrowwithrdnpobjid_holdlock

x

 

mms_getrowwithrdnpobjid_xlock

x

 

mms_getrowwithrdnpobjidfast

x

 

TruncateInstanceData

 

x

TruncateObjectsInternal

 

x

TruncateSystemObjects

 

x