DCSIMG
The schema version (3.0.149.0) of the database sps_content_db on MOSS - Adlai Maschiach

Adlai Maschiach

" You have to show in order to be seen "

News

Favorite Links

news

CardSpace

Books

Other InfoCards Proj

Virtual Earth

WSS / Sharepoint

SOA , Biztalk & ESB

CLR / .NET

The schema version (3.0.149.0) of the database sps_content_db on MOSS

The schema version (3.0.149.0) of the database sps_content_db on MOSS

I have installed the other day two patched:

Security Update for Windows SharePoint Services 3.0 x64 Edition (KB934525)http://www.microsoft.com/downloads/details.aspx?familyid=667335DD-DF2E-4F14-A130-5758701BE055&displaylang=en 

Security Update for Microsoft Office SharePoint Server 2007 x64 (KB937832)http://www.microsoft.com/downloads/details.aspx?familyid=1D319164-D133-4493-BE27-1AEDA62362C4&displaylang=en

... which you can read about in here:
Description of the security update for Windows SharePoint Services 3.0: October 9, 2007
http://support.microsoft.com/kb/934525

The point is that after reset to the Server I got this error in the Event Log:
--------------------------------------------------------------------------------------
The schema version (3.0.149.0) of the database spscontentdb on XSQLMOSS is not consistent with the expected database schema version (3.0.151.0) on XMOSS.  Connections to this database from this server have been blocked to avoid data loss.  Upgrade the web front end or the content database to ensure that these versions match.
---------------------------------------------------------------------------------------
This error was the "only" explanation of why  the SharePoint Portal , and SharePoint Admin Site wouldn't run/start :'(

After a few google-ing and not finding any thing I had to find the wheel by my self

Ok, the solution is that for each relevant DB in the EventLog you should go to the Versions table in the DBs look for the schema version which is "wrong" and update it to the "correct" one.

The point is that each time you apply a patch to the WSS/MOSS, the WSS/MOSS "randomly" auto-increments , in our case it was in the "small version".
And , NO, you can't install the patch on the SQL Server - Ahh, yes, I forgot to mention the fact that this is a Small Farm: On one server there's the MOSS (with Index and search service) , and on the other there's the SQL Server which didn't get the patch version.

Comments

Marc Hosy said:

Thanks a lot, it fixed my problem.

I can not believe they (Microsoft QA) let that happen...

# November 12, 2007 9:32 PM

Stefano said:

You are a GENIUS is 2 days now that I was trying to fix the problem.

MANY THANKS

# November 17, 2007 9:13 AM

Adi said:

Thank you. It solved my problem.

# November 30, 2007 11:30 AM

Neil Hodgkinson said:

Dude

You should never ever directly edit the database

This problem can be fixed in a supported manner

psconfig -cmd upgrade -inplace b2b -wait -force

will resync the schema versions

# November 30, 2007 11:54 AM

Mike Pullen said:

Um, tried the psconfig, and it didn't do anything, just another error message. So it's time to live dangerous.

# December 7, 2007 9:22 PM

Brian Nettles said:

You should delete the comment left by Niel Hodgkinson--the guy that called you Dude.  His fix does not work and just wastes everybodies time.  Your blog is right on.  Thank you.  I bet Niel would probably tell people to never change settings in your registries...Dangerous right?  Nothing would ever get fixed if I never lived dangerously.  

# December 21, 2007 9:05 PM

Jim Falgout said:

Sir, you saved us HOURS of restore time. After having problems with the DST fix, we found out that some databases did not work afterwards (this was a migrated database from 2003, all new sites disappeared post-fix!!). If you ever make it to Denver, I owe you lunch, dinner and a case of beer :-)  Jim

# March 23, 2008 3:51 AM

Mirrored Blogs said:

Recently during our CMS to MOSS upgrade we were having issues with the timer jobs not running on time

# March 24, 2008 3:31 AM

Scott said:

Very Helpful! Thank You!

# March 25, 2008 4:39 PM

Sipi said:

really thank you Adlai!! it was extremely helpful.

# July 10, 2008 5:48 PM

Bert Van Landeghem said:

Hello,

guys, what Neil Hodgkinson said is true, do not ever edit the database directly. Database schema’s are not upgraded for nothing… If a front-end send a query using a new feature from the hotfix to the database, and the database is not able to respond to this query because it hasn't got the new functionality, it can crash your frontend… If the "psconfig -cmd upgrade -inplace b2b -wait -force" doesn't work, there will probably be yet another problem and you should investigate further (pay attention when copying from IE to a command window: a "-" is not always a "-"). You might also want to try running the "SharePoint Products and Technologies Configuration Wizard", which is the GUI version of the psconfig.exe. Both tools also produce massive logs, and it's really worth digging though those when fixing things. Good Luck!

# July 11, 2008 4:25 PM

Michael said:

Do we run the psconfig -cmd upgrade -inplace b2b -wait -force on the SQL server or the FrontEND server?

# July 15, 2008 7:13 PM

Philippe said:

Thank you very much, i've spend several hours on it

Merci !!!

# July 16, 2008 4:43 PM

Gopal said:

Couple months ago I installed SharePoint Services and portal on one machine running Windows 2003 server and MS-SQL Server 2005.

Then I read in Sharepoint services Inside Out that I can install SharePoint Services 3.0

Since my sharepoint has some data in the database (SharePoint Services 2.0) I installed #.0 on a different Server as Farm and my database server is the same (as 2.0)

I would like to convert the 2.0 database to 3.0

What steps I  need to take.

Please help if you can Thanks

Gopal

# July 28, 2008 12:16 PM

Belzebu74 said:

Worked for me many thanks

# August 11, 2008 1:40 PM

ламинат said:

6pThank's.1o I compleatly agree with last post.  rmz

<a href="http://skuper.ru">паркетная доска</a> 2g

# August 24, 2008 10:29 AM

Øyvind Skaar said:

Brilliant. A bit scary to alter the value, but it turned out just fine.

# September 8, 2008 3:44 AM

Jon W said:

Here's a link to the Microsoft KB article which tells you NOT to do this direct database edit.

support.microsoft.com/.../en-us

When you apply sharepoint updates, changes are often made to the SQL stored procedures or tables. By not allowing the sharepoint upgrade to complete correctly, you've incorrectly told sharepoint that your database has these new changes. The error your recieving was put in place to protect from data corruption that will occur when the new binaries on your system call the "old" stored procs instead of the new ones.

while the updates may not effect "all" functionality, something WILL be broken now.

# September 16, 2008 12:19 PM

Dan Szepesi said:

I'll make it simple, if you follow these steps, here is what to expect:

1)  Your short term pain will be over

2)  Your long term pain will potentially be excruciating because:

---Your data might be suspect since SharePoint will expect that the schemas have been correctly updated everywhere.  This means that the OM will expect that all the  stored procedures and columns, indexs, etc have all been updated.  They most likely havent been since you effectively bypass that process b y manually changing the schema number.

---If you ever need assistance from PSS and they find out that you did this, expect a very painful road to recovery that may include complete disaster recovery back to the point where you made the change.

# September 16, 2008 12:38 PM

Mitja said:

This command worked for us.

Thanks

psconfig -cmd upgrade -inplace b2b -wait -force

# November 26, 2008 5:21 AM

disappointed said:

Sad... this is not helpful at all..

Make it helpful please and post what exactly you changed in the database and how you changed it.

# December 20, 2008 7:56 PM

Glenn Sweeney said:

I have tried for over 3 weeks doing every varient of psconfig and the sharepoint wizard.. apparently it works for some.

IT NEVER WORKED ON MY BRAND NEW NOT IN USE MOSS THAT I STUPIDLY UPGRADED TO SP1.

Its pathetic microsoft is causing these issues i had the same problem on previous WSS installs. Just edit the database directly ms has taken out several sharepoint servers with their automatic updates etc. If ms cant make it work straight out of the box using your own hacks to fix it is the only choice.

When ms pulls its finger out and starts not causing these issues we will stop applying hack fixes. At least so far noone has had any problems with this hack fix compared to say the numerous issues causes my sharepoints "hotfixs".

Its completely unacceptable for automatic ms updates to take down running servers.. they didnt even have kb info till days after they released the updates. What else am i supposed to do with several clients unable to do any work ???

Sometimes u just gota ignore the pansies and do what makes it work.. whos more important the client.. or some guy posting on the forum who hasnt had the same issue. (If it was the same psconfig would have fixed 1 of the several sharepoints that went down.)

# January 13, 2009 7:42 AM

Glenn Sweeney said:

Maybe i was a bit hot headed before. Ideally noone wants to apply such a hack. But theres no way my clients can accept weeks of non working systems just to prove some esoteric point.

The reality is sharepoint is a hack

look at the way making custom themes works...

or the way bdc is impliemented.. (dont we all love manual xml file editing!!)

or the pathetic upgrade process from previous editions (and they removed functionality)...

or how about the huge number of sharepoint blogs with useful information compared to the almost nonexistent "help" on ms site.. i think that tell us all somethings very wrong in sharepoint land

sharepoints great when its working but lets not pretend it was designed and implemented well.. when it so isnt.

# January 13, 2009 8:21 AM

Inconsistent Schema Versions | keyongtech said:

Pingback from  Inconsistent Schema Versions | keyongtech

# January 18, 2009 7:27 PM

Skhumbuzo Mjoji said:

This solution works like a charm. only one question though... does this mean we have down-graded? for the fact that when you upgrade, the version gets updated, does manually changing this value down-grade the server. this is because in my case i had to change the version number from 3.1.6.0 to 3.1.3.0. if anyone has an answer, please send to mjoji357@gmail.com or skhumbuzo.mjoji@gijima.com.....

thank you in advance

# February 6, 2009 10:34 PM

HISDRDYWIiqE said:

110UBN

# February 20, 2009 6:40 PM

Daniel Painter said:

Although this may "Work" all of you who directly edited your databases are now officially in an unsupported state.

If you have issues in the future Microsoft can deny you support or offer you only “Best Effort” support.

THIS IS A BAD IDEA, if you have a support contract with Microsoft do not follow the directions indicated within this blog. For everyone else; don’t follow the directions indicated within this blog.

Doing so may resolve your current issue but you might just find yourself dealing with great pain at a later date.

# March 17, 2009 9:42 PM

Victor said:

Do not edit the database directly!

1: your system will be unreliable, as someone said the schemas are there for a reson.

2: ANY SUBSEQUENT UPDATE WILL FAIL

3: YOUR SYSTEM WILL BECOME UNSUPPORTED and you will be required to build a CLEAN NEW FARM when you run into trouble, and YOU WILL run into trouble

# March 18, 2009 8:59 AM

Albert said:

Hi all,

Still failed after executing

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>PSCONFIG.EXE -cmd upgrade -inplace b2b -wait -force

Failed to initiate the upgrade sequence.

An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown.

 Additional exception information: The specified SPContentDatabase Name=SharePoint_AdminContent_f632e5bf-cbd9-4d9f-a819-1811feb4f2b6 Parent=SPDatabaseServiceInstance Name=MOSSDB has been upgraded to a newer version of SharePoint. Please upgrade this SharePoint application server before attempting to access this object.

Total number of configuration settings run: 2

Total number of successful configuration settings: 1

Total number of unsuccessful configuration settings: 2

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of SharePoint Products and Technologies failed.  Configuration must be performed before you use SharePoint Products and Technologies.  For further details, see the diagnostic log located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\PSCDiagnostics_5_27_2009_20_22_10_522_1072285013.log and the application event log.

# May 27, 2009 1:24 PM

Neil Hodgkinson said:

What is wrong with calling someone a Dude ?

# July 6, 2009 7:47 PM

Chrisdog514 said:

A sharepoint service pack resloved my issue.

# July 20, 2009 7:56 PM

siaj said:

I changed the database manually and got rid of the error but my configuration wizard failed to run. I reverted back the version and changed it through "psconfig -cmd upgrade -inplace b2b -wait -force" and things worked magically after that. Even the database schema error was gone too.

Note : If you update the database manually, you wont be able to open a case with MS support and there is a good chance to corrupt the whole farm as the binaries will still be on the old version  

# July 25, 2009 1:57 AM

Rodrigo said:

Dear all, thanks for your answers.

I'm very frustrated about one issue similar like that.

This is my layout:

- 1 Server Web Front End (MOSS 2007 with SP2).

- 1 Server SQL Server 2005.

I am trying to install one more Web Front End so, I have proceed with installing Office SharePoint Server 2007 Win32 English. But, after running installation I run "SharePoint Products and Technologies Configuration Wizard", I tried to connect to an existing server farm, I specify the database and domain windows account and running the wizard I get this error message:

"Failed to connect to the configuration database.

An Exception of type System.InvalidOperationException was thrown. Additional exception information: Operation is not valid due to the current state of the object."

I have seen in the event viewer the 3 following events:

EVENT ID 5617:

The schema version (3.1.10.0) of the database SharePoint_AdminContent_4795276a-aec1-48c6-a1ed-13bc65c79ab9 on DB_SERVER_NAME is not consistent with the expected database schema version (3.0.149.0) on MACHINE_NAME.  Connections to this database from this server have been blocked to avoid data loss.  Upgrade the web front end or the content database to ensure that these versions match.

EVENT ID 104:

Failed to connect to the configuration database.

An exception of type System.InvalidOperationException was thrown.  Additional exception information: Operation is not valid due to the current state of the object.

System.InvalidOperationException: Operation is not valid due to the current state of the object.

  at Microsoft.SharePoint.Administration.SPContentDatabase.ValidateDatabaseSchemaCompatibility()

  at Microsoft.SharePoint.SPSite.PreinitializeServer(SPRequest request)

  at Microsoft.SharePoint.SPWeb.InitializeSPRequest()

  at Microsoft.SharePoint.SPWeb.EnsureSPRequest()

  at Microsoft.SharePoint.SPWeb.get_Request()

  at Microsoft.SharePoint.SPListCollection.EnsureListsData(Guid webId, String strListName)

  at Microsoft.SharePoint.SPListCollection.EnsureListsData(String strListName)

  at Microsoft.SharePoint.SPListCollection.Undirty()

  at Microsoft.SharePoint.SPBaseCollection.System.Collections.IEnumerable.GetEnumerator()

  at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.get_AdministrativeTasks()

  at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.EnsureSystemTask(String title, String description, Int32 priority, String actionTitle, String actionUrl, String service, String systemId)

  at Microsoft.SharePoint.Administration.SPWebApplication.Provision()

  at Microsoft.SharePoint.Administration.SPWebServiceInstance.Provision()

  at Microsoft.SharePoint.Administration.SPFarm.Join()

  at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()

  at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()

  at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

EVENT ID 100:

Configuration of SharePoint Products and Technologies failed.  Configuration must be performed in order for this product to operate properly.  To diagnose the problem, review the extended error information located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\PSCDiagnostics_10_21_2009_9_29_0_901_1519056841.log, fix the problem, and run this configuration wizard again.

How can I solve it???? It's impossible to continue. I suppose that it is because the server farm is with the last SP (SP2) and I am trying to configure SharePoint in another server with a previous version... But is there any protocol to do it?.

Thank you!!!.

# October 21, 2009 10:31 AM

David said:

Thank You. Solved the issue immediately.

# December 11, 2009 4:03 PM

Faizel Mootheril said:

Thank You!!!

# January 15, 2010 8:37 PM

dwinter [MSFT] said:

Folks, please stop following this blog post.  DO NOT MODIFY THIS TABLE.  You will be unsupported and cause instablity that we cannot predict.  If you have done this, you should think hard about how you will recreate the databases you altered in this way.  

Most plans will involve copying all of the data out via explorer view, creating a new DB, and importing it back in.  There are many ways to do this, and plenty of 3rd party tools that you could use to recreate the database.

If you don't recreate the databases or you are contemplating doing what is in the post, know this:

1) When an action is completed, we never go back and execute that action again.

2) You have purposefully skipped multiple upgrade actions that will NEVER occur against the database--so you will have unknown conditions that Microsoft never tested for and WILL NOT produce a hotfix for you on.

3) You probably don't know what upgrade actions you are skipping. For instance, did you know that 3.0.150.0 (which you are skipping by following this guidance) is in SPContentDatabaseSequence and is Microsoft.SharePoint.Upgrade.FixSecurityCorruptions?  Ask youself... are you really prepared to skip fixing security corruptions?

