CANNOT DELETE an ITEM

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

Moderator: SourceGear

Post Reply
Carlos Kirkconnell

CANNOT DELETE an ITEM

Post by Carlos Kirkconnell » Mon Aug 22, 2005 8:54 am

Every time I want to delete something, I get the same error message:

[8/22/2005 8:50:39 AM] An error occurred while trying to end a transaction.
[8/22/2005 8:50:39 AM] An exception was encountered during the transaction. Exception: Exception of type System.Exception was thrown. at VaultClientOperationsLib.ClientInstance.Commit(ChangeSetItemColl givenItems, Boolean keepCheckedOut, Boolean removeLocalCopy, Boolean bIsImport, DateTime dateImport, Int32 nUserIDImport, Int64& nRevID)
[8/22/2005 8:50:39 AM] Transaction failed
[8/22/2005 8:50:39 AM] Item $/IntegraSoft/Projects/Tahsa/SWS/SourceCode/SpareWareHouseSystem caused the transaction to fail: Deletion Failed.
[8/22/2005 8:50:39 AM] Transaction failed

Why is it that I cannot delete?

Guest

Post by Guest » Mon Aug 22, 2005 8:55 am

Sorry I forgot to place the version. My source control version is 3.1.1 (3506)

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Aug 22, 2005 9:50 am

The server log should contain the reason why the transaction failed. Can you check the server log at %windir%/temp/sgvault?

Guest

Post by Guest » Mon Aug 22, 2005 12:20 pm

The following log entry was added after the error occurs:

----8/22/2005 12:17:56 PM CarlosK--NALU(192.168.0.223)--SSL Disabled Login
----8/22/2005 12:18:18 PM CarlosK--NALU(192.168.0.223)--SSL Disabled System.Data.SqlClient.SqlException: UPDATE failed because the following SET options have incorrect settings: 'ARITHABORT'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.DeleteFromDB(VaultSqlConn conn, Int32 nRepID, Int64 nObjID, Int64 nObjVerID, Int64 nOwnerFolderID, Int64 nTxID, Int32 nTxItem, String strItemPath, String strComment, DateTime dtMod, String strShareObjIDPathXml) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.DeleteFromDB(VaultSqlConn conn, Int32 nRepID, Int64 nObjID, Int64 nObjVerID, Int64 nOwnerFolderID, Int64 nTxID, Int32 nTxItem, String strItemPath, String strComment, DateTime dtMod, String strShareObjIDPathXml)
----8/22/2005 12:18:18 PM CarlosK--NALU(192.168.0.223)--SSL Disabled (91a9be76-d683-40a7-aba6-7eb021ed06fb) EndTx (Revision - 0) returned: FailDBDelete
----8/22/2005 12:18:18 PM CarlosK--NALU(192.168.0.223)--SSL Disabled (91a9be76-d683-40a7-aba6-7eb021ed06fb) Delete: $/IntegraSoft/Projects/Tahsa/SWS JODIDO returned: FailDBDelete

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Aug 22, 2005 1:01 pm

Did someone change the database settings for sgvault?

The following options MUST be enabled for the vault database:

ANSI_NULLS
ANSI_PADDING
ANSI_WARNINGS
ARITHABORT
CONCAT_NULL_YIELDS_NULL
QUOTED_IDENTIFIER

Additionally, NUMERIC_ROUNDABORT must be disabled.


You can view the current settings with the following query:

Code: Select all

SELECT 
DATABASEPROPERTYEX('sgvault', 'IsAnsiNullsEnabled') AS [ANSI_NULLS],
DATABASEPROPERTYEX('sgvault', 'IsAnsiPaddingEnabled') AS [ANSI_PADDING], 
DATABASEPROPERTYEX('sgvault', 'IsAnsiWarningsEnabled') AS [ANSI_WARNINGS], 
DATABASEPROPERTYEX('sgvault', 'IsArithmeticAbortEnabled') AS[ARITHABORT], 
DATABASEPROPERTYEX('sgvault', 'IsNullConcat') AS [CONCAT_NULL_YIELDS_NULL], 
DATABASEPROPERTYEX('sgvault', 'IsQuotedIdentifiersEnabled') AS [QUOTED_IDENTIFIER], 
DATABASEPROPERTYEX('sgvault', 'IsNumericRoundAbortEnabled') AS [NUMERIC_ROUNDABORT]
Jeff Clausius
SourceGear

Guest

Post by Guest » Mon Aug 22, 2005 2:04 pm

All of them are disabled... This seems to have happened after we restored the vault database from a backuped .mdf. I'll try to enable the properties and see if it works.

Guest

Post by Guest » Mon Aug 22, 2005 2:24 pm

It worked! Thanks, you have been really helpful.

gauravthegreat
Posts: 1
Joined: Wed Jun 06, 2007 10:49 pm

Enabling variables

Post by gauravthegreat » Wed Jun 06, 2007 10:51 pm

This can be enable like this

USE master
GO
ALTER DATABASE databasename
SET ARITHABORT ON

Post Reply