Page 1 of 1

Approach?

Posted: Thu May 31, 2007 9:26 am
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.

Re: Approach?

Posted: Thu May 31, 2007 10:25 am
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.

Posted: Thu May 31, 2007 1:51 pm
by sheema
Other than calling Stored procedures,is there any other approach.

Thanks!

Posted: Thu May 31, 2007 3:27 pm
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.