Pages

Tuesday, November 29, 2011

Simple concept: Database is up to date, but some sites are not completely upgraded.

[Question]:
After Mount-SpcontentDatabase, I m having Database is up to date, but some sites are not completely upgraded. on /_admin/DatabaseStatus.aspx. When I click on the /_admin/UpgradeStatus.aspx it shows me the status - Succeeded


How can I know what site collection is not upgraded and how can I upgrade it?


[Answer]:
First of all, to identify what site collection doesn't got upgraded, run:


stsadm.exe -o localupgradestatus > upgradestatus.txt


Open upgradestatus.txt and scroll down to the end of the file, you will see similar section:
In this picture as you see, there no site collection that need upgrade.
If you have any, you can identify them by searching by word "Needs upgrade" in this file.

Secondly, run the command in the PowerShell:


$id=(Get-SPContentDatabase -Identity "{Your content db name}").Id
Upgrade-SPContentDatabase -id $id

Finally, check the upgrade status by running stsadm again:
stsadm.exe -o localupgradestatus > upgradestatus.txt


In my case, it helped me get rid of the site collection "Needs update" warning in the report generated by stsadm.exe -o localupgradestatus


P.S. But still, I am having Status "Database is up to date, but some sites are not completely upgraded." which doesn't bother me since localupgradestatus shows me "0" objects need upgrade.


No comments:

Post a Comment