How we can run the parallel hints SQL script in delphix via Postscript ( hook postscript file which have parallel hints SQL)

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Answered
How we can run the parallel hints SQL script in delphix via Postscript ( hook postscript file which have parallel hints SQL)

UPDATE /* +PARALLEL(TABLE_NAME,64) */ TABLE_NAME SET UPDATED_COL =UPDATE_COL where CONDITION ;
COMMIT;
If we run this with plsql then it will run by 64 thread but if we run the same via delphix then it will run in 1 thread , please let me know how we can run via 64 thread ?
Photo of Rajesh

Rajesh

  • 592 Points 500 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
Photo of fMarcin Przepiorowski

fMarcin Przepiorowski, Employee

  • 880 Points 500 badge 2x thumb
Official Response
Hello,

Tim advice is very important. You need to make sure there alter session statement is included in your pre/post script.

Unfortunately Masking Engine is removing a comments from SQL so as Oracle hints are enclosed by begin/end comment - there are removed as well.

You need to set parallel level on object and then Oracle CBO will execute this using a parallel mode, at the end you should reverse a change the value which was set on table before. As it executed in non parallel mode I assume it was set to non parallel.

You script should looks like this:

ALTER SESSION ENABLE PARALLEL DML;
ALTER TABLE TABLE_NAME  PARALLEL 64;
UPDATE  TABLE_NAME SET UPDATED_COL =UPDATE_COL where CONDITION ;
COMMIT;
ALTER TABLE TABLE_NAME  NOPARALLEL;


regards,
Marcin