Kbase P21223: How can I get the sequence definitions from an existing database into a new database without any seq
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/14/2009 |
|
Status: Verified
GOAL:
How can I get the sequence definitions from an existing database into a new database without any sequence values?
GOAL:
How can I get the sequence current values from an existing database into a new database without any sequence values?
FACT(s) (Environment):
Progress/OpenEdge Product Family
All Supported Operating Systems
FIX:
When dumping the .df, consider what data definitions are needed for this operation.
Through the Database Administration tool, when ALL tables that are currently defined are selected to describe the .df, then the sequence definitions are included. This can be verified by sending the resulting .df to a text editor and:
ADD SEQUENCE
will be listed for each sequence where needed, including the Initial value, the way these are to be incremented, if they are to be recyled and what the minimum value can be. In this case, the sequence definitions are included when the .df is loaded into the new database.
If however, a subset of table(s) is needed to describe the .df, then the SEQUENCE is not included. iow: the ADD SEQUENCE part will be missing in the resulting .df for those tables where sequences have been defined. In this case, the _seqdefs.df needs to be dumped through the Database Administration tool in addition to the data .df, in very much the same way:
Start the Database Administrator
1.) Connect to the database that you are dumping FROM
2.) ADMIN -> DUMP Data and Definitions -> Sequences Definitions -> output file: _seqdefs.df OK
mssg: Dump of definitions completed
3.) Connect to the new database
4.) ADMIN -> LOAD -> DATA DEFINITIONS (.df file) -> select _seqdefs.df OK
mssg: Load of definitions completed
In addition, if the Table Contents .d files are loaded into the new database, then the 'sequences current values' also need to be loaded irrespective of which method was employed to describe the data.df initially. This is to ensure that the cust_num (for example in the sports database) sequence integrity is maintained. When the 'sequences current values' is dumped, the resulting file will merely be a list of the SEQUENCE already seen in the .df, together with the last_used_number.