Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unable to run my SSIS 2005 package using bat file... Expand / Collapse
Author
Message
Posted Tuesday, January 8, 2013 11:29 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 2, 2013 11:09 AM
Points: 97, Visits: 180
Hi all,

I had a simple batch file to run my ssis package. But i keep getting this error which i seriously dont uds why. I cross checks the name of my project and dtsx file name numerous time... This is the error:

Microsoft (R) SQL Server Execute Package Utility
Version 9.00.4035.00 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Started: 2:20:42 PM
Could not load package "\File System\TA_Report\TA" because of error 0x80070002.
Description: Unable to find the specified file.
Source: MsDtsSrvr
Started: 2:20:42 PM
Finished: 2:20:42 PM
Elapsed: 0.032 seconds

This is my bat file:

@echo off&SETLOCAL

rem set project && package name, ssis server IP
set ssis_project=TA_Report
set ssis_package=TA
set ssis_server=localhost

rem set command name and log path
set run_ssis_cmd=dtexec
set run_log_dir=D:\EW\TARpt\Logs

rem set parameter
set para=%1
if "%para%"=="" (
set para=Default
)

rem set up log file suffix
FOR /f "tokens=1-4 delims=/-. " %%G IN ('date /t') DO (call :s_fixdate %%G %%H %%I %%J)
call :s_date_end

if "%dd%" == "02" call :archive_end
del %run_log_dir%\%ssis_package%_log.txt

echo Continue process
echo .
echo start to run %ssis_project%\%ssis_package%...
%run_ssis_cmd% /DTS "\File System\%ssis_project%\%ssis_package%" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V /SET "\Package.Variables[User::Exec_Dt].Properties[Value];%para%"> %run_log_dir%\%ssis_package%_%log_suffix%.log

"C:\Program Files\7-Zip\7z.exe" a %run_log_dir%\%ssis_package%_%log_suffix%.log.zip %run_log_dir%\%ssis_package%_%log_suffix%.log
del %run_log_dir%\%ssis_package%_%log_suffix%.log
goto :eof

:s_fixdate
echo in s_fixdate
if "%1:~0,1%" GTR "9" shift
FOR /f "skip=1 tokens=2-4 delims=(-)" %%G IN ('echo.^|date') DO (
set %%G=%1&set %%H=%2&set %%I=%3)
goto :eof

:archive_end
echo in archive_end
echo Deleting old log files...
cd %run_log_dir%
echo del %run_log_dir%\archive\%ssis_package%_*.zip
del %run_log_dir%\archive\%ssis_package%_*.zip
echo Moving last month log file to archive...
echo move %run_log_dir%\%ssis_package%_*.zip archive
move %run_log_dir%\%ssis_package%_*.zip archive
echo Finish moving archive logs...
goto :eof

:s_date_end
echo in s_date_end
set yy=20%yy%

FOR /f "tokens=*" %%G IN ('time/t') DO set _time=%%G
SET _time=%_time:~0,2%%_time:~3,2%

set log_suffix=%yy:~-4%%mm%%dd%
rem echo %log_suffix%
goto :eof

ENDLOCAL

Whats wrong? Someone please help me. I read the other similar post and that guy problem is spaces problem...I dk if mine is the same but i tried renaming my files... still the same
Post #1404554
Posted Wednesday, January 9, 2013 12:02 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 11:26 AM
Points: 13,622, Visits: 10,514
Where is the package stored?



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1404563
Posted Wednesday, January 9, 2013 12:08 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 2, 2013 11:09 AM
Points: 97, Visits: 180
Koen Verbeeck (1/9/2013)
Where is the package stored?


Its stored in numerous folder due to requirement. May i know which should package should i identify? the one inside the project folder, with the file type of integration services package?
Post #1404566
Posted Wednesday, January 9, 2013 12:14 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 11:26 AM
Points: 13,622, Visits: 10,514
10e5x (1/9/2013)
Koen Verbeeck (1/9/2013)
Where is the package stored?


Its stored in numerous folder due to requirement. May i know which should package should i identify? the one inside the project folder, with the file type of integration services package?


How can one package be stored in multiple folders?
You are referencing the SSIS package store in your .bat file (since you use the /DTS switch for DTEXEC), which is a specific folder in your SQL Server installation directory.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1404568
Posted Wednesday, January 9, 2013 12:42 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 2, 2013 11:09 AM
Points: 97, Visits: 180
Hi i am sorry, its solved, error with my file path.. thanks for pointing that out
Post #1404571
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse