Archive

Posts Tagged ‘restore from backup’

SharePoint: The specified SPContentDatabase has been upgraded to a newer version

April 6th, 2011 No comments

     Yesterday I was trying to restore the Web-application from fresh SQL-backup of database of production server. Doing that I used the algorithm described in one of my previous post “How to Restore a SharePoint Site from a Database Backup”. I restored backup into a new database, then I tried to create a new Web-application connected to the restored database, however, the undertaking failed, because I received the following error:

The specified SPContentDatabase Name=WSS_CONTENT_PROD Parent=SPDatabaseServiceInstance has been upgraded to a newer version of SharePoint. Please upgrade this SharePoint application server before attempting to access this object.

The specified SPContentDatabase has been upgraded to a newer version of SharePoint. Please upgrade this SharePoint application server before attempting to access this object

     According to the error some update has been deployed on the production server and has led to the version increase. The obvious solution was to upgrade the local environment. First of all, I went to Central Administration->Operations->Servers in Farm and found out the local current version of SharePoint, it was 12.0.0.6504.

Where to take look at version

     In the same time the current version on production was 12.0.0.6510. By means of the page “How To find the SharePoint version” I discovered the cumulative update I should have set up to bring local version to production version. I downloaded the required update and installed. Unfortunately, despite the successful installation, the local version didn’t change at all and the error still remained during a new Web-application creation. When the standard steps don’t help, we need a trick. I tried to find where the restored database contains the information about version. The table Versions struck my eye:

SELECT [VersionId]
      ,[Version]
      ,[Id]
      ,[UserName]
      ,[TimeStamp]
      ,[FinalizeTimeStamp]
      ,[Mode]
      ,[ModeStack]
      ,[Updates]
      ,[Notes]
  FROM [WSS_CONTENT_PROD].[dbo].[Versions]

Table Versions

     As you can see, we have one record where version is greater than local version (12.0.0.6510 > 12.0.0.6504). I replaced 12.0.0.6510 with 12.0.0.6504 using the following sql-command:

Update [WSS_CONTENT_PROD].[dbo].[Versions] 
SET [Version] = '12.0.0.6504' 
where [Version] = '12.0.0.6510'

     After this trick I was able to create a new Web-application connected to the restored database without errors. Of course, Microsoft doesn’t welcome any handmade changes in content database and you should avoid doing them, but if you don’t have a choice you can attempt at your own risk 🙂 In my case it has saved much time and life energy for me 🙂

Related posts:

SharePoint: How to Restore a SharePoint Site from a Database Backup

March 22nd, 2011 No comments

     From time to time I restore the Web-application I’m working on from the SQL-backup of database of production server. The main reason for that is to have the actual local environment and to make sure that a new functionality I’ve implemented will work correctly on production server with actual data. Our production server and developer machines are in one domain and for this case the usual sequence of actions is:

  1. Restore backup into a new database using Microsoft SQL Server Management Studio;
  2. Create a new Web-application (Central Administration->Application Management->Create or extend Web application->Create a new Web application):
    • scroll to “Database Name and Authentication”-section and replace Database Name (generated by default) with the name of just created database;
    • scroll to “Application Pool”-section and make sure that a security account for a new application pool has the required permissions on the content database you’ve recovered;
  3. Go to restored Site Collection Administrators (Central Administration->Application Management->Site collection administrators) of just created Web-application and check that they are valid in the new environment, if not, replace them with valid ones;
  4. [Optional] Here some people suggest doing stsadm –o upgrade –inplace –url http://<just created web application url>, but I don’t, because everything works fine in my case;

Happy restoring!

Related posts: