Wednesday, October 31, 2012

SharePoint 2007 "Code blocks are not allowed in this file" after saving a file from Word

Received the error after trying to save to a SharePoint document library via Word.
The method I used to resolve was to 

Go to Site Actions -> Site Settings.Click the "Reset to site definition" link.
The type in the link that is not working "Latest Documents/Forms/AllItems.aspx" and just reset this library 
This was fine for me as I didn't have any customizations as they will be reset.

Tuesday, August 28, 2012

SharePoint 2010 - Exception: Invalid object name 'Webs'.

After running SP 2010 Cumulative update package and attempting Wizard I ran into the following error on a development box

Exception: Invalid object name 'Webs'.


Not very clear error .... but after looking in the Upgrade.log I found the following error pointing to a ContentDB


[DEBUG] [8/24/2012 7:01:02 PM]: Retrieving site definition for language 1033...
[OWSTIMER] [SPUpgradeSession] [ERROR] [8/24/2012 7:01:02 PM]: Upgrade [SPContentDatabase Name=WSS_Content] failed.
[OWSTIMER] [SPUpgradeSession] [ERROR] [8/24/2012 7:01:02 PM]: Exception: Invalid object name 'Webs'.
[OWSTIMER] [SPUpgradeSession] [ERROR] [8/24/2012 7:01:02 PM]:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

Armed with this information I checked the content DB in question using SQL loads of tables/stored procedures were missing - see pictures below

Other Tables contained many more as below
















As this was a development box I was able to remove the  web application and content DB - re-ran the upgrade wizard and all was good. 


Wednesday, March 28, 2012

SharePoint 2007 - Update multiple Site Collections quota values

Out of the box SharePoint 2007 does not offer an automated way to modify existing site collections with a quota value. For example if you have a quota "Extranet" with a size limit of 3GB that's been applied to 1000 sites currently there is no method to update this value on batch


However using the "SharePoint Administration Toolkit" you can run the following command


The following would update all the sites using the quota extranet with the new value


  • stsadm –o updatequota –quotaname Extranet

The following would update all the sites using the quota extranet with the new value but only that are contained in WSS_Content_001 


  • stsadm –o updatequota –quotaname Extranet -contentdb WSS_Content_001

For more examples follow this link 
http://technet.microsoft.com/en-us/library/ee449569(office.12).aspx