FailDBReader when moving or renaming a folder

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
scarmichael
Posts: 6
Joined: Tue Sep 06, 2011 8:30 pm

FailDBReader when moving or renaming a folder

Post by scarmichael » Mon Jul 16, 2012 3:47 am

Hi

We have a folder in Fortress that whenever I try to perform an operation, such as moving or renaming, I get an error:

Item $/my_folder caused the transaction to fail: A database error has occured (FailDBReader)

Only one folder is doing this.

We tried restarting the IIS but nothing has changed.
I've seen similar issues posted elsewhere in the forum - but none of them have a solution.

Using Fortress 2.0.4.18845
We plan to upgrade to the latest, but first need to relocate the database.
Before any of that we would like to resolve this issue, in case it causes any further problems.

Here is an extract from the sgvault.log

Code: Select all

----13/Jul/2012 2:47:13 PM   myusername--mycomputer.mydomain.com(111.111.111.111)--SSL Disabled	System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK__#2D56FCD__956BCC472F3F454B'. Cannot insert duplicate key in object 'dbo.@tblfsobjectshares'. The duplicate key value is (232641, 232637, 0xfadafeafa1d6b3121e0a1e78149a726f, 1305).
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.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()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultServiceSQL.VaultSqlSCC.GetItemsForPathChange(VaultSqlConn conn, Int32 nRepID, Int64 nObjID, Int64 nOwnerFolderObjID, String strXml, String strXmlShares, VaultCloakedFolder[]& vcf, VaultFolderRightsItem[]& vfri, VaultShareHint[]& vsh)    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.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()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultServiceSQL.VaultSqlSCC.GetItemsForPathChange(VaultSqlConn conn, Int32 nRepID, Int64 nObjID, Int64 nOwnerFolderObjID, String strXml, String strXmlShares, VaultCloakedFolder[]& vcf, VaultFolderRightsItem[]& vfri, VaultShareHint[]& vsh)
----13/Jul/2012 2:47:13 PM   myusername--mycomputer.mydomain.com(111.111.111.111)--SSL Disabled	Rolling Back a transaction   at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
   at VaultServiceAPILib.VaultServiceAPI.EndTx(Int32 nTxUserID, String strTxID, Int32 nTxAction, VaultIntTx vit, VaultDateTime& dtTxBegin, Int64& nNewRevision, VaultResponseItem[]& responses, VaultRepository& repNew)
   at VaultService.VaultService.EndTx(String strTxID, Int32 nTxAction, VaultDateTime& dtTxBegin, Int64& nNewRevision, VaultResponseItem[]& responses)
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
   at System.Web.Services.Protocols.WebServiceHandler.Invoke()
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
   at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context)
   at System.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
   at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
   at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
   at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
   at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
   at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
 
----13/Jul/2012 2:47:13 PM   myusername--mycomputer.mydomain.com(111.111.111.111)--SSL Disabled	(5181cdbe-ae74-4262-948c-f8a4185362ed) EndTx (Revision - 0) returned: FailDBReader 
----13/Jul/2012 2:47:13 PM   myusername--mycomputer.mydomain.com(111.111.111.111)--SSL Disabled		(5181cdbe-ae74-4262-948c-f8a4185362ed) Move: $/My_Folder to $/_archived returned: FailDBReader 

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: FailDBReader when moving or renaming a folder

Post by lbauer » Mon Jul 16, 2012 9:15 am

Looks like there's a problem with shares in the database.

We have a script that may fix this.

Send your server log to support at sourcegear.com, Attn: Linda. Please include a link to this forum post.
Linda Bauer
SourceGear
Technical Support Manager

scarmichael
Posts: 6
Joined: Tue Sep 06, 2011 8:30 pm

Re: FailDBReader when moving or renaming a folder

Post by scarmichael » Wed Jul 25, 2012 12:32 am

The suggestion to delete then undelete the folder in Fortress did not resolve the issue.

Will try running the script in a test environment once we get it setup.

Thanks

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: FailDBReader when moving or renaming a folder

Post by lbauer » Wed Jul 25, 2012 1:21 pm

When you delete shares, you need to delete all instances of that particular share, then undelete them. You can find share links by right - clicking on a shared file and selecting Properties->Share Links.
Linda Bauer
SourceGear
Technical Support Manager

scarmichael
Posts: 6
Joined: Tue Sep 06, 2011 8:30 pm

Re: FailDBReader when moving or renaming a folder

Post by scarmichael » Thu Jul 26, 2012 2:11 am

I couldn't find any shares associated with the folder I was trying to move.
However I had moved a few shared folders to an archive folder - since they were no longer being used.

Good news is that the Scripts you gave me did run successfully, in test, with only a few warnings which I guess are harmless:
----
Warning: The join order has been enforced because a local join hint is used.
Warning: The join order has been enforced because a local join hint is used.
...
----
Only took 10 minutes to run both scripts.

Thanks for your help.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: FailDBReader when moving or renaming a folder

Post by lbauer » Thu Jul 26, 2012 7:47 am

Thanks for the update. That's good news. : )

Let me know if we can be of assistance in the future.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply