We receive multiple times a day from our customer services team master files for various manufacturers. In any event, here is the problem I am attempting to address: I am using VS2008 and SQL Server 2008 so perhaps there is a different approach I would need to use? Secondly, the C# script you have provided here doesn't work in my environment - the Dts namespace is not recognised. Am I to assume that the file task will automatically recognise the file name that WMI has found and rename appropriately? However, the next step you have done is moving the file to a processing directory in which you use a file system task that references your User::DropFile variable which contains the YYYYMMDD. I'm a bit confused about a couple of things in this article.įirstly, you've defined a FileName variable of which is implying that a file can arrive with a datestamped format and indeed your WQL query will pick up the file given you are using a prefix/extension with a like operator. If set correctly on the sql server upon installation, then it can read files anywhere on the server easily.Ĭan you please clarify? What are you saying would be running under "NT\Authority", the SSIS package or part of the WMI process, or both? My guess is that it would be running under NT\Autority. If a file doesn't get dropped for a couple days, what is the impact to the server to having a SQL agent job running for several days?ġ. Will the restarts hang when the SSIS package is sitting there? Do you have to manually abort the SQL Agent Job?ģ. NET Windows services have events you can handle in your code that allow you to gracefully stop your file watcher. What is the impact to your SQL server if you have a long-running SSIS package (inside a SQL agent job, presumably) like in your example and you need to either restart the machine or the SQL Agent service?. What kind of Windows Server security permissions does the identity running the SSIS package need in order to execute the WMI query? In a real world environment, I'd assume the file would be dropped to a separate server (maybe a network filer) which is where the WMI connection would need to be pointed, and my SSIS identity is going to be running with the absolute least privileges needed.Ģ. The FileSystemWatcher buffer is fine for normal operations.1. Filesystems are a bitch, but now the fault of fsw. The 5% that didn't work was because the file was still being written (and was therefore locked) when the IO.Move occurred. Then I created 100,000 random files, dropped them randomly in the watched folders, and watched as 95% of them got moved to their intended destinations. Given a watched folder, and a file called *.txt, move it to another folder That's what freaks people out - when you create a file and multiple events get fired.įor the hell of it a couple of days ago I implemented a bunch of FileSystemWatchers. It hooks into a lower level thingy, and events get fired several times for what appears to be a dingle event to the outside world. The problem everyone experiences is that they think it's a FIleSystemWatcher. I have system running 24*7 which has successfully FileSystemWatched well over a million files over the last few years.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |