How to encrypt all the passwords in the optfile using command-line utilities in TIBCO Data Virtualization?

How to encrypt all the passwords in the optfile using command-line utilities in TIBCO Data Virtualization?

book

Article ID: KB0073563

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 8.4

Description

Note: It is important to understand the details of all the options that should be present in the optfile before executing any TDV utilities using the command-line.

Here is a screenshot for reference:
User-added image

Find the detailed explanation of each option given below:
i) -pkgfile <file_name> (required): Specifies one or more import CAR files. The file names should be specified as absolute paths from mapped directories.
ii) Login details of the user.
-server <host_name> (required): TDV Server host to which the utility is to connect.
-user <user_name> (required): User name of profile used to import.
-password <password> (required): Password for user profile used to export package.
-domain <domain> (optional): Domain of the user performing the import. If it is omitted, the assumed value is composite.

iii) The last 4 lines in the optfile are for changing the resource attributes during import (optional). In the screenshot above, the attributes are provided with respect to the data source 'ds_inventory'.
Format:-  -set <path> <type> <attribute> <value> :

Description:
Enables you to change resource attributes during import. You can repeat this option to set different attributes or multiple class paths. String values can be enclosed in double-quotes to allow for spaces.
•The <path> is the TDV resource name.
•The <type> is DATA_SOURCE when the <attribute> is classpath, host, port, database, user, or password.
•The <attribute> can be one or more of the attributes of a data source. All the attributes of a datasource can be changed using the -set option.

These attributes vary with each datasource. The system table SYS_DATASOURCE_ATTRIBUTE_DEFS lists all the attributes for each datasource.

Issue/Introduction

This article will summarize the process on how to encrypt the password related details in an optfile when using command-line utilities in TIBCO Data Virtualization.

Environment

All Operating Systems

Resolution

To complete the entire process of the command-line utility, execute the following two commands:
I) The first command used is for the sole purpose of encrypting all the passwords in the optfile. The example provided in the screenshot is for the package import (pkg_import) utility.
Command for Windows:
 pkg_import.bat -optfile samplefile.opt -encryptionPassword password -optfilePassword mypassword -newOptfilePassword mypassword

Screenshot after executing the first command:
User-added image

Note: There is no need to provide all the options in the command again as they have already been mentioned in the optfile.

After running the above command,  all the password details present in the  optfile should be in encrypted format.
Here is a screenshot for reference:
User-added image

II) The second command is the one which actually completes the particular utility's process.
Command for Windows: 
 pkg_import.bat -encryptionPassword password -optfile samplefile.opt -optfilePassword mypassword

Here is a screenshot after executing the second command:
User-added image