Extracting the Database Structure to a File

Extracting the database structure to an ASCII file is the first stage in transferring the database structure to a database on a remote system or merging databases. You can include instructions in the extract file to delete or retain tables on the target database that are not contained on the source:

  1. On the DP4 System menu, select the Database Management option.

  2. On the Database Structure Management menu, select the Dictionary extract post option

  3. Enter the name of the source database. The Data Dictionary Extract and Post menu appears:

  4. On the Data Dictionary Extract and Post menu, select option 1 - Extract database structure. The COPYDB Extract Options dialog appears:

  5. Answer 'Yes' to the first question if you wish to extract all the tables to the file. Answer 'No' if you wish to specify which tables are to be extracted
    Answer 'No' to the second question if you wish to keep the existing tables on the target database. Answer 'Yes' if you wish to delete the tables on the target database that are not specified in the extract file

  6. If you specified 'No' to the first question to select the tables to extract, a popup list of tables appears. Use the cursor keys to move around the list of tables. Depending on your configuration you can select/deselect a table either with Enter or the space bar. When you have finished selecting tables, press either Tab or Enter.

    If you select a partial export of tables, the index information is only exported if both the child and parent table are in the selected list of tables. This means that if you used SETLINK to set up the index information for the links between a new table and the existing tables, the index settings will not be transferred if you only export information for the new table. As of 29th May 2008 the 4.623 version of COPYDB and MAKEDB accepts the command line option "−either". In this case index information is included in the export if either the child or parent table is included in the list of tables. You are recommended to use this option, as it is much more likely to do what you really want.

  7. DP4 displays the Output Devices dialog box. Answer 'Yes' to the question 'File?'. DP4 supplies the database name and the extension .PRN as the default name for the export file.

    DP4 creates an export file in the DP4 'Print files' directory. The Data Structure and Data Transfer utility terminates, and you are returned to the DP4 System Main menu.

The format of the export file is described in Understanding the Export File .