Disabling Analytics fails with error "filegroup 'AnalyticsCaseFileGroup...' cannot be removed because it is not empty"

book

Article ID: 100015725

calendar_today

Updated On:

Description

Error Message

Example excerpt from a DTrace of the AnalyticsServerApp process:

EV-L    {EVSqlBase.ShouldExcludeSqlException} Error 'The filegroup 'AnalyticsCaseFileGroup__' cannot be removed because it is not empty.' is not transient. 'EVSqlCommand: ... will not be retried

EV-L    {EVSqlBase.ShouldRetry} Error 'The filegroup 'AnalyticsCaseFileGroup__' cannot be removed because it is not empty.' is excluded. 'EVSqlCommand: ... will not be retried

EV-H    {EVSqlBase.LogFailureAndThrow} Failed to execute 'EVSqlCommand: ... - This command was not retried - Error Error Code: 5042 / 80131904 - Severity 16 - The filegroup 'AnalyticsCaseFileGroup__' cannot be removed because it is not empty.

EV~E    |Event ID: 41606 A database error was raised and was not retried.|Error: Error Code: 5042 / 80131904 - Severity 16 - The filegroup 'AnalyticsCaseFileGroup__' cannot be removed because it is not empty.|Reference: EVSqlCommand: ...

EV-H    {SQLSCRIPTRUNNER.EN_US} Exception: The filegroup 'AnalyticsCaseFileGroup__' cannot be removed because it is not empty. Info:{C.EN_US} ... . Description: The filegroup 'AnalyticsCaseFileGroup__' cannot be removed because it is not empty. Diag:Num:5042 State:12 Sev:16 Svr:Listener_1 Proc: Line:3 Type:System.Data.SqlClient.SqlException ST:   at Symantec.EnterpriseVault.DatabaseAccess.EVSqlBase.Do[T](Func`1 action)|   at Symantec.EnterpriseVault.DatabaseAccess.EVSqlCommand.ExecuteNonQuery()|   at Symantec.Accelerator.Analytics.DataAccess.SQLScriptRunner.OnScriptFound(String script) Inner:None

EV-H    {-} {ANALYTICSDISABLER.EN_US} {C.EN_US} Unable to Drop Schema with error The filegroup 'AnalyticsCaseFileGroup_Analytics_Cust_5' cannot be removed because it is not empty.. Waiting for Another 5000 Miliseconds. Retried X times.


Example excerpt from a DTrace of the AcceleratorService process:

EV~E    |Event ID: 41606 A database error was raised and was not retried.|Error: Error Code: 208 / 80131904 - Severity 16 - Invalid object name 'tblConversations_'.|Reference: EVSqlCommand: DB: ...

Example excerpt from error Event ID 41606:

A database error was raised and was not retried.
Error: Error Code: 5042 / 80131904 - Severity 16 - The filegroup 'AnalyticsCaseFileGroup__' cannot be removed because it is not empty.
Reference: EVSqlCommand: ...  


Another example excerpt from Event ID 41606:

APP AS - Customer ID: X - An error has occurred when getting ingestion error count. System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'tblConversations_'.
at Symantec.EnterpriseVault.DatabaseAccess.EVSqlBase.Do[T](Func'1 action)
at Symantec.EnterpriseVault.DatabaseAccess.EVSqlCommand.ExecuteNonQuery()
at Symantec.Accelerator.Analytics.AnalyticsStatus.GetTotalItemsAndConversationThreads(Int32 caseId, Int64& totalItems, Int64& totalConversationThreads)
ClientConnectionId:abcd1234-ef56-gh78-ij90-abcdef123456
Error Number:208,State:1,Class:16

V-437-41606

Cause

The addition of a large number of items to an Analytics-enabled DA Case may cause SQL full-text indexing to add certain system-generated partition schemes and functions which are saved in the filegroups and which are not removed via the normal SQL full-text indexing processing when DA Analytics is disabled. This has been identified to occur on certain versions of SQL server and has been fixed per Microsoft article KB3132058, ' FIX: Error occurs when you try to drop or delete filegroups or partition schemes and functions in SQL Server'.

Resolution

If you are experiencing this condition, the solution provided by Microsoft is to upgrade SQL to at least the versions containing the fix, as listed in the above article. At time of writing, those versions are:

- Cumulative Update 1 for SQL Server 2016
Build version: 13.0.2149.0
Build Knowledge Base number: KB3164674
Release Date: July 25, 2016

- Cumulative Update 6 for SQL Server 2014 Service Pack 1
Build version: 12.0.4449.0
Build Knowledge Base number: KB3144524
Release Date: April 18, 2016

- Cumulative Update 13 for SQL Server 2014
Build version: 12.0.2568.0
Build Knowledge Base number: KB3144517
Release Date: April 18, 2016

- Cumulative Update 2 for SQL Server 2012 Service Pack 3
Build version: 11.0.6523.0
Build Knowledge Base number: KB3137746
Release Date: March 21,2016

- Cumulative Update 10 for SQL Server 2012 Service Pack 2
Build version: 11.0.5644.2
Build Knowledge Base number: KB3120313
Release Date: January 19, 2016
 

Note: The SQL versions containing the fix were provided by Microsoft when this issue was first investigated. The same issue has been seen in versions equal to or newer than the above versions.

To determine the current build version, execute the following SQL query in SQL Server Management Studio:

USE [master];
GO
SET NOCOUNT ON;
SELECT
[SQL Server Machine Name] = (SELECT SERVERPROPERTY('MachineName')),
[SQL Product Level] = (SELECT SERVERPROPERTY ('ProductLevel')),
[SQL Edition] = (SELECT SERVERPROPERTY ('Edition')),
[SQL Product Version] = (SELECT SERVERPROPERTY ('ProductVersion')),
[SQL Full Product Version] = (SELECT @@VERSION);


Compare the results with the information in Microsoft article KB321185: ' How to determine the version, edition and update level of SQL Server and its components'.

Issue/Introduction

After Analytics has been enabled in an Enterprise Vault (EV) Discovery Accelerator (DA) Case having a large number of items, an attempt to disable Analytics may fail with the following error:

filegroup 'AnalyticsCaseFileGroup...' cannot be removed because it is not empty

Running a DTrace on the AnalyticsServerApp and AcceleratorService processes on the DA server will show entries similar to the examples below. The EV Event Logs on the DA server may capture error Event ID 41606, as in the example below.

Additional Information

ETrack: 3776144