How to run pre SQL or post SQL in a TDM Portal masking job
search cancel

How to run pre SQL or post SQL in a TDM Portal masking job

book

Article ID: 258437

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

How to run the Pre and Post SQL's scripts in TDM portal? In FDM we have POSTSQLCODEFILE and PRESQLCODEFILE masking options, however these options are not found in the TDM Portal.

Environment

Release : 4.10

Resolution

The POSTSTEP ans PRESTEP masking options (Masking Settings page) were exposed in TDM Portal starting with TDM Portal release 4.10.184.0. In the masking options (Masking Settings page), you should find a POSTSTEP and PRESTEP option, which allows you to execute a SQL script before or after the masking is preformed.

TDM Portal/FDM can automatically create post and pre SQL scripts used to drop/recreate triggers and FK constraints during the scanning of the tables, as long as the DBUPDATES=P is set.

The options you should be aware of are:

  • POSTSQLCODEFILE = A SQL file with stored procedures that is called after masking, typically to recreate triggers and FK constraints.
    A product of the DBUPDATES=P option.

  • PRESQLCODEFILE = A SQL file with stored procedures that is called prior to masking, typically to drop triggers and FK constraints.
    A product of the DBUPDATES=P option.

  • DBUPDATES
    • N—run in simulation mode (preview mode)
    • S—create SQL file <table name>_UPDATES.sql
    • P—see Prestep and Poststep options

(Note: DBUPDATES=S only available for non-DB2 databases with unique or primary key columns.)

  • POSTSTEP - This is the path to a SQL file to perform post-steps, the SQL should be ANSII standard insert, update, or delete operations.
    The SQL file is executed after the masking.

  • PRESTEP - This is the path to a SQL file to perform pre-steps, the SQL should be ANSII standard insert, update, or delete operations.
    The SQL file is executed prior to masking.

Additional Information

TDM Patches are available for download at Test Data Manager (TDM) Support Patches

For more information regarding the masking options, see TDM Reference - Masking Options