Solved

Beginner DTS package question

Posted on 2004-09-14
11
335 Views
Last Modified: 2013-11-30
Hello, I'm building my first DTS package with workflows, etc.  

Process steps:

1)  connect to an ftp site, dump a file into a folder on the server
2)  send email task "file not there" kind of thing
3)  A transform data task between two connections - the 1st is the text file and the second is a table in a SQL Server database

I put an "on success" workflow from #1 to #3 and an "on failure" from #1 to #2.  My reasoning was that if the file was not there, #1 should fail and fire off the email.  To my surprise, when it ran I got: "1 task(s) failed during execution."  Oddly enough, #1 was successful and then #3 between the two visual connection objects failed (of course...  the file is not there).  

Could someone point out what I'm doing wrong?  
0
Comment
Question by:MrDeveloper
  • 5
  • 4
  • 2
11 Comments
 
LVL 9

Expert Comment

by:apirnia
ID: 12058458
What kind of error you get when you run the DTS
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12058504
Easy just connect task #3 to task #2 on failure.
disconnect the #1 on failure to #2 link.
and add annother step to delte the file after you are done transforming it.

Jay
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12058515
its not uncommon for ftp to dl a Zero Length file..

Ive had this happen a LOT when dealing with some types of ftp servers.

Jay
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:MrDeveloper
ID: 12058591
Hey Jay, thanks for the quick reply!  I can't seem to figure out how to connect the failure of the data transformation between the two connections to the send mail task.  

let me describe how it looks in the designer...  I have the icon representing my ftp task of course.  A green arrow (success) flows to the first connection icon, which is to a file.  Below it sits a second connection icon, representing the sql server table.  Between the two connections is a data transformation workflow task (an arrow).  

If I try to select the data transformation arrow and then the send mail task and connect them with a failure workflow, I get a msg, "Fewer than two items have been selected"

Currently I have a failure workflow arrow connecting the ftp task icon to the send mail task icon.

Does this help?  I'm probably missing something obvious.  Thanks so much
0
 

Author Comment

by:MrDeveloper
ID: 12058602
Hey apirnia, I get a failure on the copy data task (I believe that it is the transform data task arrow going from my text file connection icon to my sql server table connection icon
0
 
LVL 10

Accepted Solution

by:
Jay Toops earned 500 total points
ID: 12058648
select the connection from #1 to #2
 delete it

click to select task #3 not on the arrow
but on the last db connection definition
hold down the shift key then
clikc on #2
then while still holding shift down press the right mouse button and go to workflow
-> on failure
Jay


0
 
LVL 9

Expert Comment

by:apirnia
ID: 12058696
Are you trying to copy data from Text to SQL table??
If so this might be where you are getting your errors if your fields in your table are other than Varchar.

0
 

Author Comment

by:MrDeveloper
ID: 12059018
Hey apirnia, that step actually works perfectly.  In the event that the file exists on the ftp site, then everything works fine and it fires off a successfully email to me.  The part that I can't get working is when the file does not exist there, I want to branch off to a failure email event.

Thanks!
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12059226
did you try my steps  yet ??

JAY
0
 

Author Comment

by:MrDeveloper
ID: 12059463
Wow jltoops , worked perfectly!  Thanks so much...  So, in general I guess, on a transform data step that involve 2 steps, put success/failure events on the second connection.  Thanks so much
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12059473
NP ...
glad ur getting it..

Jay
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DTS Connection Failed 7 70
convert in derived column 7 30
T-SQL: Episode III - Revenge of The Dude 24 53
SSRS 2013 - Creating a summarized report 19 35
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question