Approach?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajkraj
Premium Member
Premium Member
Posts: 98
Joined: Wed Jun 15, 2005 1:41 pm

Approach?

Post by rajkraj »

We have scripts that disable & enable constraints, dropping and recreating the indexs, trucating the tables etc... before a particular job is running.

Now we want to replace entire scripts in the job sequencer with out using these scripts. Is it the right apporach or not?

Callling a script is the better way or implimenting this stuff in Ds? Which one is the better approach.
Raghumreddy
Participant
Posts: 24
Joined: Fri Aug 26, 2005 3:52 pm
Contact:

Re: Approach?

Post by Raghumreddy »

Hi Raj,
As i unserstand your process you are running DB scripts . You can change them to Stored procs and call from datastage if you want.
I have seen some clients do that insted of calling them seperately. But the error capturing is little more complicated than we expect. So talk to your DBA and see how can you change that scripts to Stored Procs.

Secod method is Call the scripts from the sequencer before your job in that sequencer.

HTH,
thanks
Raghu Mule
rajkraj wrote:We have scripts that disable & enable constraints, dropping and recreating the indexs, trucating the tables etc... before a particular job is running.

Now we want to replace entire scripts in the job sequencer with out using these scripts. Is it the right apporach or not?

Callling a script is the better way or implimenting this stuff in Ds? Which one is the better approach.
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

Other than calling Stored procedures,is there any other approach.

Thanks!
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

You may be able to use the before and after SQL tabs in a Dynamic Relational stage. Create a simple job that is a transform stage liked to a DRS stage. In the transform stage, add a stage variable and set the constraint on the output link to @FALSE. In the DRS stage, you will need some table information, but because of the @FALSE constraint, no row level operations will be performed.

Hopefully, only your before or after SQL will be executed. If so, this job is easily included in a sequence.
Post Reply