How to completely rebuild the Spectrum Archive Manager (DDMDB) from scratch
search cancel

How to completely rebuild the Spectrum Archive Manager (DDMDB) from scratch

book

Article ID: 219054

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

In the rare event the Archive Manager (DDMDB) is corrupted and the ArchMgr.exe -repair command is not able to repair the corruption there are two options:

a)  Restore DDMDB from Backup.

b)  Rebuild DDMDB manually.

Environment

Release : All Supported Releases

Component : Spectrum Core / SpectroSERVER

Resolution

a) Restore DDMDB from backup:

Run the following syntax to load/restore the DDMdb database:
./ddm_load.exe testmachine_ddm.tgz

b) Rebuild DDMDB Manually:

Ensure the innodb_force_recovery is set to 0 in the $SPECROOT/mysql/my-spectrum.cnf file. (innodb_force_recovery = 0)

1. Save the ‘mysql’ database via mysqldump

Windows:
bash -login (bash shell - open a Command Prompt window)
cd $SPECROOT/mysql/bin/
mysqldump.exe -uroot -p<password>  mysql > mysql.sql
 
Linux:
cd $SPECROOT/mysql/bin
./mysqldump --defaults-file=../my-spectrum.cnf -uroot -p<password>  mysql > mysql.sql     (for Spectrum 21.2.3 and below)
./mysqldump --defaults-file=../my-spectrum.cnf -uroot -p<password>  mysql > mysql.sql   
(for Spectrum 21.2.4 and above)
 
2. Stop the MySQL service (either via Install Ticket or mysqladmin utility):
 
Windows:
cd $SPECROOT/bin/
cmdC.exe <hostname> 2 MYSQL
OR
cmdC.exe localhost 2 MYSQL
 
Linux:
cd $SPECROOT/bin/
./cmdC <hostname> 2 MYSQL
OR
./cmdC localhost 2 MYSQL
 
 
OR (Windows)
cd $SPECROOT/mysql/bin/
mysqladmin.exe -uroot -p<password>  shutdown    (for Spectrum 21.2.3 and below)
mysqladmin.exe -uroot -p<password>  shutdown    (for Spectrum 21.2.4 and above)
 
OR (Linux)
cd $SPECROOT/mysql/bin/
./mysqladmin --defaults-file=../my-spectrum.cnf -uroot -p<password>  shutdown    (for Spectrum 21.2.3 and below)
./mysqladmin --defaults-file=../my-spectrum.cnf -uroot -p<password>  shutdown    (for Spectrum 21.2.4 and above)
 
3. Delete or rename the $SPECROOT/mysql/data/ddmdb/ directory
 
4. Delete or rename the $SPECROOT/mysql/data/ibdata1 file
 
5. Delete or rename the $SPECROOT/mysql/data/ib_logfile* files (ib_logfile0, ib_logfile1, ib_logfileX)
 
6. Start the MySQL server:

Windows:
cd $SPECROOT/bin/
launchinstdbapp.exe <hostname> MYSQL y MYSQL.OUT
OR
launchinstdbapp.exe localhost MYSQL y MYSQL.OUT
 
Linux:
cd $SPECROOT/bin/
./launchinstdbapp <hostname> MYSQL y MYSQL.OUT
OR
./launchinstdbapp localhost MYSQL y MYSQL.OUT
 
 
7. Create the DDM database

cd $SPECROOT/mysql/bin
 
Windows: 
mysql.exe -uroot -p<password>    (for Spectrum 21.2.3 and below)
mysql.exe -uroot -p<password>    (for Spectrum 21.2.4 and above)
mysql> create database ddmdb;
 
Linux:
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<password>    (for Spectrum 21.2.3 and below)
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<password>    (for Spectrum 21.2.4 and above)
mysql> create database ddmdb;
 
Expected output:
mysql> create database ddmdb;
Query 0K, 1 row affected (0.00 sec)
 
8. Initialize the DDM database:

cd $SPECROOT/SS/DDM/
./ddm_load -i <LH>    (for Spectrum 10.4.0 and below)
./ddm_load.pl -i -l <LH>   (for Spectrum 10.4.1 and above)
 
9. Load the mysql database from step #1 (mysql command):

mysql> use mysql
mysql> source mysql.sql;
 
10. Start the Archive Manager:

cd $SPECROOT/bin/
./startSS.pl
OR
./launchinstdbapp localhost ARCHMGR y ARCHMGR.OUT