Critical: Applying label failed: FailDBInsert
Moderator: SourceGear
Critical: Applying label failed: FailDBInsert
----12/13/2005 9:47:22 AM (obfuscated)--SSL Disabled System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'unique_tblfsobjectlabels_labelrepidobjid'. Cannot insert duplicate key in object 'tblfsobjectlabels'.
The statement has been terminated.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.AddLabel(VaultSqlConn conn, Int32 nRepID, Int32 nUserID, VaultLabelItem vLabel, Int64& nLabelID, Int64& nObjID, String& strExistingRootPath) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.AddLabel(VaultSqlConn conn, Int32 nRepID, Int32 nUserID, VaultLabelItem vLabel, Int64& nLabelID, Int64& nObjID, String& strExistingRootPath)
----12/13/2005 9:47:22 AM build3--hartford.fdlearning.com(192.168.25.186)--SSL Disabled AddLabel returned: FailDBInsert
The statement has been terminated.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.AddLabel(VaultSqlConn conn, Int32 nRepID, Int32 nUserID, VaultLabelItem vLabel, Int64& nLabelID, Int64& nObjID, String& strExistingRootPath) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.AddLabel(VaultSqlConn conn, Int32 nRepID, Int32 nUserID, VaultLabelItem vLabel, Int64& nLabelID, Int64& nObjID, String& strExistingRootPath)
----12/13/2005 9:47:22 AM build3--hartford.fdlearning.com(192.168.25.186)--SSL Disabled AddLabel returned: FailDBInsert
If I check the table mentioned in the error, there appears to be already an existing label. This is expected. However in this case, that existing label does not show up in "Show Labels", so consequently I can't delete it. Is it safe to delete the records in tblfsobjectlabels that represents this label?
unique_tblfsobjectlabels_labelrepidobjid enforces the rule that one object can only have the same labeled name.
A couple of questions:
What version of the Vault server are you using?
Is it possible the label in question is out of view? Did you scan the entire label query results for the label?
Or do you have permissions enabled on the repository? If so, is it possible the label is being filtered out due to a permissions issue?
A couple of questions:
What version of the Vault server are you using?
Is it possible the label in question is out of view? Did you scan the entire label query results for the label?
Or do you have permissions enabled on the repository? If so, is it possible the label is being filtered out due to a permissions issue?
Jeff Clausius
SourceGear
SourceGear
3.1.1jclausius wrote:unique_tblfsobjectlabels_labelrepidobjid enforces the rule that one object can only have the same labeled name.
A couple of questions:
What version of the Vault server are you using?
Although the original delete and apply label operation that failed was in a NAnt script, I've also tried the operation from the GUI client. The "Label" operation from GUI client failed with the exact same error, and I am unable to delete because "Show Labels" does not list the label.jclausius wrote: Is it possible the label in question is out of view? Did you scan the entire label query results for the label?
Folder security is not turned on.jclausius wrote: Or do you have permissions enabled on the repository? If so, is it possible the label is being filtered out due to a permissions issue?
I don't want to go to deleting it directly from the database just yet. We'll keep that as a last resort.
Can you run the following query:
SELECT * FROM sgvault.dbo.tblfsobjectlabels WHERE label = N'PUT LABEL NAME HERE'
What do the results look like? You can send them in an email if you would like a little more privacy. Just use the email button below this post.
Can you run the following query:
SELECT * FROM sgvault.dbo.tblfsobjectlabels WHERE label = N'PUT LABEL NAME HERE'
What do the results look like? You can send them in an email if you would like a little more privacy. Just use the email button below this post.
Jeff Clausius
SourceGear
SourceGear
Same query I did
Query result sent via email.
Previously there were two other records in there because there are two other folders that were labeled the same. Those labels are fine, it shows up, and I have deleted them. So I am now left with this one rogue label on this folder.
FYI, that folder has been labeled/delete label-re-apply more than one hundred times before this, never fails.
Query result sent via email.
Previously there were two other records in there because there are two other folders that were labeled the same. Those labels are fine, it shows up, and I have deleted them. So I am now left with this one rogue label on this folder.
FYI, that folder has been labeled/delete label-re-apply more than one hundred times before this, never fails.
We will be resolving this off line. It seems one of the dependent tables of the label is missing rows.
Since Vault will a label in a transaction, I'm not sure how the rows disappeared.
In any case, we will be removing the label using one of the Vault Server's database procedures.
Since Vault will a label in a transaction, I'm not sure how the rows disappeared.
In any case, we will be removing the label using one of the Vault Server's database procedures.
Jeff Clausius
SourceGear
SourceGear