The documentation from version 39.5.17 of PLANTA project can be found in the new PLANTA Online Help.

Database Export/Import From S 39.5.12

Description for versions < S 39.5.12


Information

  • In the course of the 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 Database Update.

Notes

  • 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 have the same system environment requirements 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

From S 39.5.18

The command line parameters for selection of the data amount are identical for export and import.
Parameter name Parameter Abbreviation Explanation
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 data tables, e.g. DT412 DT415 MIGRATIONRULE MIGRATIONHISTORY.
License filter --include-licenses and
--exclude-schemas
-s
-S
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 the REVINFO table.
  • The migration of the historization is still under development and is currently neither required nor recommendable.
  • In substance, you have to consider that after completed transfer incl. history, the counter 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 that result in a unique constraint violation.
  • Default: false
Export file --output-file -o File in which the export is written.
Import file --input-file -i File which is read in during import.
Jobs NEW --jobs -j Specification of several parameter files, which are processed successively as jobs.
  • As a result, trigger and constraints are deactivated and reactivated once, and in the meantime, all parameter files are processed as if the import had been called separately with @.
  • Currently, it is still required to specify an input file here in addition to the jobs, which will, however, not be processed. Each job parameter file must specify its own input file.
Truncate --truncate   Empties the tables before import.
Help --help -h Outputs a list of possible parameters.

Up to S 39.5.18

The command line parameters for selection of the data amount are identical for export and import.
Parameter name Parameter Abbreviation Explanation
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 data tables, e.g. DT412 DT415 MIGRATIONRULE MIGRATIONHISTORY.
License filter --include-licenses and
--exclude-schemas
-s
-S
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 the REVINFO table.
  • The migration of the historization is still under development and is currently neither required nor recommendable.
  • In substance, you have to consider that after completed transfer incl. history, the counter 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 that result in a unique constraint violation.
  • Default: false
Export file --output-file -o File in which the export is written.
Import file --input-file -i File which is read in during import.
Truncate --truncate   Empties the tables before import.
Help --help -h Outputs 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 CustomizingDeployment 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
    
    

         PLANTA project









 
  • Suche in Topic-Namen

  • Suche in Topic-Inhalten
This site is powered by the TWiki collaboration platform Powered by Perl