Previous Topic: pdm_uconv--Convert Local Charset to UTF-8

Next Topic: pdm_webstat--Return Web Usage Statistics

pdm_userload--Add, Update, and Delete Database Records

The pdm_userload utility updates a CA SDM database using an input file you specify.

Important! You should always backup your database before you perform a pdm_userload.

Whenever you upload tickets (such as issues or requests), your ticket number should include a unique prefix or suffix in its string. CA SDM views this number as a string of characters not as a sequential number, and thus, cannot guarantee that it will assign a unique number to the uploaded tickets. As long as you assign a unique prefix or suffix using awk or another text processor, however, you can upload tickets without CA SDM writing over previously assigned numbers.

Syntax

This command has the following format:

pdm_userload [-a] [-c] [-h] [-r] [-v] [-u] [-m] -f filename

Input File Format

The input file entries follow this format:

TABLE table_name
fieldname1 fieldname2 . . . . fieldnameN
{ "value11", "value12", . . . "value1N" }
{ "value21", "value22", . . . "value2N" }
.
.
.
{ "valueN1", "valueN2", . . . "valueNN" }

table_name is the name of the table to be loaded, as listed in the CA SDM database schema file, which is located in $NX_ROOT/site/schema.sch (UNIX) or installation-directory\site\schema.sch (Windows), where $NX_ROOT or installation-directory is the directory where you installed CA SDM.

-f filename

Specifies an input ASCII file.

-a

Updates all existing records, regardless of whether more than one existing record matches a single input record. Without this option, input records that match more than one existing record are rejected.

Important! Use this option carefully.

-c

Checks the input file against the database and reports on the updates that would be made, but does not make the updates.

-r

Removes database records that match input records. The -a option can be used with the -r option.

Note: Make a backup copy of the database before running pdm_userload with this option. Once old database records are removed, you must restore the CA SDM database with this backup copy if you wish to recover any deleted records.

-v

Specifies verbose mode.

-u

Updates existing records, but does not insert new records into the database.

-m

Means mass update. Specify when you are using pdm_userload to add or delete a large number of records. This option suppresses all client notifications of updates and sends a cache refresh message for a table when pdm_userload finishes processing the table.

-x

Uses locale sensitive numeric input formats.

-t

Specifies the name or UUID of tenant to associate all loaded data with the specified tenant. This argument is valid only when multi-tenancy is installed.

Pdm_userload supports new arguments on the TABLE statement, "Truncate" and "NoNewID". These arguments are specified in an optional parenthesized option after the table name. For example:

TABLE Call_Req (TRUNCATE, NONEWID)
Truncate

Causes pdm_userload to issue a database specific TRUNCATE command for the table prior to loading any data. In addition, it forces pdm_userload logic to use insert-only logic regardless of command line arguments, as all records are new.

NoNewID

Causes pdm_userload to use the id value from its input control file for new rows in the table, rather than generating a new ID for inserted data (the default logic of the pdm_userload -i option).

Restrictions

You can run pdm_userload while CA SDM is active, but performance can become very slow. It is best to run pdm_userload when no one is using CA SDM.

More information:

pdm_backup--Write Database to ASCII File

pdm_replace--Replace a Database Table

pdm_restore--Restore a Database