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

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

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.

Environment

Release : Any

Component : Spectrum Archive Manager

Resolution


1. verify the event table is not partitioned

    cd $SPECROOT/mysql/bin
    ./mysql --defaults-file=$SPECROOT/mysql/my-spectrum.cnf -uroot -proot ddmdb
    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,

 

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

      cd $SPECROOT/SS/DDM
      ./ddm_save.pl -f ../../SS-DB-Backup/ddmdb_yyyymmdd_hhmm




3. Stop the ArchMgr

      cd $SPECROOT/bin/
      ./cmdC localhost 2 ARCHMGR




4. Drop the partitionlog table

       cd $SPECROOT/mysql/bin
      ./mysql --defaults-file=$SPECROOT/mysql/my-spectrum.cnf -uroot -proot ddmdb
      drop table partitionlog;



5. Start the ArchMgr

      cd $SPECROOT/bin/
      ./launchinstdbapp localhost ARCHMGR n ARCHMGR.OUT