8.8 Updating Oracle Sequences
The OFSBD framework uses Oracle sequences for BD datamap component. To this end, OFSBD provides the ability to maintain the Oracle sequences used in Behavior Detection.
This utility must be compulsorily run by clients who are upgrading from Informatica to OFSBD at least one time at the end of the stage 1 upgrade process. This utility also doubles up as a maintenance utility for these Oracle sequences.
The shell script which must be executed for invoking this utility is
run_update_ora_seq.sh
. This script in turn calls a database
procedure P_UPDATE_ORACLE_SEQUENCE. The database
procedure P_UPDATE_ORACLE_SEQUENCE contains the logic to set the
correct start value of Oracle sequences. The procedure internally drops and re-creates
Oracle sequences by getting the max value +1 of the seq_id column
from the base table as specified in the TABLE_NM column of metadata
table KDD_ORACLE_SEQUENCE.
Clients upgrading from previous version of OFSBD to 6.2.1 version must run
the script run_update_ora_seq.sh
without any parameters.
For maintenance work, the script can be executed either by not passing any parameter or by passing either the table name or the Oracle sequence name as its optional parameter.
- Without any parameter:
run_update_ora_seq.sh
- Passing table name or Oracle sequence name as parameter:
run_update_ora_seq.sh<TABLE_NAME> OR run_update_ora_seq.sh<ORACLE_SEQUENCE_NM>
Note:
Do not modify the KDD_ORACLE_SEQUENCE metadata table unless specifically requested by the Oracle support team.The log for this script is written in the run_stored_procedure.log
file under the <OFSAAI Installed Directory>/database/db_tools/logs
directory.
This script is a part of database tools and resides in the <OFSAAI Installed
Directory> /database/db_tools/bin
directory.
Note:
When executing
run_update_ora_seq_sh
, it may fail and display the following error:
ORA-04006: START WITH cannot be less than MINVALUE. To fix
this error, update dim_country set N_COUNTRY_SKEY = 0 where N_COUNTRY_SKEY =
-999