Update Oracle sequences
This action is now deprecated. USoft 9.1 import routines deal with database sequence updates (both on Oracle and SQL Server) automatically. You only ever need this action if, for some reason, you plan to perform INSERTs of records directly against the RDBMS.
This action applies only to the Oracle RDBMS. You must have Oracle software installed that allows you to call sqlplus from the command line. Delivery Manager does not offer this facility for SQL Server.
The purpose of resetting the sequences is to avoid problems with INSERTs after data have changed as a result of data import actions. If a SEQ_PERSON sequence is used for generating unique person ID numbers, and the highest person ID in the current data is 1500, the current value of the sequence is reset to 1501:
drop sequence SEQ_PERSON;
create sequence SEQ_PERSON start with 1501;
This type of problem is automatically prevented if you perform the INSERT through USoft.
The operation applies to all Oracle sequences in "Database account", not only for unique numbers for end user application tables, but also for unique numbers for tables of USoft applications such as USoft Definer.
The operation uses the required "Working directory". When the action is run, 4 SQL scripts with suffix "500.post.rdbms.sql" are written to this folder, overwriting earlier versions if they exist:
The make and use input files contain the instructions necessary to execute the operation.
The temp file is an interim spool file.
The exec file contains the SQL commands for updating the Oracle sequences.
The temp and exec files are generated each time the make file is run.
Running from the command line
You can (re)generate the exec file, away from USoft Delivery Manager, in Oracle SQL*Plus by running the make script from the command line. Pass the working directory as an additional parameter:
sqlplus username/password@connection working-dir/sequences-make.500.post-rdbms.sql working-dir
To execute immediately, uncomment the following code line in the make file:
/* start &&1\sequences-exec.500.post.rdbms.sql */
Or you can execute separately, by giving the command:
sqlplus username/password@connection working-dir/sequences-exec.500.post-rdbms.sql