Skip to main content
Skip table of contents

Database Export/Import

Information

  • During database export, a copy of the data is created and saved in a file.
  • Via database export, this file can be read in a PLANTA system (requirement: the schema must equate to the schema of the source system).
  • The database export/import is used by Customizing Deployment and Datenbank-Update.

Note

  • The database connection, etc. from the PLANTA Server configuration is used.
  • The export has access to the PLANTA Data Dictionary and can therefore decide which schemas, tables, and columns are active.
    • If no specific data tables and/or schemas are selected, all active data is exported.
  • Since the Schema Export works analogously, exported schemas and data of the same customizing status match exactly.

Application

Information

  • The tools are all located in the server installation directory and pose the same requirements to the system environment as the PLANTA Server itself, although the storage requirement is clearly lower.

Export

Open via ./planta_export.sh (Linux) or planta_export.bat (Windows).

./planta_export.sh -h
Usage: planta_export [options]
  Options:
    -L, --exclude-licenses
       List of licenses to exclude
    -S, --exclude-schemas
       List of schemas to exclude
    -T, --exclude-tables
       List of tables to exclude (SQL names, not table numbers)
    -f, --full
       Include everything
    -h, --help
       Display this help message
    -l, --include-licenses
       List of licenses to include
    -s, --include-schemas
       List of schemas to include
    -t, --include-tables
       List of tables to include (SQL names, not table numbers)
  * -o, --output-file
       Output file to write export to
    -H, --with-history
       Transfer history tables and REVINFO as well
       Default: false


Import

Open via ./planta_import.sh (Linux) or planta_import.bat (Windows).

./planta_import.sh -h
Usage: planta_import [options]
  Options:
    -L, --exclude-licenses
       List of licenses to exclude
    -S, --exclude-schemas
       List of schemas to exclude
    -T, --exclude-tables
       List of tables to exclude (SQL names, not table numbers)
    -f, --full
       Include everything
    -h, --help
       Display this help message
    -l, --include-licenses
       List of licenses to include
    -s, --include-schemas
       List of schemas to include
    -t, --include-tables
       List of tables to include (SQL names, not table numbers)
  * -i, --input-file
       Input file to read import from
    -j, --jobs
       List of @par files to treat like a separate job each
        --truncate
       truncate all tables about to receive data prior to actual import
    -H, --with-history
       Transfer history tables and REVINFO as well
       Default: false

Parameter Details

The command line parameters for selection of the data amount are identical for export and import.

Parameter NameParametersAbbreviationExplanation
Schema filter--include-schemas and
--exclude-schemas
-s
-S
Allow positive or negative lists of PLANTA schemas, e.g. Q1B Q2B.
Table filter--include-tables and
--exclude-tables
-t
-T
Allow positive or negative lists of PLANTA schemas, e.g. DT412 DT415 MIGRATIONRULE MIGRATIONHISTORY.
License filter--include-licenses and
--exclude-licenses
-l
-L
Allow positive or negative lists of PLANTA schemas, e.g. 011 100.
The license filter behaves differently in import and export (further information).
History--with-history-H
Activates the transfer of the history tables and of the REVINFO table.
  • The migration of the historization is still under development and is currently neither required nor recommendable.
  • You should generally note that after completed transfer incl. history, the counter value of the HIBERNATE_SEQUENCE sequence in the target system must be set to the maximum of the status of source and target system in order to prevent collisions which become manifest as unique constraint violation.
  • Default: false
Export file--output-file-oFile in which the export is written.
Import file--input-file-iFile which is read during import.
Jobs--jobs-jSpecification of several parameter files which are processed sequentially as jobs.
  • This will deactivate trigger and constraints once and reactivate them retrospectively while in the meantime all parameter files are processed exactly as if the import had been triggered separately via @<Datei>.
  • Currently it is still necessary to enter an input file here, which will not be processed, in addition to the jobs. Each job parameter file must specify its own input file.
Truncate--truncate
Empties the table before import.
Help--help-hShows a list of possible parameters.

Differences in the treatment of filter options between import and export

Information

  • Schema, table, and history filters work identically in import and export, i.e. a complete export of a development system can. e.g., also be used for a Customizing Deployment in the corresponding productive system.
  • The general rule is: As far as the export contains the required files, they can be processed selectively by the import.
  • In opposite to that, license filters cannot be used for exported files in import.
  • All lines that are included in the export are processed in the import regardless of its license number.
    • I.e., the export must match the required import here, which applies, for example, to the customizing update.
    • (A complete export of all schemas and tables with correct license filter can, however, be used for a customizing update by making an adequate schema and table selection.)
  • The license filter in the import only defines which records are to be deleted (positive list by --include-licenses) or not to be deleted (negative list by --exclude-licenses) before data is read into the respective tables, on the assumption that the export comes with exactly those licenses that are to be processed.

Import Specialties

Note

  • If, during import, records that have the same primary keys as the records to be imported are identified in the system, the existing records are deleted.

Parameter Files

Information

  • All command line options can be saved in parameter files for repetitive tasks and used with @<Datei> syntax.
  • For examples of use, see Customizing Deployment - as of now, parameter files are made available for this purpose in the first place.
  • When creating a parameter file, you have to take into account that the parser separates the arguments based on line breaks:
# does work:
--include-schemas
    Q1B
    Q2B

# does not work:
--exclude-tables DT345
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.