All Forums Database
N_Raghu 34 posts Joined 12/13
10 Jul 2014
Executing several Macros in a Macro

Is there a difference between executing several macros in one macro instead of executing them individually?
When I merge them into one macro I get timeout errors predefined by DBAs where as they execute fine when I execute them individually.
Is this because teradata wont commit the transaction until all the macros are exectued? How can I get around this one as I wanted to do this in one step?

-Raghu
dnoeth 4628 posts Joined 11/04
11 Jul 2014

Hi Raghu,
all SQL within a macro (including nested macros) is treated as a Multi Statement Request, i.e. a single transaction.
If you don't need everything in a single transaction you should execute them seperatly. Why do you want to it in a single call?

Dieter

N_Raghu 34 posts Joined 12/13
11 Jul 2014

Thanks for your response Dieter..That makes sense
I thought it would be more clean scheduling wise...so that I can add or remove macros from 1 Master Macro as I want with no work on scheduler job... Now I have to create 5 different jobs executing 5 macros which takes same input parameters...
Which I think is fine but I thought we can commit the transaction using some explicit command while executing master macro. Now that after little bit of thinking I understand that what I am asking would directly violate the core purpose of a macro.....  :) 1 macro is 1 transaction....

-Raghu

krishaneesh 140 posts Joined 04/13
14 Jul 2014

why not use a wrapper shell script and run a cron(scehdule) for this shell which will contain all the macros?

N_Raghu 34 posts Joined 12/13
14 Jul 2014

Yes..I will use Powershell script and will schedule in windows scheduler. We only have a windows server to schedule jobs. 

-Raghu

You must sign in to leave a comment.