RE: Data Masking errors during script

From: Peter Sharman <pete.sharman_at_oracle.com>
Date: Mon, 16 Mar 2015 13:05:48 -0700 (PDT)
Message-ID: <6b6d6e5e-a9d8-4eb1-8bba-8b40673bacde_at_default>



Jeff

 

Our Data Masking PM doesn’t have write privileges to the list so he asked me to send this:

 

We recommend users to take a backup of the target database before they perform In-Database masking.

 

Users may have to restore the target database table and if necessary the schema or database depending on at which step Data Masking scripts failed. If the masking script failed at the initial stages such as index and privilege deletions then it may not be necessary to restore the table or database . In this case you need to find and fix the source of failure and re-run the masking script. However if the masking scripts fail while recreating the masked table then you may have to restore the target table as the masking scripts would have left the target table (possibly the dependent tables) in an inconsistent state.

 

For advanced users there is an un-supported way of resuming a failed masking script:

 

  1. You need to identify the last failed data masking function.

   1.1. If you scheduled the data masking job through EM CC UI, navigate to the Data Masking job and expand the results of the job.

   1.2. If you are running the data masking job as SQL script you can check your spooled output.

   You will notice the failed masking function something like "exec mgmt$step_7398_53502"

   In the above output 7398 is function id and 53502 is script id

 

2. Cross check the failed masking function id using the script id in the target database. Remember that you should have the script id following the step 1.

   select * from MGMT$MASK_CHECKPOINT where script_id = 53502 ;

   It should show the last executed step as 7398

  

3. Manually update the last executed checkpoint

   update MGMT$MASK_CHECKPOINT set last_step = 7399 where script_id = 53502 ;

   commit;

 

4. Rerun the failed masking script.

 

Pete

Pete Sharman
Database Architect, DBaaS
Enterprise Manager Product Suite
33 Benson Crescent CALWELL ACT 2905 AUSTRALIA

Phone: HYPERLINK "tel:+61262924095"+61262924095 | | Fax: HYPERLINK "fax:+61262925183"+61262925183 | | Mobile: +61414443449 

  _____  

"Controlling developers is like herding cats."

Kevin Loney, Oracle DBA Handbook

 

"Oh no, it's not, it's much harder than that!"

Bruce Pihlamae, long term Oracle DBA

  _____  

 

From: Jeff Chirco [mailto:backseatdba_at_gmail.com] Sent: Wednesday, March 11, 2015 9:01 AM
To: oracle-l_at_freelists.org
Subject: Data Masking errors during script

 

Ok I need some help with the data masking scripts generated from EM.  I pre-generate the masking scripts and then run them on my clone database. However if it happens to run into an error when recompiling a referenced procedure the whole script will stop.  Is there a way to allow the script to continue on so it doesn't leave the database in an inconsistent state? 

I even sometimes have problems where I generate two scripts, say one for SSN and another one that does all birth dates.  I run SSN one first and it will revoke all grants and at the end is supposed to reply those grants. Well for some reason it misses a grant but there is not error.  And then when the birth date script runs a procedure will error out compiling because it needed that grant that the previous script missing reapplying. 

Masking scripts are becoming a pain.

Thanks,

Jeff

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 16 2015 - 21:05:48 CET

Original text of this message