If you find yourself dealing with a problem that has led you to this post, please instead call Product Support.

# March 22, 2010 11:55 PM

keerthi l said:

This helped me resvolve my inconsistent error.

as Adli mentioned, i just updated inconsistent version with correcto version.

thanks for posting this blog

# April 29, 2010 2:08 AM

Sharepoint Server Error saat update « Code Are Toy said:

Pingback from  Sharepoint Server Error saat update &laquo; Code Are Toy

# June 10, 2010 11:05 AM

MacBean said:

I see lots of recommendations of how NOT to do this, but too little information on how to do it correctly.  MS just issued yet another WSS patch this last week.  We are told to upgrade the web front end (WSS?) or the database, but frankly I don't even understand what that means.  They are on the same server, and the patches were automatic.

CAN SOMEONE POST HOW MS WOULD APPROVE OF US FIXING THE ISSUE?

# June 21, 2010 9:51 PM

MacBean said:

Here is my understanding of what happens.  Microsoft issues a Sharepoint patch which upgrades Sharepoint but not the database instance version in SQL Server.  To bring them into synch, one can use the psconfig approach from the command prompt (which failed near the end for me), or the Sharepoint Configuration Wizard.  I'm guessing you can do it either way.  After trying the command prompt approach, I then tried the Wizard which succeeded.  The last step was to start each of the application pools in IIS.

I don't know if one has to run the configuration wizard twice or what, but I can say you must be logged in using an account that has power to upgrade SQL Server, not just Sharepoint.  They may not be the same.

I checked the SQL Server Sharepoint database dbo.Versions table last 200 rows in SQL Server Management Studio before and after running the Wizard.  After running the Wizard the TimeStamp column on two records was updated to today, and one of the Versions now reads the same as what the EventLog error originally told me it should be (but wasn't).  Hope this helps someone.

# June 21, 2010 11:04 PM

HWYSTR455 said:

Amazing this is still an open topic, when the original post was in 2007! You would think there would be a KB out there by now, but guess I'm not too surprised.

After spending countless hours researching, what worked for me was:

**Run the Configuration Wizzard twice**

Upon doing so, the second time (for me), the Central Admin site and all original content was accessible. On another farm, ALSO MOSS 2007, only running the config wizzard once corrected the issue.

Try this first, which is relatively easy, before moving on to other possible soul-utions.

-Mike

# August 26, 2010 4:15 PM

Udaya K said:

Thanks a lot.It saved my time

# September 7, 2010 2:12 PM

Avinash said:

Thankz dude :).U saved my neck

# September 27, 2010 3:38 PM

Srdjan said:

Hi Guys,

I have fixed this problem by running SharePoint Products and Technologies Configuration Wizard.

After installing updates, everything works fine (restart is not required)

# November 8, 2010 11:23 AM

Srdjan said:

Hi Guys,

I have fixed this problem by running SharePoint Products and Technologies Configuration Wizard.

After installing updates, everything works fine (restart is not required)

# November 8, 2010 11:26 AM

ToratordDrale said:

Dav1dThe5trange|@BlackBlitz7п»ї this comment made me ROFL

 365canadianpharmacy.com

thplousaqq

# February 25, 2011 6:02 PM

ToratordDrale said:

habboadict1|dont hate on fred cuz u wish u were him u crazy crackbabies uп»ї no he is FUNNY!

 canadianmedstore.in

thplousaqq

# February 27, 2011 4:07 PM

Sidney said:

Thank you!! I was nearly losing it (my mind)..

# April 22, 2011 5:55 PM

Jigger said:

Genius!!! Worked for me in SQL 2008 while upgrading SharePoint databases.

Thanks

# September 19, 2011 10:41 PM

הובלות said:

Really genious! you saved me, thanks!

# October 19, 2011 8:27 AM

sypeFoesselob said:

nIsgZqoZxnEq http://www.andrewsambell.com pLkqQkwRevZz <a href="http://www.andrewsambell.com">moncler outlet</a> oJsuDozTelQz

# November 15, 2011 11:11 AM

invaddeds said:

# February 6, 2012 10:24 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: