$SPECROOT/bin/RpmgrInitializeLandscape.bat utility can be used to reinitialize (remove all data) for one or more or all landscapes from the reporting database. But the large size of SRMdb may limit the hard disk free space, so running this utility may fail or take a long time. The solution shows how to accelerate the process by replacing SRMdb data files with 0 size files.
Normally data files that are large are event.MYI and event.MYD files. In this case, to accelerate the SRMdb reinitializing process you can replace the data files with 0 size files and repair the database.
To accelerate the SRMdb reinitializing process
- Stop OneClick server and MySQL database server:
To stop OneClick server on Solaris/Linux, run the script: $SPECROOT/tomcat/bin/stopTomcat.sh
On Windows, stop SpectrumTomcat service from Windows Services panel.
To stop MySQL database server, run the following $SPECROOT/bin/cmdC command on bash shell:
cmdC <hostname> 2 MYSQL
Note : If OneClick server is running on the same computer with SpectroSERVER, shutting down MySQL database server will shutdown Archive Manager.
- Remove event.MYI and event.MYD files and replace them with 0 size files. Be sure to use exactly the same filenames.
- Start MySQL database server:
To start MySQL database server, run the $SPECROOT/bin/launchinstdbapp command on bash shell.
launchinstdbapp <hostname> MYSQL y MYSQL.OUT
- Log in to MySQL and repair the event table:
./mysql -uroot -proot reporting
On mysql prompt, run the following: repair table event USE_FRM;
- Run $SPECROOT/bin/RpmgrInitializeLandscape.bat to reinitialize SRMdb. Example:
$SPECROOT/bin/RpmgrInitializeLandscape.bat root root -initHist 45 -all