Archive Manager SPC-SHD-29021 - Partition management on a not partitioned table is not possible
search cancel

Archive Manager SPC-SHD-29021 - Partition management on a not partitioned table is not possible

book

Article ID: 198495

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

In the Archive Manager log file ARCHMGR.OUT the following errors are seen just after startup and then appear once per day while running

SPC-SHD-29021:

Jul 23 07:05:36 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
ALTER TABLE event ADD PARTITION (PARTITION EVENT_24_7_2020 VALUES LESS THAN (1595660400)) - Partition management on a not partitioned table is not possible

Jul 23 07:05:36 ERROR TRACE at ModelArchDBImp.cc(4970): doSqlQuery/mysql_query: Failure executing query:
ALTER TABLE event DROP PARTITION EVENT_22_6_2020 - Partition management on a not partitioned table is not possible

Environment

Release : Any
Component : Spectrum Archive Manager

Cause

These errors occur due to the event table having once been partitioned but then having been rebuilt as a non-partitioned table. The partitionlog table was left behind in the ddmdb database which causes the ArchMgr to believe partitioning is still enabled and it will therefore try to drop and add partitions as part of the maintenance cycle.

Resolution

1. Verify the event table is not partitioned

- Log into the system as the user that owns the Spectrum installation

- If on Windows, start a bash shell by running "bash -login"

- cd $SPECROOT/mysql/bin directory and enter the following command to log into mysql:

./mysql --defaults-file=$SPECROOT/mysql/my-spectrum.cnf -uroot -p<PASSWD> ddmdb -A

- Enter the following command at the mysql prompt:

show create table event;

The output will show if there are any partitions, for example

 )    ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC
 /*!50500 PARTITION BY RANGE  COLUMNS(utime)
 (PARTITION EVENT_19_7_2020 VALUES LESS THAN (1595228400) ENGINE = InnoDB,
 PARTITION EVENT_20_7_2020 VALUES LESS THAN (1595314800) ENGINE = InnoDB,

IMPORTANT: If the above query show any partitions, DO NOT CONTINUE with this procedure. Stop here and contact the Broadcom Support team for assistance. Otherwise the DB will be compromised.

2. Make sure you have a recent ddmdb backup (precautionary)

- cd $SPECROOT/SS/DDM

- Enter the following command where <FILENAME> is the name of a file for the backup

./ddm_save.pl -f <FILENAME>

IMPORTANT: Make sure you have enough space for the DDM backup file.

3. Stop the ArchMgr

- cd $SPECROOT/bin directory and enter the following command to shutdown the ArchMgr:

./cmdC localhost 2 ARCHMGR

4. Drop the partitionlog table

- cd $SPECROOT/mysql/bin

- Enter the following command to log into mysql:

./mysql --defaults-file=$SPECROOT/mysql/my-spectrum.cnf -uroot -p<PASSWD> ddmdb -A

- Enter the following command at the mysql prompt:

drop table partitionlog;

5. Start the ArchMgr

- cd $SPECROOT/bin directory and enter the following command to start the ArchMgr:

./launchinstdbapp localhost ARCHMGR n ARCHMGR.OUT

- Check the $SPECROOT/SS/DDM/ARCHMGR.OUT file for errors