Export Object Data from the Command Line

Apart from the CA SDM user interface, you can also export the object data from the command line.
casm173
Apart from the CA SDM user interface, you can also export the object data from the command line.
Before initiating the export process, perform the following tasks:
  • Set the
    export_import_path
    and
    db_disk_space
    values in the SDMP configuration properties file. For more information, see SDMP Config Properties File
  • When promoting the
    risk_level
    and
    prptpl
    objects, update the following property files located in the
    NX_ROOT\pdmconf\
    folder, on the source and target systems:
    • Edit the
      dbpromote.uniqkey
      file and update the following properties:
      • risk_level.uniquekey=Value
      • prptpl.uniquekey=object_type, object_attrname, object_attrval, sequence
    • Edit the
      DBImport.properties
      file and update the following property:
      • resolve.prptpl.attributes=object_attrval
Execute any of the following commands to promote the object data changes from the source system to the target system:
db_promote export -d <description> -w <whereclause> -i <inputfile>
db_promote export -d <description> -w <whereclause> -f <factoryname>
The command line options are described as follows:
-d
(Optional) Specifies the description about the package that is exported.
-w
(Optional) Specifies the
Where
clause to filter objects for export.
We recommended that you use the
Where
clause to optimize the search results.
-f
Specifies the factory name of the object.
-i
Specifies the input text file, which lists the object factory names in each row.
-h
(Optional) Denotes help for a command.
For Example:
db_promote export -d "Export categories" -w "last_mod_dt > {unix timestamp}" -i "C:/objectlist.txt"
db_promote export -d "Export categories" -w "last_mod_dt > {unix timestamp}" -f "pcat"
After successful completion, the export process generates a zip file in the
<export_import_path>/Promotion/Export/DB
folder. If the
export_import_path
property is empty, navigate to the
NX_ROOT/Promotion/Export/DB
folder to view the exported package and summary report. The report file contains the number of objects that are exported. The exported package and the corresponding report file are shown in the following format:
sdmp_db_data_export_yymmdd_hhmmss.zip
sdmp_db_data_export_report_yymmdd_hhmmss.txt
For Example:
sdmp_db_data_export_151009_140940.zip
sdmp_db_data_export_report_151009_140940.txt