Previous Topic: pdm_proctor_init--Start Proctor on Secondary Servers

Next Topic: pdm_rest_util--Manage the CA SDM RESTful Web Services Application

pdm_replace--Replace a Database Table

pdm_replace deletes a table in a CA SDM database and replaces it with a table from a temporary file you specify with the -f option; the data from the input file is the only data that is in that table after running pdm_replace. Back up your table before running pdm_replace.

Note: As part of its processing, pdm_replace first shuts down the daemons (UNIX) or services (Windows).

pdm_replace accepts a text file as input, which is the same file format used by pdm_userload. You can create an input file for pdm_replace using pdm_extract; however, you cannot use the output of pdm_backup as input to pdm_replace.

Important! Be sure to name your input file with a name different from the table name you are attempting to replace. For example, if you are replacing a table named ca_contacts and you name the input file ca_contacts.dat, after you execute the pdm_replace command to point to the input file (ca_contacts.dat), it deletes the file after execution because it has the same name as the table.

Restrictions

Syntax

This command has the following format:

pdm_replace [-v] -f filename

-v

Specifies verbose mode.

-f filename

Specifies an ASCII file with the following format:

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

This format is the same file format used by pdm_userload. You can create an input file for pdm_replace using pdm_extract; however, you cannot use the output of pdm_backup as input to pdm_replace.

More information:

pdm_extract--Extract Data from Database

pdm_userload--Add, Update, and Delete Database Records