The Migrate Masks function lets you move your DataVeil masks to a different database schema ("target database".) The target database schema will replace the selected database in the current DataVeil Project.
The Migrate Masks function for a Database can be performed by right-clicking on the Database node in the Project view and then selecting the 'Migrate Masks...' option from the pop-up menu.
A connection dialog to the target database shall be displayed.
For example, suppose the user wishes to migrate the current DataVeil project that masks a database called 'kona' to a similar but slightly different database called 'kona_2'.
After specifying the connection details, click on the 'OK' button to initiate the Migrate Schema function.
DataVeil shall then attempt to map all Project-relevant entity names between the current Project's database schema and the target database schema. A dialog, known as the Resolve panel, shall be displayed showing all mappings. If the project and target databases are very similar then all names may be automatically mapped in which case the mapping dialog serves as a confirmation to the user that the Migrate Schema function is ready to proceed.
If DataVeil cannot map a column then the user shall be asked to resolve this by explicitly selecting a target column. In this example, the column 'sales.Customer.dob' could not be found in the target database. Therefore, the field in the 'New Name' column is blank and the combo box Action "Rename as" has been selected. The user can then click on the "..." button to select the column from the target database, or change the combo box Action to "Ignore". The combo box Actions are described below.
Combo box Actions:
An exact match of TableName.ColumnName was found on the target database. All DataVeil items for this column shall be copied using the original column names.
All instances of this column name in the current Project database shall be copied to the target database using the specified new column name in the target database.
All DataVeil items (such as masks) that use this column shall NOT be copied to the target database.
In this example, the column 'sales.Customer.dob' was renamed on the 'kona_2' database to 'sales.Customer.birthDate'. Therefore, the user clicked on the '...' button and made the selection as shown below:
Also note in this example that the user had decided not to migrate the masks and/or DataVeil settings associated with 'sales.Store.storeID' and so the user had selected the 'Ignore' Action for this field.
Note: You can migrate to any other database type supported by DataVeil. For example, you can migrate from an SQL Server schema to an Oracle schema. In this case, all column names used by DataVeil masks shall need to be resolved because the naming scheme between SQL Server and Oracle are different; for instance, a fully qualified column name on SQL Server has four parts ('db.schema.table.column') whereas on Oracle there are only three ('db.table.column'.)
Multiple Row Selection
Sometimes you may need to change the Action on many rows to the same value.
For example, when migrating a masking project to another schema that does not have many of the corresponding columns of the original schema and therefore you would like to change the Action to Ignore for all of these.
Instead of manually changing the combo box setting for each of these rows individually you could select all of the required rows (clicking on rows while holding down CTRL or SHIFT keys, as standard on your OS) and then right-click and choose the required action, as shown below:
...after clicking on the Ignore item, all the selected rows' Action is changed to Ignore:
There are two situations where the Migrate Masks and Refresh Schema functions will not automatically update changed column references:
If a Mask's Where condition specifies a column name that has changed in the database then the user must manually update the Where condition with the new column name. You can enable a warning message to identify all Where conditions on every Refresh operation. The warning message can be enabled/disabled from the Tools>Options>Messages menu.
User SQL Mask
If a User SQL Mask specifies a column name that has changed in the database then the user must manually update the User SQL Mask with the new column name. This only applies to the SQL text part of the Mask - the Join condition (if specified) is handled automatically. You can enable a warning message to identify all User SQL Masks on every Refresh operation. The warning message can be enabled/disabled from the Tools>Options>Messages menu.