Groups | Blog | Home
all groups > sql server dts > june 2007 >

sql server dts : Handling Zero Byte file in SQL Server DTS Package



KhanAmeer
6/11/2007 3:34:01 AM
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
Allan Mitchell
6/11/2007 8:46:29 PM
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

[quoted text, click to view]

Allan Mitchell
6/13/2007 12:00:00 AM
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

[quoted text, click to view]

KhanAmeer
6/13/2007 12:36:00 AM
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

[quoted text, click to view]
AddThis Social Bookmark Button