This repository contains examples to show how masking can be automated using scripts and Actifio.
The sequence of events if used with a liveclone workflow:
- A LiveClone of the source database is refreshed from the lastest snapshot
- This LiveClone is prep-mounted to a masking host where the source database is prep-mounted as a new database with a different name The workflow needs to ensure the prep-mounted DB has that name or the launcher script will fail.
- The workflow calls the launcher.sh as a post mount task (after the prepmount). This script runs a SQL script.
- Once the masking is complete, the prep-mount is unmounted and the liveclone is now in a masked state.
- The masked liveClone is now mounted to the target host as a new database by the workflow.
This means the workflow needs to be setup as follows:
- Workflow Type: Liveclone
- Schedule Type: On Demand
- Mount for Pre-Processing: On
- Post-Script: launcher.sh (or whatever the .sh file is called)
- Create New Virtual Application: On
- Oracle Database Name (SID): Should match the DB name in the masking shell script
On the next panel you can set it up any way you like, if the database is called dmdb, then ideally use this:
- Source DB name: dmdb
- Prepmount DB name: prepdmdb
- Final mount DB name: maskdmdb
You can also use this script on a regular App-Aware mount or a workflow that does a Direct App-Aware Mount. No changes are needed to make this work apart from the usual customization of the shell script and SQL script.
There are three things that need to be updated compared to the sample script shared here:
- Is your ORACLE_SID the one called by workflow? In this example it is called: prepdmdb. Note in launcher.sh it learns this automatically.
- Is your ORACLE_HOME correct? In this example it is: /home/oracle/app/oracle/product/12.2.0/dbhome_1 Note in launcher.sh it learns this automatically.
- Is the SQL script being called the correct one? In this example it is called: maskscript.sql Note in launcher.sh it expects this to be passed by the workflow.
Compare the masked data between the source DB and the mounted masked copy .
- The masking section of the launcher shell script only runs when these are all set: "%ACT_MULTI_OPNAME%" == "scrub-mount" if "%ACT_MULTI_END%" == "true" if "%ACT_PHASE%" == "post"
This ensures the script only runs after all parts of the prep-mount are complete including mounting of logs and starting of prepmounted Database.
You can run the launcher.sh file with a parameter of 'test' to do a manual set of masking.
The point of this GIT repository is to share a framework that lets you test masking without masking software. In addition are some working examples of scripts that run masking software. These scripts are not complete in that the setup of the masking software is not described.
So camolauncher.sh is exactly the same as launcher.sh except that instead of running a shell script that does shell script masking, it instead starts Camouflage software to do masking instead. Note this calls for a file called /home/oracle/Mask-Demo.camo This file would be created when you set up your masking routine with Camouflage.
So optimlauncher.sh s exactly the same as launcher.sh except that instead of running a shell script that does shell script masking, it instead starts IBM Optim software to do masking instead, on a database called optimdb. There are optim files called by the tasks being run by this script, that need to be created using Optim Software.