7signal INDR-EYE01 Manuel D’Utilisation
14 Removing old measurement data
77
7signal Solutions Inc., 526 S. Main Street, Akron, Ohio 44311, USA, 855-763-9526, info@7signal.com,
www.7signal.com
7
sig
n
al
Sa
p
p
h
ire
D
ep
lo
yme
n
n
t
G
u
id
e R
ele
as
e 5
.0
14 REMOVING OLD MEASUREMENT DATA
Sometimes it is necessary to remove old measurement data by using command line tool. This is
necessary, for example, if large amounts of data needs to be removed. Performance of command line tool
is much better than GUI tool, as data removal approach is different (database export/load vs. SQL delete
statements).
necessary, for example, if large amounts of data needs to be removed. Performance of command line tool
is much better than GUI tool, as data removal approach is different (database export/load vs. SQL delete
statements).
Step 1: Resolve Eye ID
ID of one Eye in the network topology is needed. Login to Analyzer and check topology tree on the left side
of the
of the
browser window. Click “(i)” button next to Eye name in the topology tree. Popup window opens.
Locate line “Eye id” in the table and write down the Eye ID number.
Step 2: Login to Carat server host as root
Step 3: Change to DBMS directory
For example:
# cd /opt/7signal/dbms
Step 4: Create work directory writable by database user
For example:
# su
– db7sign
$ mkdir /home/db7sign/purge_work_dir
$ exit
$ exit
Step 5: Resolve group ID.
Resolve ID of the group that owns the data to be removed. For this, we are using the Eye ID resolved in
step 1.
step 1.
# su
– db7sign
$ db2 connect to mgmt7 > /dev/null&& db2 select gid from carat7.eye where eye_id = <Eye ID>
Example output could be:
GID
-----------
4
Exit the db7sign shell
$ exit
Step 6: Check data removal options
Execute data removal tool without options:
# ./purge_measurement_db.sh
Usage: purge_measurement_db.sh <date in YYYY-MM-DD format> <Carat group ID that owns
the Eyes>
the Eyes>
Options: -c Use explicit table column names when exporting data.
-d Use DEL export instead of IXF
-w <directory> Use work directory <directory>
-n Use non-recoverable loading mode
Preferred options are
–td for DB2 version 9.5. –w is mandatory
Step 7: Execute data removal tool:
For example, if data older than 2013-10-12 should be removed from the measurement DB and group ID is
4, command would be:
4, command would be:
# ./purge_measurement_data
–w /home/db7sign/purge_work_dir 2013-10-12 4