Disable Constraint when masking a primary key field?

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Answered
If the field I am masking is a primary key (or foreign key), then should I be checking the 'Disable Constraint' in the job setup? If yes, then is that constraint only disabled for the masking process? I don't see any way to 'Enable Constraint' again, unless that happens automatically or doesn't need to be done.

Thanks,
Renee Greenley
Photo of Renee Greenley

Renee Greenley

  • 604 Points 500 badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,682 Points 4k badge 2x thumb
Hi Renee,

Yes that’s right and they are enabled back automatically after the job run.

Regards,

Mouhssine
Photo of Renee Greenley

Renee Greenley

  • 604 Points 500 badge 2x thumb
Great. Thank you Mouhssine.

Renee
Photo of Viswas Patnala

Viswas Patnala

  • 492 Points 250 badge 2x thumb
Disable & Enable Constraints in Masking GUI didn't work for me on earlier versions of 5.0.2.3 or 5.1.6.0. I was told that these would be functional in next versions. Can you please confirm which DE version are you using if this functionality works for you?
Photo of Viswas Patnala

Viswas Patnala

  • 492 Points 250 badge 2x thumb
We observed no action taken against constraints even after disabling them in GUI in DE - 5.0.2.3. This was due to the missing grant constraint permission to delphix_db user in the db user creation script.
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,682 Points 4k badge 2x thumb
OK it does make sens now
Photo of Viswas Patnala

Viswas Patnala

  • 492 Points 250 badge 2x thumb
Did we take this into consideration and added additional grants to db user creation script? I believe this would be the correct fix to make the functionality work as expected from GUI irrespective of DE version.
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,682 Points 4k badge 2x thumb
Hi,

In normal way you assigne a user that have all required roles to operate you masking operation, delphix_db have only select on system privs so it shouldn't be use as db user to act on app schemas to mask.

Regards,

Mouhssine
Photo of Viswas Patnala

Viswas Patnala

  • 492 Points 250 badge 2x thumb
I agree. In such case, we should update the documentation or have a note somewhere with this role/permission as a pre-requisite to operate on constraints.
Photo of Renee Greenley

Renee Greenley

  • 604 Points 500 badge 2x thumb
Viswas,

We are currently on an old 5.0.0 version with plans to migrate to the latest version hopefully next week. I am going to wait until after that migration to test this. I will let you know what I find.

Renee
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,682 Points 4k badge 2x thumb
Hi all,

Form more informations cf. https://docs.delphix.com/docs/delphix-masking/delphix-masking-engine-user-guide/understand-and-manag...
Section "Enabling and Disabling Database Constraints"

Regards,

Mouhssine
(Edited)
Photo of Viswas Patnala

Viswas Patnala

  • 492 Points 250 badge 2x thumb
Thanks Renee! Today, we are manually disabling constraints(DB= ORACLE) before we kick-start our masking job and enabling them after successful execution in current version. Let's see if this has been taken care in GUI in the latest DE version. The delphix_db creation script we used doesn't contain sql's to disable/enable constraints. db creation script should be modified accordingly by delphix support if that is still a concern to fix constraint permission.
Photo of Gianpiero Piccolo

Gianpiero Piccolo

  • 1,314 Points 1k badge 2x thumb
If DB is Oracle and masking job is "in place", I suggest you to use "ROWID" as Logical Key. In fact if you leave Logical Key blank, dropping unique index on primary key makes the where clause a full table scan for every update.
Regards.
Gianpiero
Photo of santosh kumar

santosh kumar

  • 350 Points 250 badge 2x thumb
Is ROWID option works for 5.1.4.0 version? Please let me know if it requires upgrade to any other version of delphix?