Customer Background Tasks will not stop

book

Article ID: 100053959

calendar_today

Updated On:

Description

Error Message

No error is present.

 

Cause

In version 14.x and higher, a design change was made to the way the CBTs are handled. Each AcceleratorService64.exe process handles 2 Customers by default, meaning the CBTs for a pair of Customers are handled by one AcceleratorService64.exe process. Note this pairing is done per CA server. When 1 Customer in a pair is set to stop the CBT and the other Customer in the pair still has its CBT in a Running status, the stopping Customer's CBT status will remain at Stopping.

 

Resolution

The Customer pairings are determined by the order in which they are listed in tblCustomer by CustomerID then by when the CBT was last started in ascending order. This information is listed in the server's memory and is not persisted in the database. An approximation of the Customer pairings can be determined by executing the following query against the Configuration database:

IF (OBJECT_ID('tempdb..#TemptblCustomer') IS NOT NULL) EXEC sp_executesql N'DROP TABLE #TemptblCustomer;';
CREATE TABLE #TemptblCustomer
(Pairing int
, GroupID int
, CustomerID int
, CustomerName nvarchar(100)
, VirtualDirectory nvarchar(500)
, SQLServer nvarchar(250)
, InitialCatalog nvarchar(127));
INSERT INTO #TemptblCustomer
SELECT NULL, GroupID, CustomerID, Name, VirtualDirectory, Server, InitialCatalog FROM tblCustomer WHERE Type = 50 AND ATEnabled = 30 ORDER BY GroupID ASC, CustomerID ASC;
DECLARE @GroupID int, @PairingValue int;
DECLARE CAServers CURSOR FOR SELECT DISTINCT GroupID FROM #TemptblCustomer ORDER BY GroupID ASC;
OPEN CAServers;
FETCH NEXT FROM CAServers INTO @GroupID;
WHILE @@FETCH_STATUS = 0
BEGIN;
    SET @PairingValue = 1;
    WHILE EXISTS (SELECT CustomerID FROM #TemptblCustomer WHERE GroupID = @GroupID AND (Pairing IS NULL))
    BEGIN;
        IF (SELECT COUNT(CustomerID) FROM #TemptblCustomer WHERE GroupID = @GroupID AND (Pairing IS NULL)) = 1
        BEGIN;
            UPDATE #TemptblCustomer SET Pairing = @PairingValue WHERE GroupID = @GroupID AND (Pairing IS NULL);
            GOTO NextCAServer;
        END;
        ELSE BEGIN;
            WITH ToBeUpdated AS (
            SELECT TOP 2 Pairing, CustomerID FROM #TemptblCustomer WHERE GroupID = @GroupID AND (Pairing IS NULL) ORDER BY CustomerID ASC)
            UPDATE ToBeUpdated SET Pairing = @PairingValue;
            SET @PairingValue += 1;
        END;
    END;
    GOTO NextCAServer;
    NextCAServer:
    FETCH NEXT FROM CAServers INTO @GroupID;
END;
CLOSE CAServers;
DEALLOCATE CAServers;
SELECT
ttc.GroupID
, [Server] = ts.Name
, ttc.Pairing
, ttc.CustomerID
, ttc.CustomerName
, ttc.VirtualDirectory
, ttc.SQLServer
, ttc.InitialCatalog
FROM #TemptblCustomer AS ttc
JOIN tblGroupToServer AS tgts ON ttc.GroupID = tgts.GroupID
JOIN tblServer AS ts ON tgts.ServerID = ts.ServerID
ORDER BY GroupID ASC, CustomerID ASC;
IF (OBJECT_ID('tempdb..#TemptblCustomer') IS NOT NULL) EXEC sp_executesql N'DROP TABLE #TemptblCustomer;';

For each GroupID, i.e. each Accelerator server, find the Customer needing its CBT stopped and stop the CBT for the paired Customer in EVBAAdmin. This will stop the CBT for both Customers in the pair.


If there is only 1 Customer in the CA environment and the above behaviour is seen, then update the Configuration database to change the default pairing of 2 Customers to 1, as follows:

1. Stop the Enterprise Vault Accelerator Manager Service. For version 14.3 and newer, also stop the Enterprise Vault IR Classifier Service and Enterprise Vault IR Model Builder Service.

2. Back up the Configuration database.

3. Execute the following query against the Configuration database to change the default pairing of 2 Customers to 1:

UPDATE tblCustomerBgTasks SET NumCustomersPerProcess = 1 WHERE NumCustomersPerProcess != 1;
SELECT *
, CASE
WHEN TaskName = 'Export' THEN 'Export functions'
WHEN TaskName = 'MiscApplicationTasks' THEN 'All other functions (background SQL, SQL agent job sync, general cleanup and purging of tables)'
WHEN TaskName = 'Sampling' AND TaskSubTypeId = 1 THEN '(CIP): Pre-processing of Random Sample items (tblCapturedItems to tblVaultSamples XML expansion)'
WHEN TaskName = 'Sampling' AND TaskSubTypeId = 2 THEN '(GSP): Random Sampling functions'
WHEN TaskName = 'Search' THEN 'Search functions'
ELSE 'Unknown' END AS 'Description'
FROM tblCustomerBgTasks
ORDER BY CustBgTaskID;

4. Start the Enterprise Vault Accelerator Manager Service. For version 14.3 and newer, start the Enterprise Vault IR Classifier Service and Enterprise Vault IR Model Builder Service.

5. Stop the CBT as needed.

 

Issue/Introduction

When attempting to stop the Customer's Background Tasks (CBT) in Compliance Accelerator (CA) / Veritas Advanced Surveillance (VAS) through the EVBAAdmin administration web site, the status changes from Running to Stopped and then to Stopping but does not actually go to Stopped. The status may fluctuate a few times between Stopped and Stopping before finally remaining at Stopping.