search cancel

How to initialize the DDMdb when the event table is corrupted

book

Article ID: 31996

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

How to initialize the Archive Manager (DDM) database when the event table is corrupted and cannot be repaired.

Environment

Release: All Supported Releases
Component: SPCAEM - Events and Alarms

Resolution

NOTE: Starting from DX NetOps Spectrum 21.2.4, the default root password for MySql is "MySqlR00t". For DX NetOps Spectrum versions prior to 21.2.4, the default root password is "root". In the following MySql commands, replace <PASSWD> with the root password for your DX NetOps Spectrum version.

For MyISAM tables (.MYD and .MYD):

0. Remove the $SPECROOT/SS/DDM/.DDMDB.LOCK file.

1. Log into the system as the user that owns the Spectrum installation

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

3. Stop the MySQL Server:
    a. cd to the $SPECROOT/bin directory
    b. Enter the following command where <HOSTNAME> is the hostname of the SpectroSERVER system:

./cmdC <HOSTNAME> 2 MYSQL

4. cd to the $SPECROOT/mysql/data/ddmdb directory and remove the event.MYI and event.MYD files and replace them with 0 size files. Be sure to use exactly the same filenames

5. Start MySQL database server: 
    a. cd to the $SPECROOT/bin directory
    b. Enter the following command where <HOSTNAME> is the hostname of the SpectroSERVER system:

./launchinstdbapp <HOSTNAME> MYSQL y MYSQL.OUT 

6. Repair the table
    a. cd to the $SPECROOT/mysql/bin directory
    b. Enter the following command to log into mysql:

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

    c. Enter the following command at the mysql prompt:

repair table event USE_FRM; 

    d. Enter "exit" at the mysql prompt to exist mysql

7. Reinitialize the DDM database:
    a. cd to the $SPECROOT/SS/DDM directory
    b. Enter the following command where <LH> is the landscape handle of the SpectroSERVER database:

./ddm_load -i <LH>

8. Start the Archive Manager

 

For InnoDB tables (.idb) or MyISAM tables:

0. Remove the $SPECROOT/SS/DDM/.DDMDB.LOCK file.

1. Log into the system as the user that owns the Spectrum installation

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

3. Stop the MySQL Server:
    a. cd to the $SPECROOT/bin directory
    b. Enter the following command where <HOSTNAME> is the hostname of the SpectroSERVER system:

./cmdC <HOSTNAME> 2 MYSQL

4. cd to the $SPECROOT/mysql/data/ddmdb directory and remove all files, except the *.frm files.

5. Start MySQL database server: 
    a. cd to the $SPECROOT/bin directory
    b. Enter the following command where <HOSTNAME> is the hostname of the SpectroSERVER system:

./launchinstdbapp <HOSTNAME> MYSQL y MYSQL.OUT 

6. Reinitialize the DDM database:
    a. cd to the $SPECROOT/SS/DDM directory
    b. Enter the following command where <LH> is the landscape handle of the SpectroSERVER database:

./ddm_load -i <LH>
./ddm_load.pl -i -l <LH>

7. cd to the $SPECROOT/mysql/data/ddmdb directory and verify the database files have been rebuilt.

8. Start the Archive Manager

Attachments