Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We're having a problem with workflows in a site collection. We see invalid parameter @tp_WokflowInstanceId passed to proc_UpdateListItem from SPRequest in V2V upgrated database when a SPListItem.Update() or SPListItem.SystemUpdate() are invoked. On the same server we created a new site collection with a separate database and there SPRequest behaves correctly.

The calls seen in SQL Server Profiler are as follows:

--FAILING UPGRADED DB, Contains a record in dbo.Versions referencing a 12.0... version number
exec sp_executesql N'BEGIN TRAN;DECLARE @@iRet INT,@DN nvarchar(256),@LN nvarchar(128),@@S uniqueidentifier,@@Level tinyint,@@DocUIVersion int,@ExtraItemSize bigint;SET @@iRet = 0;SET @@S=@wssp0;SET @@Level=@wssp1;SET @@DocUIVersion = 512; SELECT @ExtraItemSize = 0  EXEC @@iRet = proc_UpdateListItem @SiteId=@wssp2,@WebId=@wssp3,@ListId=@wssp4,@ItemId=@wssp5,@RowOrdinal=@wssp6,@OnRestore=@wssp7,@ReturnRowset=1,@UseNvarchar1ItemName=@wssp8,@ItemDirName=@DN OUTPUT,@ItemLeafName=@LN OUTPUT,@UserId=@wssp9,@TimeNow=@wssp10,@PreserveVersion=@wssp11,@IsMeetingsList=@wssp12,@IsIssueList=@wssp13,@IsNotUserDisplayed=@wssp14,@SystemUpdate=@wssp15,@ChangeLevel=@wssp16,@CheckinItem=@wssp17,@NeedClone=@wssp18,@MajorVersionsLimit=@wssp19,@MajorMinorVersionsLimit=@wssp20,@NewUIVersion = @@DocUIVersion OUTPUT,@Level=@@Level OUTPUT,@IsDocLib=0, @tp_Version=@wssp21,@CheckSchemaVersion=@wssp22, @tp_ContentTypeId = @wssp23, @nvarchar1 = @wssp24, @nvarchar3 = @wssp25, @nvarchar4 = @wssp26, @float1 = @wssp27 , @int2 = @wssp28, @ntext2 = @wssp29, @datetime1 = @wssp30, @datetime2 = @wssp31, @tp_Modified = @wssp32, @tp_WorkflowInstanceID = @wssp33, @tp_Author = @wssp34, @tp_WorkflowVersion = @wssp35, @tp_Created = @wssp36, @tp_Editor = @wssp37, @tp_ModerationStatus = @wssp38, @tp_ItemOrder = @wssp39 , @nvarchar5 = @wssp40, @nvarchar6 = @wssp41, @nvarchar10 = @wssp42, @int4 = @wssp43, @ntext4 = @wssp44, @bit1 = @wssp45, @bit2 = @wssp46, @bit3 = @wssp47, @uniqueidentifier1 = @wssp48, @int5 = @wssp49, @Size=@wssp50, @ExtraItemSize = @ExtraItemSize ,@NeedsAuthorRestriction=@wssp51,@NeedsDraftOwnerRestriction=@wssp52,@BumpLastDelete=@wssp53,@CreateItemVersion=@wssp54,@ItemName=@wssp55, @eventData=@wssp56, @acl=@wssp57,@IsFirstRow=@wssp58; IF @@iRet <> 0 BEGIN ROLLBACK TRAN; GOTO DONE; END 
EXEC @@iRet = proc_RemoveJunctions  @SiteId = @wssp59, @DirName = @DN, @LeafName = @LN, @FieldId = @wssp60, @Level = @@Level; IF @@iRet <> 0 BEGIN ROLLBACK TRAN; GOTO DONE; END 
EXEC @@iRet = proc_SecUpdateUserActiveStatus @wssp61, @wssp62; IF @@iRet <> 0 BEGIN ROLLBACK TRAN; GOTO DONE; END 
EXEC proc_ClearLinks @@S,@DN,@LN,@@Level, @wssp63; EXEC @@iRet = proc_EnsureTranLockNotRequired @wssp64, @wssp65, @wssp66;;IF @@iRet <> 0 BEGIN ROLLBACK TRAN; GOTO DONE; END; EXEC proc_UpdateDiskUsed @@S,1; COMMIT TRAN; '
--WORKING FRESH DB, no 12.0... references in dbo.Versions
exec sp_executesql N'BEGIN TRAN;DECLARE @@iRet INT,@DN nvarchar(256),@LN nvarchar(128),@@S uniqueidentifier,@@Level tinyint,@@DocUIVersion int,@ExtraItemSize bigint;SET @@iRet = 0;SET @@S=@wssp0;SET @@Level=@wssp1;SET @@DocUIVersion = 512; SELECT @ExtraItemSize = 0  EXEC @@iRet = proc_UpdateListItem @SiteId=@wssp2,@WebId=@wssp3,@ListId=@wssp4,@ItemId=@wssp5,@RowOrdinal=@wssp6,@OnRestore=@wssp7,@ReturnRowset=1,@UseNvarchar1ItemName=@wssp8,@ItemDirName=@DN OUTPUT,@ItemLeafName=@LN OUTPUT,@UserId=@wssp9,@TimeNow=@wssp10,@PreserveVersion=@wssp11,@IsMeetingsList=@wssp12,@IsIssueList=@wssp13,@IsNotUserDisplayed=@wssp14,@SystemUpdate=@wssp15,@ChangeLevel=@wssp16,@CheckinItem=@wssp17,@NeedClone=@wssp18,@MajorVersionsLimit=@wssp19,@MajorMinorVersionsLimit=@wssp20,@NewUIVersion = @@DocUIVersion OUTPUT,@Level=@@Level OUTPUT,@IsDocLib=0, @tp_Version=@wssp21,@CheckSchemaVersion=@wssp22, @tp_ContentTypeId = @wssp23, @nvarchar16 = @wssp24, @tp_Modified = @wssp25, @tp_WorkflowVersion = @wssp26, @tp_ModerationStatus = @wssp27, @tp_ItemOrder = @wssp28 , @nvarchar3 = @wssp29, @nvarchar4 = @wssp30, @float1 = @wssp31 , @int2 = @wssp32, @ntext2 = @wssp33, @datetime1 = @wssp34, @datetime2 = @wssp35, @nvarchar5 = @wssp36, @nvarchar6 = @wssp37, @nvarchar10 = @wssp38, @int4 = @wssp39, @ntext4 = @wssp40, @bit1 = @wssp41, @bit2 = @wssp42, @bit3 = @wssp43, @uniqueidentifier1 = @wssp44, @int5 = @wssp45, @nvarchar12 = @wssp46, @bit4 = @wssp47, @Size=@wssp48, @ExtraItemSize = @ExtraItemSize ,@NeedsAuthorRestriction=@wssp49,@NeedsDraftOwnerRestriction=@wssp50,@BumpLastDelete=@wssp51,@CreateItemVersion=@wssp52,@ItemName=@wssp53, @eventData=@wssp54, @acl=@wssp55,@IsFirstRow=@wssp56; IF @@iRet <> 0 BEGIN ROLLBACK TRAN; GOTO DONE; END  EXEC @@iRet = proc_EnsureTranLockNotRequired @wssp57, @wssp58, @wssp59;;IF @@iRet <> 0 BEGIN ROLLBACK TRAN; GOTO DONE; END; EXEC proc_UpdateDiskUsed @@S,1; COMMIT TRAN;'

I'm not sure what proc_GetVersion should return as both v12 and v14 have the same zero guids.

Any ideas why this happens and how to fix it?

Moving the site collection to a new database within the Web application did not resolve the issue. I still get

[COMException (0x80131904):

0x80131904] Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) +0

Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) +406

and

Unknown exception SQL 8145 @tp_WorkflowInstanceID is not a parameter for procedure proc_UpdateListItem.

share|improve this question
    
Todd Klindt suggested doing Move-SPSite to the new database. Interesting idea. –  Alexey Krasheninnikov Jul 21 '10 at 17:22
    
That didn't resolve the issue –  Alexey Krasheninnikov Jul 21 '10 at 17:44
add comment

1 Answer 1

up vote 2 down vote accepted

Although this issue has not been resolved, here's what we resorted to: create the Content Database from scratch. This was acceptable for our issue arose in a test environment.

Anyway, I think this could possibly also arise in a pre-production upgrade farm, so future investigation of such upgrade issues is more than welcome. Wish I had some horsepower and time to get back to troubleshooting this one. Always sad to leave unresolved issues behind.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.