Running DBLoad

There are different methods to run DBLoad.

  1. To run DBLoad, use <installed path>\<OS>\resources\sdm\exploreJS\bin\nt\dbload.bat command on Windows and <installed path>/<OS>/resources/sdm/exploreJS/bin/unix/dbload.sh command on UNIX.

  2. To import data from a database,

    On Windows , enter dbload.bat -f <filename> -ds <dbservice> <options>

    On UNIX, enter dbload.sh -f <filename> -ds <dbservice> <options>

This table describes details of DBLoad import command for Windows and UNIX:

<file name>

Data file name in which you have stored the transactions to be completed. For information on creating a data file, see Setting Up the Data File. < doc note :create link here>

<dbservice>

Unique name to identify a service entry in the dbload.cfg file. This entry is case-sensitive.

<options>

Indicates other command-line options you can use. For details, see Command-Line Options for DBLoad. < doc note : create link here>

 

DBLoad generates the .stat, .upr, and .err files.

  • The .stat file provides information about the status of the tasks.

  • The .upr file provides information about unprocessed items and failed transactions.

  • The .err file provides error information.

You need to create a data file that contains appropriate instructions for completing the required task. For information, how to create a data file and for available formats, see Setting Up DBLoad and About Transaction Types.

Command-Line Options for DBLoad

This table  describes the command line options for DBLoad:

Option Description/Default Value

-d

Performs the syntax check of the data file. The transactions are not committed to the database, and the errors are logged into the .stat, .upr, and .err files.

-l

Provides more information on the errors. The error messages are logged into the .stat file.

-m

Exports model data

-b

Batch size refers to the number of instructions (items) to be processed in one batch for a database operation. Default size is 1.

-ds <dbservice>

Specifies the service name to identify the entry in the dbload.cfg file.

-f <filename>

Specifies the name of the data file.

-dr

Turns on the mode to return data, during editing of items.

-sf <filename>

By default specifies the name of the status file. .stat suffix is added to the data processing file name.

-ef <filename>

By default specifies the name of the error file. .err suffix is added to the data processing file name.

-uf <filename>

By default specifies the name of the file to create an unprocessed data file. .upr suffix is added to the data processing file name.

-c

Ensures that the data is not committed to the database.

-t

Target database for which data is exported. This option is used to take care of the differences in data types between Oracle and DB2. For example, <-t oracle> when used against a DB2 database creates an export file suitable for import into a Oracle database. <-t db2> when used against an Oracle database creates an export file suitable for import into a DB2 database. Default value is oracle.

-ea

Specifies the failure mode to abort during editing of items. Default value is Continue.

-cx

Turns off execution of all the custom functions during processing.

-p

Turns off permissions check when processing the data file. You should be an CES user with permission to edit to execute this option.

-rv

Turns off required values validation when processing the data file.

-vc/-v

Turn off valid values validation when processing the data file.

-ac

Turns off all permissions, valid values, and required values. Use this option with caution.

-ee

Turns on to evaluate expressions.

-pc

Turns off checking of primary keys during the data file processing. During file processing, duplicate records can get inserted into the database. This option can be used only when you are sure about
the data in the file.

-iu

Performs an insert operation if the object does not exist in the database, otherwise performs modify operation.

-ki

Retain information such as user information and time stamp when importing data. Updates import information.

-w

Specify the number of parallel processes that should occur during the import of data. Default value is 1.

-cf

Specifies the location of the dbload.cfg file. Use this option if the configuration file is not present in the
current working directory in client installation or <installed path>/<OS>/resources/sdm/exploreJS/admin/configs directory in server installation.

-ug user1,user2...

Assign permission on items for the specified users. You need super user privileges to assign permission.

-ur user1,user2...

Revoke permission on items for the specified users. You need super user privileges to revoke permission.

-gg group1,group2...

Assign permission on items for the set of groups specified. You need super user privileges to assign permission.

-gr group1,group2...

Revoke permission on items for the set of groups specified. You need super user privileges to revoke permission.

-xp

Exports item level permission.

-xh

Exports hidden properties.

-xm

Exports metadata when exporting model, unit of measurement, UCF, auto sequence, logical data types.

Note: Export transaction block and Option block are not supported for command line options. Type dbload.sh -help at the command line to obtain a list of all options available for dbload.