Description:
Correct Usage of RpmgrInitializeLandscape command explaining how command is working and correct usage of arguments along with explanation of interaction between Archive Manager database and SRM.
Solution:
This document is valid for all versions of Spectrum from 8.1 up to current version at time of writing 9.2 H02.
When using this command it is always necessary to stop Spectrum Report Manager (SRM) first.
This is in order to prevent db contention which though seen less in versions of Spectrum 9.0 and later was more prevalent in versions 7.1 & 8.1 of Spectrum which were using an earlier version of MySQL.
Once SRM is stopped it is used with the following syntax:
RpmgrInitializeLandscape <username> <password> [-skipInitialHistory] [-initHist <# of days>] [-all] [<landscape1> <landscape2> ...]
To better explain how this is working here is an example:
./RpmgrInitializeLandscape.sh root root -initHist 50 as00901 as00910
Once initiated this command will do the following:
First the database is initialized with all data removed for specified landscapes (in above example as00901 and as00910). No data is retained in the landscape at all.
- skipInitialHistory If used Report Manager does not retrieve or store events during event processing that have occurred before the utility is run. This flag overrides -initHist <# of days> if it is also included in the command line.
- initHist After the database is initialized and all data removed from it SRM then imports events from the Archive Manager database (ddmdb) up to the number of days specified with ? initHist in this case 50 days.
Please Note: It can only import events from the landscape that still exist in the ddmdb.
So if there are only 45 days of data in the ddmdb then only 45 days can be imported not 50 as specified above-45 days being the default retention period for the Archive Manager database set in the $SPECROOT/SS/DDM/.configrc file.
- initHist If this argument is not used it will clear all data and attempt to import 1 day's worth of past events from ddmdb.
In order to complete the process and ensure the data is imported back it is then required to restart SRM.