db2file_db2 subcommand

The db2file_db2 subcommand is used in the db2bridge_client command. This subcommand is used when you want to move data from a Db2® file to a Db2® database.

The db2bridge_client command looks like this with the db2file_db2 subcommand:
db2bridge_client [--db2bridge-server-host ] [--db2bridge-server-port ] [--db2bridge-server-ssl <True/False>] 
[--db2bridge-server-ssl-certificate <public_certificate_file>] db2file_db2 <subcommand_arguments>

A number of subcommand parameters can be used in the <subcommand_arguments> portion of the command. As many of these subcommand parameters can be added to the main command as needed.

Source connection parameters:
--source
Specifies the folder where the moved files are kept.
Data file migration parameters:
--create-ddls [...]
Specifies the CREATE DDL statements for the tables. This is an optional parameter.
Note: Use --tables, --create-ddls, and --data-files as space separated values where each index across the options corresponds to the same table configuration. Ensure all three options have the same number of values to maintain correct mapping.
--data-files [...]

Specifies the paths of the data files.

--load-flag-options
Specifies flag options for LOAD and IMPORT that is used in load operation. For example, you can pass options such as --load-flag-options 'implieddecimal' 'fastparse' 'COLDEL|'.
--load-kv-options
Specifies the key-value options for the External Table that is used in load operation. For example, you can pass options such as --load-kv-options 'BOOLSTYLE=1_0' 'DELIMITER=|'.
Target connection parameters:
--thosts [ ...]
Use this parameter if you are using multiple target hosts.
--thost
Use this parameter if you are using one target host.
-tport
The port of the target connection.
--tuser
The username credentials for the target connection. By default it is set to bluadmin.
--tpass
The password that is needed by the username credentials for the target connection.
--tdb
The name of the target database that is used. By default it is set to BLUDB.
--target-ssl {True,False}
Specifies whether the connection to the target database is encrypted with SSL. By default this parameter is set to False.
--target-certificate
If --target-ssl is set to True, then this parameter needs to be provided. Specify a fully qualified certificate name to be used for the SSL connection to the target. For example, this file path and certificate can be /home/user1/trusted_certs/target_host_cert.pem. By default this certificate is stored in the keystore.
Object parameters:
--tables [ ...], -t [ ...]
Takes all the table names that are moved from the source to the target, assuming the source table and target table have the same names. Case-sensitive.
Note: Using -t X Y is the same as using -m X X -m Y Y. By default, the dependency resolution is not handled and the order of the tables must be defined by the user.
--include-object-dependencies [True|False]

Automatically detects and migrates the specified database object dependencies. By default it is set to True.

--mv , -m
Moves a specific source table to a specific target table with a different case-sensitive name. For example, users can use the parameter -m T1 T2 -m T3 T4. This parameter can be provided multiple times.
--sschema
Identifies the source schema. By default the source schema name is uppercase --tschema. Case-sensitive.
--tschema
Identifies the target schema. By default the target schema name is uppercase --tuser. Case-sensitive.
--ttenant
Identifies the target tenant. By default the target tenant is SYSTEM. Case-sensitive.
--ttablespace <TTABLESPACE>
Specifies a target table space name for new target tables. Case-sensitive.
--translation-pattern schema_pattern
Defines a naming pattern for creating new objects on the target database. The parameter takes the following in the pattern: {d} for the source database, {s} for the source schema, {t} for the source table. Users can use . once to separate the schema name from the table name. For example, {t}_COPY or {s}COPY.{t} or {s}{t}.
--truncate-table
An option to truncate the target table before data is loaded into it. This parameter does not take any other parameters.
Configuration parameters:
--load-mode
Loads data to the target table using utilities of Db2, such as EXTERNAL_TABLE, and EXPORT [DEFAULT=EXTERNAL_TABLE].
Note: During migration, this might change to provide support to all data types, optimize migration performance, and maintain unload mode compatibility.
--maint-mode
Specifies whether to insert with maintenance mode, for example by inserting force auto-generated columns.
--max-data-streams
Specifies the maximum number of parallel data streams during the data movement operation.
--precheck-mode [SKIP/NORMAL/ONLY]
Specifies the mode of executing prechecks.
  • SKIP: By default this parameter is set to SKIP. This option disables all the prechecks.
  • NORMAL: Runs prechecks and exits if any error is identified.
  • ONLY: Runs prechecks and exits without proceeding further.
--where
Specifies a WHERE clause to restrict the data selected to be moved. For example, you can set this parameter to col_id > 10 OR col_id < 100.
--workers
Specifies the number of parallel workers during the migration.
Data validation parameters:
--checksum , -c
Specifies a specific checksum to use before the data movement operation, if there is some data already in the target table. Use the NO if you do not want to run a checksum. Use the COUNT option if you want a checksum on the row count. Use the FULL option if you want to run a checksum on both the rows and columns. Use the COLUMNS option if you want to run a checksum on the table columns. By default this parameter is set to NO.
General parameters:
--verbose
Specifies that the output must contain every detail.
--help, -h
Shows the help message and then exit.
--version, --rev
Shows the version number of the IBM® Db2® Bridge and then exit.