10.3 DDMDB convert_current_myisam_to_innodb.pl fails with ERROR 1086
book
Article ID: 115500
calendar_today
Updated On:
Products
CA Spectrum
Issue/Introduction
Running the ./convert_current_myisam_to_innodb.pl shows the following errors. If you start the archive manager at the end of the process the historical events are gone. Only new events show:
WARNING: This MyISAM to InnoDB conversion process can take quite a while, depending on the size of the DDM database.
The conversion process requires that you have free disk space greater than three times the size of event table: so please make sure you have enough free space before continuing.
It is also recommended that you backup your DDM database before continuing to safeguard against any potential data loss.
Are you sure you want to proceed( Y, N ) ?y
Checking the disk space
event table size : 157.68 MB
Approx required free disk space : 473.04 MB
Free disk space : 177398.73 MB
Started converting tables to innodb
The innodb conversion is complete for all DDMDB tables except event table.
Archive Manager already stopped
Starting event partitioning
partition tables created successfully
Started loading event table data ERROR 1086 (HY000) at line 1: File '/app/spectrum/mysql/bin/event_1536689990.txt' already exists ERROR 1086 (HY000) at line 1: File '/app/spectrum/mysql/bin/event_1536689990.txt' already exists ERROR 1086 (HY000) at line 1: File '/app/spectrum/mysql/bin/event_1536689990.txt' already exists ERROR 13 (HY000) at line 1: Can't get stat of '/app/spectrum/mysql/bin/event_1536689990.txt' (Errcode: 2 - No such file or directory) ERROR 1086 (HY000) at line 1: File '/app/spectrum/mysql/bin/event_1536689990.txt' already exists ERROR 13 (HY000) at line 1: Can't get stat of '/app/spectrum/mysql/bin/event_1536689990.txt' (Errcode: 2 - No such file or directory) ERROR 13 (HY000) at line 1: Can't get stat of '/app/spectrum/mysql/bin/event_1536689990.txt' (Errcode: 2 - No such file or directory) ERROR 13 (HY000) at line 1: Can't get stat of '/app/spectrum/mysql/bin/event_1536689990.txt' (Errcode: 2 - No such file or directory)
This happens if your event data is 10 days old or less. This will generally only happen on lab machines or newly installed production machines if you installed on 10.2 and upgraded to 10.3 within 10 days. This will not happen if your event data is over 10 days old.
There is a configuration setting in the $SPECROOT/SS/DDM/scripts/convert_saved_myisam_to_innodb.pl script that if your event data is less than 10 days old the tables will still convert but your historical events will be lost.
Resolution
BEFORE running the $SPECROOT/SS/DDM/scripts/convert_saved_myisam_to_innodb.pl, add the below after line 479 (i.e after $count = floor($count); )
if ( $count eq 0 ) { $count = 1; }
You can then run the script.
This issue has been addressed in Spectrum 10.3.1 and above.