generate_masking_script
Generates a masking script for the given masking definition.
Format
emcli generate_masking_script -definition_name=masking_definition_name [-tablespace_name=tablespace_name] [-parameters=<name1:value1;name2:value2;...>] [-credential_name=cred_name] [-input_file=<parameter_tag:file_path>] [-generate_export=Y|N] [-generate_mask=Y|N] [-script | -format=[name:<pretty|script|csv>]; [column_separator:column_sep_string]; [row_separator:row_sep_string]; [ ] indicates that the parameter is optional
Options
-
definition_name
Name of the masking definition.
-
tablespace_name
Name of the masking definition.
-
parameters
List of name-value pairs that represent the credentials required for connecting to the database instance. The supported parameters are db_username, db_password, and db_role.
-
credential_name
Name of the database credential. This option is mandatory when the db_username and db_password parameters are not specified.
-
input_file
Used in conjunction with the 'parameters' option, this enables you to store parameter values, such as username and password, in a separate file. This specifies a mapping between a tag and a local file path. The tag is specified in lieu of specific parameter values of the 'parameters' . The tag must not contain colons ( : ) or semi-colons ( ; ).
For information about the input_file parameter, see -input_file Syntax Guidelines.
-
generate_export
Specify whether to generate a script to export masked data from the specified source database using Oracle Data Pump. Specify Y or N.
-
generate_mask
Specify whether to generate a script to replace sensitive data in-place with masked data on a specified (nonproduction) database. Specify Y or N.
-
script
This is equivalent to -format='name: script'.
-
format
Format specification (default is
-format="name:pretty"
).-
format="name:pretty"
prints the output table in a readable format not intended to be parsed by scripts. -
format="name:script"
sets the default column separator to a tab and the default row separator to a newline. The column and row separator strings can be specified to change these defaults. -
format="name:csv"
sets the column separator to a comma and the row separator to a newline. -
format="name:script;column_separator:<column_sep_string>" column-separates the verb output by <column_sep_string>. Rows are separated by the newline character.
-
format="name:script;row_separator:<row_sep_string>" row-separates the verb output by <row_sep_string>. Columns are separated by the tab character.
-
Output
Success or error messages as well as the impact report (if generated).
Examples
Example 1
The following example generates a script for the masking definition named mask_hr_data. The database password is read from the pwd.txt file:
emcli generate_masking_script -definition_name=mask_hr_data -parameters=PWD_FILE -input_file=PWD_FILE:pwd.txt
Example 2
The following example reads the database credentials from the named credential DB_NC and generates a masking script for the masking definition named mask_hr_data:
emcli generate_masking_script -definition_name=mask_hr_data -credential_name=DB_NC