Privileged Delete fails with error 'Deletion is not permitted'

book

Article ID: 100065387

calendar_today

Updated On:

Description

Error Message

Error message in the item Preview History tab under Description:

Failed to delete the item from the archive.
Failure reason: Deletion is not permitted. The item is either on legal hold or stored on a compliance device.

DTrace of the StorageOnlineOpns process on the EV Storage Server:

[123]    (StorageOnlineOpns)    <234>    EV:L    {CVault::IsDeletePermitted:#3896} Delete permission: [DELETE_ITEM_ONHOLD (0x4)].
[123]    (StorageOnlineOpns)    <234>    EV:L    {CVault::IsDeletePermitted} (Exit) Status: [Success]
[123]    (StorageOnlineOpns)    <234>    EV:M    {CVault::LogTraceDeletionRefusal:#2133} Deletion of item [1234ABCD12AB34CD56EF123456ABCDEF], Saveset [190001011234567~190001010000000000~Z~1234ABCD12AB34CD56EF123456ABCDEF] with [0] holds has been refused: [DELETE_ITEM_ONHOLD (0x4)].
[123]    (StorageOnlineOpns)    <234>    EV:H    {CVault::DeleteSaveset} (Exit) Status: [The deletion of the item is not currently permitted.      (0xc0041a57)]
[123]    (StorageOnlineOpns)    <234>    EV:H    {CStoreAccessor::DeleteItemEx} (Exit) Status: [The deletion of the item is not currently permitted.      (0xc0041a57)]
[123]    (StorageOnlineOpns)    <234>    EV:H    {CSimpleStore::DeleteItem3:#4631} _com_error exception: [The deletion of the item is not currently permitted.      (0xc0041a57)]
[123]    (StorageOnlineOpns)    <234>    EV:H    {CSimpleStore::DeleteItem3} (Exit) Status: [The deletion of the item is not currently permitted.      (0xc0041a57)]

DTrace of the AcceleratorService process on the DA Server (formatted for easier reading):

[456]    (AcceleratorService)    <567>    EV:M    Error accessing SimpleStore. Attempt:1 EntryId:123ABC456DEF789GHI123ABC456DEF789GHI0000EVSiteAlias|hr=The deletion of the item is not currently permitted.      (0xc0041a57)
[456]    (AcceleratorService)    <567>    EV:M    CItem::Delete Elapsed time Xms
[456]    (AcceleratorService)    <567>    EV:H    {CItem::Delete} HRXEX fn trace : Error [0xc0041a57], [d:\builds\13_\ev\v-prod-s\sources\source\storage\evstorageapi\item.cpp, lines {1415,1455}, built Dec  1 14:03:43 2021].
[456]    (AcceleratorService)    <567>    EV:L    CAuthHelper::Reset Cancel registration? True CancelId: 0
[456]    (AcceleratorService)    <567>    EV:M    CItem::Delete com_error raised Error [0xc0041a57] (err=c0041a57)
[456]    (AcceleratorService)        EV-H    {ArchiveditemDeletor} 
Exception: Deletion is currently barred. 
Info:{CX} Error deleting item 190001011234567~190001010000000000~Z~1234ABCD12AB34CD56EF123456ABCDEF from archive 123ABC456DEF789GHI123ABC456DEF789GHI0000EVSiteAlias in attempt :1, DiscoveredItemId: X
Diag:
HRESULT: 80040309 
Type:System.Runtime.InteropServices.COMException 
ST:   at KVS.EnterpriseVault.Interop.IItem4.Delete()
|   at KVS.Accelerator.PrivilegedDeleteItems.ArchiveditemDeletor.KVS.Accelerator.PrivilegedDeleteItems.IArchiveItemDeleter.DeleteItem(DeleteItemRecord itemToDelete) 
Inner:None
[456]    (AcceleratorService)    <567>    EV:L    CItem::FinalRelease()
[456]    (AcceleratorService)        EV-L    {TraceTimer} {CX} [ Xms] Time taken deleting item from archive 123ABC456DEF789GHI123ABC456DEF789GHI0000EVSiteAlias. SavesetId: 190001011234567~190001010000000000~Z~1234ABCD12AB34CD56EF123456ABCDEF
[456]    (AcceleratorService)        EV-H    {QueuePrivilegedDeleteItems} 
Exception: Deletion is currently barred. 
Info:{CX} Error deleting item 190001011234567~190001010000000000~Z~1234ABCD12AB34CD56EF123456ABCDEF from archive 123ABC456DEF789GHI123ABC456DEF789GHI0000EVSiteAlias, DiscoveredItemId: X.
Updating item deletionStatus as failure. 
Diag:
HRESULT: 80040309 
Type:System.Runtime.InteropServices.COMException 
ST:   at KVS.EnterpriseVault.Interop.IItem4.Delete()
|   at KVS.Accelerator.PrivilegedDeleteItems.ArchiveditemDeletor.KVS.Accelerator.PrivilegedDeleteItems.IArchiveItemDeleter.DeleteItem(DeleteItemRecord itemToDelete)
|   at KVS.Accelerator.PrivilegedDeleteItems.QueuePrivilegedDeleteItems.PrivilegeDeleteProcessWork(ThreadSafeQueue& theQueue, Object queuedItem) 
Inner:None

 

Cause

The Privileged Delete failure can be caused by the item being on Legal Hold, the Archive not permitting item deletion, or the item being stored on a device that has compliance retention applied which prevents deletion.

 

Resolution

To determine if the item is on Legal Hold, obtain its ID from the History tab in the Item's Preview, edit the ID as indicated at the start of the following SQL query, and execute the edited SQL query against the DA Customer database:

DECLARE @DiscoveredItemID bigint = 1; -- Edit item ID here
SELECT
tc.CaseID, [Case Name] = tc.Name
, [Case Legal Hold Status] = ts1.Name
, tidi.DiscoveredItemID, tidi.KVSSaveSetID
, tidi.LegalStatus
, [Item Legal Hold Status] = ts2.name
FROM tblIntDiscoveredItems AS tidi
JOIN tblCase AS tc ON tidi.CaseID = tc.CaseID
JOIN tblStatus AS ts1 ON tc.LegalHoldState = ts1.StatusID
JOIN tblStatus AS ts2 ON tidi.LegalStatus = ts2.StatusID
WHERE tidi.DiscoveredItemID = @DiscoveredItemID
ORDER BY tc.Name;

If the item is on Legal Hold, then Legal Hold will need to be removed from the Case before the item can be processed by Privileged Delete. Note that this must be done only after consulting with the Case Owner and after confirming the Case does not need to be placed on Legal Hold. Legal Hold can be removed from the Case by de-selecting the Put items on hold option in the Case's Properties tab.


Another common cause of this error is the Archive does not allow deletions. This can be reviewed in the EV Vault Administrator's Console (VAC) in the Archive's Properties | Advanced tab in the option Allow deletion of archived items and of this archive. This option is enabled (selected) by default. If this option is disabled (de-selected), this prevents items from being deleted, which will prevent Privileged Delete.

Another way to determine if this option has been disabled is to look in the EnterpriseVaultDirectory database. Execute the following SQL query against the EnterpriseVaultDirectory database and review the output:

SELECT
RootIdentity
, ArchiveName
, ArchiveDescription
, DeleteProtected
, [Allow deletion of archived items and of this archive] = CASE DeleteProtected WHEN 0 THEN 'Yes (selected)' WHEN 1 THEN 'No (de-selected)' END
, DeleteExpiredItems
, [Delete expired items from this archive automatically] = CASE DeleteExpiredItems WHEN 1 THEN 'Yes (selected)' WHEN 0 THEN 'No (de-selected)' END
FROM EnterpriseVaultDirectory..Archive
WHERE DeleteProtected = 1
ORDER BY ArchiveName;


If the item is stored on a device that has compliance retention applied which prevents deletion, this will need to be reviewed by the onsite EV administrator and/or storage team.

 

Issue/Introduction

Using the Enterprise Vault (EV) Discovery Accelerator (DA) Privileged Delete function does not delete some items and lists the items in the Failed to delete filter under the Privileged delete status facet. Clicking on the History tab in the Preview of these items lists the error as below. The Privileged Delete processing history of the item can be found in the DA Customer database. Obtain its ID from the History tab in the Item's Preview, edit the ID as indicated at the start of the following SQL query, and execute the edited SQL query against the DA Customer database: DECLARE @DiscoveredItemID bigint = 1; -- Edit item ID here
SELECT
tpdh.PrivilegedDeleteHistoryID, tpdh.DiscoveredItemID
, tidi.KVSSaveSetID
, tv.KVSVaultEntryID, tv.KVSVaultName
, tc.CaseID, tc.Name AS 'Case/Dept/Folder'
, tpdh.PrivilegedDeleteStatus
, ts1.Name AS 'Privileged Delete Status'
, tpdh.PrivilegedDeleteDate, tpdh.PrincipalID
, tp.PrincipalName
, tpdh.PrivilegedDeleteFailedReason
, dbo.fx_GetAuditTypeIDFromDeleteStatus(tpdh.PrivilegedDeleteStatus) AS [AuditTypeID]
, ts2.Name AS [AuditType]
FROM tblPrivilegedDeleteHistory AS tpdh (NOLOCK)
JOIN tblIntDiscoveredItems AS tidi (NOLOCK) ON tpdh.DiscoveredItemID = tidi.DiscoveredItemID
JOIN tblVaults AS tv (NOLOCK) ON tidi.VaultID = tv.VaultID
JOIN tblCase AS tc ON tidi.CaseID = tc.CaseID
JOIN tblStatus AS ts1 ON tpdh.PrivilegedDeleteStatus = ts1.StatusID
JOIN tblStatus AS ts2 ON dbo.fx_GetAuditTypeIDFromDeleteStatus(tpdh.PrivilegedDeleteStatus) = ts2.StatusID
JOIN tblPrincipal AS tp ON tpdh.PrincipalID = tp.PrincipalID
WHERE tpdh.DiscoveredItemID = @DiscoveredItemID
ORDER BY tc.CaseID, DiscoveredItemID, PrivilegedDeleteHistoryID;