Offline database cleanup and snapshot for partitioned databases


Warning

Important

As of September 30, 2022, this flash identifies the corrective action for a problem that is described in the earlier flash dated August 05, 2022.

BMC Software is alerting users to a serious problem that requires immediate attention in versions 21.3 of the TrueSight Server Automation product. If you have any questions about the problem, contact Customer Support.

August 05, 2022

Last updated: September 30, 2022

Issue

Running the offline or online database cleanup utility on partitioned tables causes data corruption.

Determine whether the tables are already partitioned and take the necessary action:

  1. To determine whether the tables are already partitioned, run the following script on the TrueSight Server Automation database:
    (Oracle)

    select decode(count(*), '0', 'Snapshot tables are not partitioned', 'Snapshot tables are partitioned')
      from user_part_tables
      where table_name in (select table_name
                             from dbm_module_tables
                             where module_id = 2
                             and operation_type = 'SwapTable');

    (SQL Server)

    select case count(*)
             when 0 then 'Snapshot tables are not partitioned'
                 else 'Snapshot tables are partitioned'
           end
      from(
             Select t.name
                 From sys.tables t
                 Inner Join sys.schemas s
                   On t.schema_id = s.schema_id
                 Inner Join sys.partitions p
                   on p.object_id = t.object_id
            where t.name in (select table_name
                       from dbm_module_tables
                       where module_id = 2
                       and operation_type = 'SwapTable')
                 and p.index_id In (0, 1)
                 Group By s.name, t.name
                 Having Count(*) > 1) pts
  2. Depending on the output of the script, do the following:
    • If the output indicates that tables are partitioned, and you are running the cleanup already, stop it, and contact Customer Support for next steps.
    • If the output indicates that the tables are not partitioned, your environment is not affected by the issue and cleanup can continue to be run as normal.

Resolution

Before you start with database partitioning, contact BMC Customer Support for a hotfix.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Server Automation 21.3