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 123»»»

File watcher task question Expand / Collapse
Author
Message
Posted Wednesday, April 30, 2008 1:54 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, April 24, 2013 2:28 PM
Points: 261, Visits: 1,492
Installed File watcher task, then created a new SSIS package by adding the file watcher task in the control flow, below are my setting's inside the file watcher task editor:
2. Options
Filter - *.*
Find Existing Files - True
Timeout warning - False
3. Path
Path input type: Direct imput
Path - \\server1\Sourcefolder
Include subdirectories - False
Actually my understanding about this task is:
This file watcher task will constantly check for the file and then will execute the SSIS package.
If my understanding is correct, then where do we specify the name of the SSIS package?? And also do we need this SSIS package which has the File watcher task to run every 5 minutes or so, so that it can keep checking for the file existence.
Please help, thanks!!
Post #493253
Posted Thursday, May 01, 2008 7:21 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, April 24, 2013 2:28 PM
Points: 261, Visits: 1,492
I linked up the File watcher task and the Exec package task(Filesystem - with the desired package that should execute when true).
Do I need to schedule this package1 which has FWT and EPT to run continuously so that when it finds the file in the source folder, the package1 will execute??
If there is no file in the folder, the package will keep running(alomost like in hung mode) and only when the file is present then the package will complete execution, and once it completes execution how does it start executing again?
Can we do something like this:
1. Schedule the package to run say every 5 minutes
2. Once the file is present the desired package will execute which is linked to the file watcher task, if not the desired package will not run and the package1 should stop.
Thanks much!!
Post #493548
Posted Friday, May 02, 2008 3:39 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, April 11, 2013 3:38 AM
Points: 58, Visits: 328
You can set the option "Timeout" to a value, say 2. The FileWatcher will look for 2 Minutes for the file. If it finds the file, the control flow will go to the next task in your dtsx. Set the Option "Timeout warning" True). You can check the length of the filename you get back in the output variable (len filename == 0) and use this in in the precedence constraint editor.

Depending on your needs it's possible to put all your task in one package. Just set the FileWatcher in a loop (and delete the value of your output variable before) and the other tasks, too.
Post #494101
Posted Friday, May 02, 2008 2:19 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, April 24, 2013 2:28 PM
Points: 261, Visits: 1,492
Thanks for your response, Is it safe to use File watcher task, as I heard that it can cause memory leaks!
I set the option of timeout value to 2 minutes and also Timeout warning to True.
When tried to execute from BIDS, it worked like you said, it stopped execution after 2 minutes if there is no file and if a file was present in the folder the SSIS package executed successfully.
But when I scheduled the SSIS package as a JOB (type:file system), it runs and takes the source file and loads the data into the table, but says the job failed with the following Message:
The job failed. The Job was invoked by Schedule 1 (Step1). The last step to run was step 1 (Step1).

How do I do this??
You can check the length of the filename you get back in the output variable (len filename == 0) and use this in in the precedence constraint editor.
Thanks!!
Post #494547
Posted Friday, May 02, 2008 6:41 PM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, April 17, 2013 10:57 PM
Points: 1,491, Visits: 3,008
I don't know if FileWatcher itself has a memory leak bug, but apparently SSIS does when running infinite loops. See the comments in Jamie Thomson's blog: http://blogs.conchango.com/jamiethomson/archive/2006/10/18/SSIS_3A00_-Random-information-for-beginners.aspx
Post #494592
Posted Monday, May 05, 2008 12:45 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, April 11, 2013 3:38 AM
Points: 58, Visits: 328
a) try to run the job with "Timeout warning" False
b) doubleclick the precedence constraint (the green arrow)
choose Expression
in the field Expression set len(@filename == 0)

@filename is the user-variable set by filewatcher (see output-variable)
Post #494796
Posted Thursday, August 07, 2008 2:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 10, 2009 6:41 AM
Points: 2, Visits: 12
Hi
I've successfully implemented the File watcher task and the rest of the package executes fine. The problem is that it only ever picks up the first file in the folder, i.e. only one file is picked up every time the task starts. How do I get this task to continuously pick up files in the folder?
Post #548067
Posted Thursday, August 07, 2008 2:17 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, April 11, 2013 3:38 AM
Points: 58, Visits: 328
Hi,

you can use a for loop container or a for each loop container. put the filewatcher-task and your task to process the file on of these containers
Post #548072
Posted Thursday, August 07, 2008 3:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 10, 2009 6:41 AM
Points: 2, Visits: 12
Thank you very much! It all works like a charm now :)
Post #548100
Posted Wednesday, August 20, 2008 3:44 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, August 05, 2010 11:54 AM
Points: 222, Visits: 676
Where did you all installed File Watcher Task From ? IS this is a custom task?

Is this similar to WMI task in SSIS ?

Thanks,
VG

Post #556135
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse