Re: Handling Zero Byte file in SQL Server DTS Package



Hello KhanAmeer,


OK so I would be looking to implement a solution very similar to this

Skip the execution of an individual Task
(http://www.sqldts.com/214.aspx)





--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

Hi Mitchell,

Thanks for your response. I guess I was not able to clearly explain my
problem ... I ll try to do it once again:

I have a DTS Package which has 4 steps.

Step 1: Truncates the tables
Step 2: Loads Data from DAT File to invoice table
Step 3: Loads Data from DAT File to order table
Step 4: Loads Data from DAT File to sales table
Now I have scheduled this as a Job and my job fails if I receive
"Zero" byte DAT file in any of the Step (2 - 4).

What I need is suppose at Step 2 ... I receive a "Zero" byte DAT file
... I want it to skip Step 2 and proceed with Step 3.

I tried options like:

option 1:
if it is Zero byte I am failing my package (DTSTaskExecResult_Failure)
and
on Failure I am making it to flow to Step 3
Result: Package fails but does not move to step 3

Option 2:
If Zero byte skip that step and move to next step. The package does
not
throw error but it stop their itself.
Hope this explains you the scenario. What I need is how can jump that
step and move to next step if it is a zero byte file?

Thanks
Ameer
"Allan Mitchell" wrote:

Hello KhanAmeer,

Why do you want to error out? I personally would handle it and turn
on or off the following piece of workflow.

Did you get your code from here

http://www.sqldts.com/292.aspx

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com
|
http://www.konesans.com
I am checking the size of DAT file using script task and if it is
Zero I am returning that step as Failure
"DTSTaskExecResult_Failure". On Failure it should proceed to next
step and skip the present step.

But this is not working and the package is getting error out. Can
anyone pls guide how can we handle this.



.



Relevant Pages

  • Re: Handling Zero Byte file in SQL Server DTS Package
    ... I have a DTS Package which has 4 steps. ... Loads Data from DAT File to invoice table ... Now I have scheduled this as a Job and my job fails if I receive "Zero" byte ... I am returning that step as Failure "DTSTaskExecResult_Failure". ...
    (microsoft.public.sqlserver.dts)
  • Re: Redundant punctuation for an American biblatex style
    ... Package: ... Missing number, treated as zero. ... look up `weird error' in the index to The TeXbook.) ...
    (comp.text.tex)
  • FreeBSD 8.0 Asus P5N64 WS Professional ACPI error
    ... CreateDWordField (Arg0, Zero, REVS) ... Store, Local0) ... Name (PRWP, Package (0x02) ...
    (freebsd-current)
  • Re: Import multiple mdb files to SQL Server issue: Please Help...
    ... "Allan Mitchell" wrote: ... Doing the loop inside the loop is fine but will involve a lot of coding if ... DTSStep_DTSActiveScriptTask_3 to take the next mdb file then do the ... DTSStep_DTSActiveScriptTask_3 is not the same in your package. ...
    (microsoft.public.sqlserver.dts)
  • Re: remotely call a DTS
    ... Allan Mitchell wrote: ... Denied on something inside the package. ... This worked when I was logged into the server and ran it from my ... but the DTS blows up. ...
    (microsoft.public.sqlserver.dts)