How to Create Table in Oracle Target Database for HVR Statistics
Question
How can I create a table in an Oracle database for HVR statistics?
Environment
HVR 5
Answer
HVR GUI allows you to create a statistics channel to view the summary of integrates, updates, or deletes that happened on a particular channel. You can also see changes to a particular table in a channel. The table named hvr\_stats
is populated with the summary for the channels using the hvr.out
file as an input.
Overview
We have made the creation of this table easier by providing the hvr_stats.cre
and hvr_stats.mod
scripts in the directory $HVR_HOME/demo/hvr_stats/oracle
.
You can create the table hvr\_stats
in Oracle database using either:
- Command line
- SQL developer
Creating table using command line
Navigate to the path where the scripts
hvr_stats.cre
andhvr_stats.mod
are located.Run script hvr_stats.cre using the following command:
$ sqlplus <username>/<password> < hvr_stats.cre
Run script hvr_stats.mod to create indexes using following command:
$ sqlplus <username>/<password> < hvr_stats.mod
Creating table using SQL Developer
Open SQL Developer and log in to the database that you want to create the table in.
Click File on the top left.
Open the directory where the script hvr_stats.cre is located which is $hvr_home/demo/hvr_stats/base/oracle. Import this script and execute it. You have created the table
hvr\_stats
.
Similarly, import the hvr_stats.mod and execute it. You should see indexes created for this table.