SSIS Package Executing Twice?
Hello I have a piece of code in a batch file to set off an SSIS package. It looks like the following: dtexec /f "C:\Users\s813\Documents\Visual Studio 2008\Projects\Import_Valuation_RPTs\Import_Valuation_RPTs\Import_NL.dtsx" /CONNECTION "Import_NL_RPTs";H:\Retail\Karen\ul_%2_cloas\NL\results\RUN_%1\*.rpt I pass two parameters to the batch file in the command line. The first %1 could be 01, 02, 19, 20, 23 or 24 and the second is 12q3. When I pass in 19, 20, 23 or 24 as the parameter for %1 the package works fine, however when I pass in 01 or 02 as the parameter the package executes twice?? I'm presuming this has something to do with the 0 being in front of the number but I'm not sure why? I can't change the location to not have the 0 so I'd like to be able to fix this. I'm new to SQL server so apologies if this is obvious! Thanks for any help in advance!
October 24th, 2012 5:54am

To figure out what might be happening, try the following. Edit your batch file to what is below. Then call your proc passing in the parameters you want to test. You can try running the new.cmd to see if it is running the SSIS package twice. echo off echo dtexec /f "C:\Users\s813\Documents\Visual Studio 2008\Projects\Import_Valuation_RPTs\Import_Valuation_RPTs\Import_NL.dtsx" /CONNECTION "Import_NL_RPTs";H:\Retail\Karen\ul_%2_cloas\NL\results\RUN_%1\*.rpt>new.cmd Russel Loski, MCT, MCITP Business Intelligence Developer and Database Developer 2008 Blog: http://www.bidn.com/blogs/RussLoski/ Twitter: @sqlmovers
Free Windows Admin Tool Kit Click here and download it now
October 24th, 2012 6:28am

Hi Russ I ran the above piece of code and my package executed once. This wasn't the only piece of code in my original batch file, I was also trying to make a log of the output so my full batch file is: set DATEST=%DATE:~0,2%_%DATE:~3,2%_%DATE:~6,4% set TIMEST=%TIME:~0,2%_%TIME:~3,2%_%TIME:~6,2% set DT=%DATEST%_%TIMEST: =0% call :Logit %1 %2 >>H:\Retail\Karen\ul_%2_cloas\Logs\Log_%1_NonLinked_%DT%.txt 2>&1 :Logit dtexec /f "C:\Users\s813\Documents\Visual Studio 2008\Projects\Import_Valuation_RPTs\Import_Valuation_RPTs\Import_NL.dtsx" /CONNECTION "Import_NL_RPTs";H:\Retail\Karen\ul_%2_cloas\NL\results\RUN_%1\*.rpt For some reason if the code is like this the package will execute twice when the second parameter begins with a 0. If I remove the code for the log and start the batch file from the dtexec command the package will execute once as it is supposed to. So I think it's something to do with my first piece of code above? Apologies I didn't think this was significant when I first posted my question! Thanks for any help in advance!
October 24th, 2012 7:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics