How to recreate the DDMdb event table if it get deleted.

Document ID : KB000039491
Last Modified Date : 14/02/2018
Show Technical Document Details

 

Introduction:

 

This document explains the steps that can be taken to recreate the DDMdb events table should it get deleted.

 

Instructions: 

 

Follow the below steps to create the ddmdb event table in spectrum:

 

 

 

For Windows:

 

1)   Open the CMD

 

2)   Bash -l

 

3)   cd $SPECROOT/MySql/Bin/

 

4)   Run the command <mysql -uroot -proot ddmdb>

 

Here you are connected to ddmdb database.

 

5)   DDMDB> “Here you are connected to ddmdb database. Just copy the below syntax and paste it, then press enter. The event table will get created”

 

Here is the syntax to create the event table for Spectrum 9.4:

 

 

 

CREATE TABLE `event` (

 

  `model_h` int(10) unsigned NOT NULL,

 

  `utime` int(11) NOT NULL,

 

  `counter` int(10) unsigned NOT NULL,

 

  `clk_seq` smallint(5) unsigned NOT NULL,

 

  `version` tinyint(4) NOT NULL,

 

  ode_id` char(6) NOT NULL,

 

  `user_key` int(10) unsigned NOT NULL,

 

  `type` int(10) unsigned NOT NULL,

 

  `severity` int(10) unsigned NOT NULL,

 

  `vardata_string` text,

 

  PRIMARY KEY (`model_h`,`utime`,`counter`,`clk_seq`,`version`,ode_id`),

ami

  KEY `event_ie1` (`utime`,`counter`),

 

  KEY `event_ie2` (`type`)

 

) ENGINE=MyISAM DEFAULT CHARSET=utf8;

 

 

 

 

 

For Linux:

 

1)   Login with Spectrum install user

 

2)   ./mysql – defaults-file = ../my-spectrum.cnf –uroot –proot

 

Here you will get connected to Mysql Database

 

3)   Run the command <Use ddmdb;>

 

Here you are connected to ddmdb database.

 

4)   DDMDB> “Here you are connected to ddmdb database. Just copy the below syntax and paste it, then press enter. The event table will get created”

 

 Here is the syntax to create the event table for Spectrum 9.4:

 

 

 

 CREATE TABLE `event` (

 

 `model_h` int(10) unsigned NOT NULL,

 

 `utime` int(11) NOT NULL,

 

`counter` int(10) unsigned NOT NULL,

 

`clk_seq` smallint(5) unsigned NOT NULL,

 

`version` tinyint(4) NOT NULL,

 

ode_id` char(6) NOT NULL,

 

`user_key` int(10) unsigned NOT NULL,

 

`type` int(10) unsigned NOT NULL,

 

`severity` int(10) unsigned NOT NULL,

 

`vardata_string` text,

 

PRIMARY KEY (`model_h`,`utime`,`counter`,`clk_seq`,`version`,ode_id`),

 

KEY `event_ie1` (`utime`,`counter`),

 

KEY `event_ie2` (`type`)

 

ENGINE=MyISAM DEFAULT CHARSET=utf8;

 

                                                                          

 

Additional Information:

 

 

 

NA