All Forums Database
23 Jun 2008
Batch execution of stored procedures

Hi,I need to execute the stored procedures is batch.I am having 40 stored procedures and I need to execute all these in single batch i.e all 40 gets created in one execution.If someone knows please let me know.Thanks,

Adeel Chaudhry 773 posts Joined 04/08
23 Jun 2008

Hello,All you have to do is it place all the definitions of all the SPs in seperate files e.g. sp1.spl, sp2.spl,..., sp40.spl. Write a BTEQ script as follows:.LOGON ...;DATABASE ...;.COMPILE FILE = sp1.spl;.COMPILE FILE = sp2.spl;....COMPILE FILE = sp40.spl;.LOGOFF;Place all these files in 1 folder and execute the BTEQ script.HTH.Regards,Adeel

-- If you are stuck at something .... consider it an opportunity to think anew.

23 Jun 2008

Thanks it works...

You must sign in to leave a comment.