App Control: Scheduled tasks DailyPruneTask and performDatabaseMaintenance not able to be executed
search cancel

App Control: Scheduled tasks DailyPruneTask and performDatabaseMaintenance not able to be executed

book

Article ID: 286236

calendar_today

Updated On:

Products

Carbon Black App Control (formerly Cb Protection)

Issue/Introduction

  • Database storage running out of space.
  • Scheduled tasks  DailyPruneTask and performDatabaseMaintenance are not getting executed.
  • Manual execution of  DailyPruneTask fails with the following error
    (198 row(s) affected)
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    Pruning deleted antibody instances older than Jan 11 2021 1:43PM
    The statement has been terminated.
    
    (0 row(s) affected)
    The statement has been terminated.
    Msg 0, Level 11, State 0, Line 2
    A severe error occurred on the current command. The results, if any, should be discarded.
    Msg 1038, Level 15, State 4, Line 10
    An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
    Msg 105, Level 15, State 1, Line 10
    Unclosed quotation mark after the character string ''.
  • Manual execution of performDatabaseMaintenance or rebuild of affected indexes fails with the following error in the SQL server logs:
    
    executing index maintenance: ALTER INDEX IDX_antibody_instances_deleted_host_id_pathname_id_filename_id ON antibody_instances_deleted REBUILD WITH (ONLINE = ON)
    Location:	 e:\b\s3\sources\sql\ntdbms\storeng\dfs\access\pagecompression.inl:1647
    Expression:	 uncomprSize <= uncomprDataSize
    SPID:		 64
    Process ID:	 1412
    Msg 3624, Level 20, State 1, Line 11
    A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.
    Msg 596, Level 21, State 1, Line 10
    Cannot continue the execution because the session is in the kill state.
    Msg 0, Level 20, State 0, Line 10
    A severe error occurred on the current command.  The results, if any, should be discarded.
  • execution of DBCC CHECKDB('das', REPAIR_REBUILD) fails with the following output
    Msg 5274, Level 16, State 111, Line 1
    Table error: Object ID 254623950, index ID 6, partition ID 72057594217693184, alloc unit ID 72057594236436480 (type In-row data), page (5:218914).  Page dictionary is invalid for compressed page; the following internal test failed:  currOffset >= prevOffset. Values are 40993 and 50432.
    Msg 8942, Level 16, State 1, Line 1
    Table error: Object ID 254623950, index ID 6, partition ID 72057594217693184, alloc unit ID 72057594236436480 (type In-row data), page (5:218914). Test (sorted[i].GetOffset () >= max) failed. Slot 1, offset 0x2b2 overlaps with the prior row.
    Msg 8928, Level 16, State 1, Line 1
    Object ID 254623950, index ID 6, partition ID 72057594217693184, alloc unit ID 72057594236436480 (type In-row data): Page (5:218914) could not be processed.  See other errors for details.
    Msg 8976, Level 16, State 1, Line 1
    Table error: Object ID 254623950, index ID 6, partition ID 72057594217693184, alloc unit ID 72057594236436480 (type In-row data). Page (5:218914) was not seen in the scan although its parent (5:218888) and previous (5:218913) refer to it. Check any previous errors.
    Msg 8978, Level 16, State 1, Line 1
    Table error: Object ID 254623950, index ID 6, partition ID 72057594217693184, alloc unit ID 72057594236436480 (type In-row data). Page (5:218915) is missing a reference from previous page (5:218914). Possible chain linkage problem.
    DBCC results for 'antibody_instances_deleted'.
    There are 16921589 rows in 141278 pages for object "antibody_instances_deleted".
    CHECKDB found 0 allocation errors and 616 consistency errors in table 'antibody_instances_deleted' (object ID 254623950).

Environment

  • App Control Server: All Versions
  • MS SQL Server: All Versions

Cause

  • Corrupted table index (in this instance IDX_antibody_instances_deleted_host_id_pathname_id_filename_id from table antibody_instances_deleted).

Resolution

  1. Create a full database back up of das.
    1. Please follow the steps outlined by Microsoft on completing a database backup Create a Full Database Backup - SQL Server 
  2. Stop the App Control Server and App control Reporter Services.
    1. In Windows search for Services.msc and open it. 
    2. Look for the service Carbon Black App Control Reporter (Cb Protection Reporter in old versions). 
    3. Do right click on it and select Stop. 
    4. Look for the service Carbon Black App Control Server (Cb Protection Server in old versions).
    5. Do right click on it and select Stop. 
  3. Execute the FilenamePathnameReseed script.
  4. Once FilenamePathnameReseed is completed start the App Control Server and App control Reporter Services.
    1. In Windows search for Services.msc and open it. 
    2. Look for the service Carbon Black App Control Reporter (Cb Protection Reporter in old versions). 
    3. Do right click on it and select Start.
    4. Look for the service Carbon Black App Control Server (Cb Protection Server in old versions).
    5. Do right click on it and select Start.

Additional Information

The script FilenamePathnameReseed is not limited only to rebuild the index  IDX_antibody_instances_deleted_host_id_pathname_id_filename_id, there are others indexes that it regenerates. The indexes to be rebuilt can be found in the file RemoveUtilityObjects.sql included in the FilenamePathnameReseed..