A model was deleted or destroyed in Spectrum and since it is now gone we were not able to determine when it was destroyed. Is there a way to query the SSdb or the mysql db for this information?
All Spectrum Releases.
When a model in Spectrum is destroyed, a model destroyed event with Event Id 0x10202 is created on the model:
0x10202 - A model has been destroyed. The model was {m} of type {t} destroyed by {u}.
Once the model is destroyed, you can no longer select it in OneClick or in CLI or REST as the model handle no longer exists for this model. The event is logged and stored to the DDM database (mysql) and can be viewed there.
Navigate in a command line shell to $SPECROOT/mysql/bin. Log into the mysql monitor:
On Windows:
./mysql -uroot -p<password> ddmdb;
On Linux:
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<password> ddmdb;
To show the time and model name of a deleted device in the mysql database you can use any of these:
SELECT model.model_name, DATE_FORMAT(FROM_UNIXTIME(event.utime), '%Y-%m-%d %H:%i:%s') AS readable_utime FROM model JOIN event ON model.model_h = event.model_h WHERE type=0x10202;
SELECT m.model_name, concat("0x",hex( e.type)) as type, FROM_UNIXTIME(e.utime) as time from event e inner join model m on m.model_h=e.model_h where e.type=0x10202 order by time desc;
To limit the search to a timeframe:
SELECT HEX(m.model_h), m.mtype_h, u.user_name, m.landscape_h, m.model_name, e.type from model m, event e, user_def u where e.model_h=m.model_h and e.user_key=u.user_key and e.type=0x10202 and e.utime > UNIX_TIMESTAMP('2026-01-01 00:00:00') and e.utime < UNIX_TIMESTAMP('2026-01-20 00:00:00') and u.user_name <> '' order by m.model_name;
Events 0x10201 and 0x10202 are logged to the mysql database by default even though the event configuration gui shows the "Store Event in Historical Database" is not selected