Directory Watcher Path
Oct 26, 2007
I'm trying to use a WMI Event Watcher Task as a directory watcher. I know it is available from Konesans at http://www.sqlis.com/23.aspx but they don't feel obliged to make this open source yet. I definitely appreciate the contribution of the binary to the community.
I'm very interested in understanding how the event handler gets the path of the file that caused the event. I added a Script Task to the Event Handler tab and it fires as expected when I create a new file in the directory. I can retrieve the value of the SourceName which is just the name of my Event Watcher Task. I can't find documentation on an object model that is exposed through SSIS that would reveal the name or path of the file, although it's clear this information is available in direct WMI queries from code or a WSH script.
My only guess is that you need to do a workaround in Script (or a custom module) by querying the directory for the most recent file (or list of files compared to a list of processed files) rather than a synchronous feed of the path directly into the SSIS event handler. Ideally, you'd like to get one event per new file created, although this might not be deterministic with the way the OS fires these events and SSIS responds to them. So at the end of the day, querying the directory for recently created files may be the only reliable way of getting the (list of) new files.
I know that this can take hours and hours to figure out since you really need to understand how WMI interacts with SSIS but I would be indebted if you can shed some light on this for me and the community.
Thanks,
Norm
View 3 Replies
ADVERTISEMENT
Sep 21, 2006
Hello all, i have a little problem...
...Is there any method for getting the path of the SYSTEM32 directory from a stored procedure?
I need it for register an assembly that is in this directory or the server.
Thanks.
Alejandro F.
View 6 Replies
View Related
Dec 12, 2007
I have a sql compact table that stores a series of directory paths like so:
C:F1BackupadministratorCDatakit.zip__--1-07272007124351.F1O
C:F1BackupadministratorCDataDeploySMD_FSWsetup.exe__--1-11292007122443.F1O
C:F1BackupadministratorCDataDeploySMD_FSWSMD_FSW.application__--1-11292007122443.F1O
Is there a way in sql that I can get just the directory name so the results would look like this:
C:F1BackupadministratorCData
C:F1BackupadministratorCDataDeploy
C:F1BackupadministratorCDataDeploy
Also, is there a way to just get the file names so the results would look like this:
kit.zip__--1-07272007124351.F1O
setup.exe__--1-11292007122443.F1O
SMD_FSW.application__--1-11292007122443.F1O
I've seen some examples with Sql server but they use the reverse function which is not available in sql compact.
Any ideas would be greatly appreciated.
View 1 Replies
View Related
Jul 22, 2014
I am trying to create hierarchyID for a directory file path.
View 1 Replies
View Related
Feb 19, 2007
Hi,
I am adding a file to a filegroup on a remote system, and i don't know the direcotry structure of that machine, how can i provide the path for FILENAME param. :eek:
ALTER DATABASE TESTDB ADD FILE (NAME = N'TESTFILE', FILENAME = N'physicalfilepath.ndf') TO FILEGROUP TESTFILEGROUP
Warm Regards,
Mushq
View 1 Replies
View Related
Dec 3, 2013
I need a SQL query which lists out directory path from which the database has been restored recently ( i.e backup path ).....
View 2 Replies
View Related
Jul 22, 2013
Overall goal: Write a Bulk Insert statement using the UNC path of a filetable directory.
Issue: When using the UNC path of the filetable directory in a Bulk Insert Statement, receiving "Operating system error code 50(The request is not supported.)" Looking for confirmation as to whether this is truly not supported.
Environment: SQL Server 2012 Standard. Windows Server 2008 R2 Standard
View 9 Replies
View Related
Sep 27, 2015
There was a 2008 SSRS service running on server "abc".
I have a .Net UI that uses the wsdl at [URL] ....
They deployed SSRS 2012 service on a new server "xyz".
DNS points abc to xyz. Nslookup looks right shows both xyz and abc alias to the same IP.
when I try to go to [URL] .... it redirects to xyz as expected for the host name but the HTTP GET /ReportServer is appended with GET /Reports/ReportServer which doesn't exist and I get an 404 error.
I have no admin rights to see anything and I have no idea if it was an inplace upgrade or a new server. I assume it's new since the actual server name changed in nslookup. Why would it append the default virtual directory when it makes the hop to server "xyz"?
View 0 Replies
View Related
Sep 25, 2014
We have a hierarchical table of some 2-3k of rows that grows slowly at only 3-5 rows a month, and is never likely to be above 5k, holding file/directory names with an IdParent int value pointing at that items immediate parent or NULL if root
Below is a sample:
Id Name IdParent
1 C: NULL
2 D: NULL
3 ProgramFiles 1
4 DataFiles 2
5 Excel.EXE 3
6 MyDataList.CSV 4
iterative code required to achieve the result I am looking for is best handled in the Application layer, but in this case the design brief is that we must get our results back as a View. Speed of execution and code clarity are secondary 'icing on the cake' issues.
I have tried recursive CTE's and XML FOR solutions but without success, and while I feel the latter is probably the best all rounder the searches I have made and the examples I have read do not seem to solve this particular issue.
Even to find the starting point of the search tree (i.e. the .EXE and the .CSV items) was difficult because the final slash is optional in some of the rows (.e. row 4)
The end result of my view on the above data should return:
Id FilePath
5 C:ProgramFilesExcel.EXE
6 D:DataFilesMyDataList.CSV (note the adding of the missing delimiter between DataFiles and MyDataList)
View 5 Replies
View Related
Jul 23, 2007
In my SQL Server, I see the below message in the Application Event Viewer
"18265 :
Log backed up: Database: HSD, creation date(time): 2007/01/06(05:05:05), first LSN: 1439:495055:1, last LSN: 1439:496675:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'D:MSSQLBACKUPHSDHSD_tlog_200707141300.TRN'})."
When I save the application event viewer and open it in another server, I do not see the above message, instead I get the following message:
" Can't find or load message DLL. Message DLL must be in path or in current directory."
Any thoughts to overcome this problem is appreciated.
Thanks
Santhosh
View 3 Replies
View Related
Apr 6, 2007
Has anyone used this successfully from an OLEDB source component, or even from the Execute SQL Task? I've seen some examples of using a script component, but nothing that uses it through a connection manager.
View 6 Replies
View Related
Apr 16, 2008
When trying to install Business Contact Manager (BCM) for Outlook 2007, the setup failed and I was refered to a log file in my Local Settings/Temp folder. The log actually says that Business Contact Manager was installed sucessfully! BCM is supposed to install SQL Express 2005 as an instance or as instance if SQL Express is already installed. There is an MSSMLBIZ instance in Services..
Who can I send the Log File to for analysis and the fix feedback?
When I first went into Computer Management and clicked on Services and Applications in the left panel, the error message appeared "Snap-in failed to intialize. Name: SQL Server Configuration Manager CLSID:{CA9F8727-31DF-41D2-975C-887D84903967} This message diappeared when I clicked on Services and Applications again. Under Services, there are 3 SQL services - one is an application that was uninstalled 3-4 weeks ago and I disabled this service. The other 2 are: SQL Server (MSSMLBIZ) and the other one is SQL Server (SQLEXPRESS) When I tried to start either of the last 2, the message appeared: Services "Could not start the SQL Server (MSSMLBIZ) service on Local Computer. Error 3: The system cannot find the path specified. Under Program Files/Microsoft SQL Server/MSSGL.1 folder is mostly empty. So, it seems like the Path in the Registry is not valid and that nothing is being installed in the MSSQL.1 folder. If so, how do I fix this?
How do I get the BCM SQL instance to install and run properly? what do the messages in Services mean and how do I resolve these.
Thank you!
Gary
View 3 Replies
View Related
Oct 4, 2007
After updating TempDB path to a wrong path (without file name only folder name) the service is not starting. How can i sovle this and start the service
thanks
Leena
View 13 Replies
View Related
Sep 18, 2007
Hi folks
Has anyone come across a task to watch an ftp site ?, I know there is a file watcher task from Konesans but it won't do ftp still very useful
BS
View 5 Replies
View Related
Apr 30, 2008
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 - \server1Sourcefolder
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!!
View 9 Replies
View Related
Sep 24, 2007
In the file watcher task in the filter section does it look for exsiting file name which we have mentioned or is it possible to give first few letters of the file name like
pat*.txt
Please let me know
View 1 Replies
View Related
May 25, 2006
Where the earth is this task??? I am not be able to see it anywhere!!
Thanks for any input,
View 1 Replies
View Related
Feb 28, 2007
Hello,
I have to make a application using filesystemwatcher which watches the file on the remote server. If that file is changed then I have to fetch that file from ftp location to the server. I have made the SSIS job to fetch the file but not able to set a file system watcher on remote server that watches the file. If the file is changed then I need to insert a row in the SQL server database and then fetch the file.
I have made the application. the code is below:
private void Form1_Load(object sender, EventArgs e)
{
// Create a new FileSystemWatcher and set its properties
FileSystemWatcher watcher = new FileSystemWatcher();
watcher.Path = "C:\";
watcher.IncludeSubdirectories = true;
/* Watch for changes in LastAccess and LastWrite times, and the renaming of files or directories.*/
watcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.Attributes | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size;
//watcher.WaitForChanged(WatcherChangeTypes.All );
// Add event handlers.
watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.Created += new FileSystemEventHandler(OnCreated);
watcher.Deleted += new FileSystemEventHandler(OnChanged);
watcher.Renamed += new RenamedEventHandler(OnRenamed);
watcher.EnableRaisingEvents = true;
}
public static void OnChanged(object source, FileSystemEventArgs e)
{
MessageBox.Show(e.FullPath + e.ChangeType.ToString("G") + "" );
}
public static void OnCreated(object source, FileSystemEventArgs e)
{
MessageBox.Show(e.FullPath + e.ChangeType + "");
}
public static void OnRenamed(Object source, RenamedEventArgs e)
{
MessageBox.Show(e.OldFullPath + e.FullPath + "" + e.OldName);
}
Now how can I give the ftp details such as IP address, User name and password in the above code.
Regards,
Deepesh Verma
View 5 Replies
View Related
May 30, 2006
hello
i would like to know how i can retrieve the file path+name of a file detected by the WMI Event Watcher task, so that I can assign this to a variable for an Import task
thanks
View 8 Replies
View Related
Apr 6, 2007
I would like this task to watch for a particular text file in the particular folder.
here
Connection managers:
servename=\localhost
namespace=
ootcimv2
WMIQuerySourceTypeirectinput
WMIQuerySource:
SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE Targetinstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent= "Win32_Directory.Name="c:\\ImportData\\ est.txt""
Rest of the fields i leave as they are..
I get this error
[WMI Event Watcher Task] Error: Watching for the Wql query caused the following system exception: "Unparsable query.". Check the query for errors or WMI connection for access rights/permissions.
I am looking for test.txt on my local machine.
What do i need to do??
View 11 Replies
View Related
Jan 19, 2007
Hi,
I have implemented a WMI Event Watcher in my SSIS package which polls a directory at 5 second intervals for the presence of files.
I have noticed that at times this file watcher service doesn't seem to function. Yet if I stop and start the package it usually works again.
Everything is running locally, including the polled folder.
Has anyone experienced similiar issues, or may know the cause/fix of this problem?
Thanks.
View 3 Replies
View Related
Jul 10, 2007
I want to watch a directory 24 hours a day to launch SSIS packages as files arrive. There are several options I have found to accomplish this:
Use the WMI Event Watcher task in SSIS to launch the packages as files arrive. Leave the package with the WMI Event Watcher task running all day long everyday
Create a Windows service that uses WMI to detect file arrival and launch packages
Schedule SQL Server Agent to run the package when a WMI event is raised
What is the best practice? Are there better approaches that I have not listed?
View 15 Replies
View Related
May 30, 2006
Hi,
I have an SSIS Package to get the data from an Excel Source. For that I am using WMI Event Watcher to find when the file drops into a specific folder. It is working fine when I check any folders in the local machine.
We have a separate WebServer and Database Server for our application. The application is deployed in the Web server and the SSIS package is deployed in the Database server.
Since the files are dropped through application, it is dropped in the Webserver. I have mapped that drive in my Database Server and I am trying to link that folder in the SSIS package, but the event is not firing.
Please provide me some solution for this and revert for any clarifications.
Thanks & Regards,
Prakash Srinivasan
View 13 Replies
View Related
Apr 4, 2007
I am using this task as the first task in my control flow.I want to check if a particular file exists in the particular location.IF exisists run the package else no.
How do i configure this...please help..
View 1 Replies
View Related
Jan 29, 2007
Hello All
Just curious if there are any tutorials/help files/forums on using this and other Konesans control Flow and data flow task? most import the flow watcher task.
thanks
Karen
View 2 Replies
View Related
Nov 30, 2006
I am trying to watch for new files being created in a directory on a SQL server, using a WMI watcher. But I am getting a strange error in wbemess.log. The package runs, but does not detect files in the directory. There is no known anti virus software being run....
(Thu Nov 30 18:51:19 2006.799112375) : Unable to activate event filter with invalid class name 'HPQ_VT_STATUS_VIRUS_LIKE_ACTIVITY_IS_OCCURRING' (error 80041002). The filter is not active
(Thu Nov 30 18:51:19 2006.799112375) : Unable to activate event filter with invalid class name 'HPQ_VT_STATUS_VIRUS_LIKE_ACTIVITY_HAS_STOPPED' (error 80041002). The filter is not active
The expression I am using is correct, because I get a parsing error and the package fails to run if the correct number of backslashes are not in the right place. Below are two that I have tried.SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Drive='C:' AND TargetInstance.Path='\\work\\ssis\'
SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent= "Win32_Directory.Name="c:\\work\\ssis""
Anyone seen this before or have any useful suggestions? The server is an HP Proliant, could that be linked to the HPQ_?
View 2 Replies
View Related
Nov 27, 2006
Hi,
I am using a WMI Event Watcher task to watch for files dropped into a directory over a network drive.
It seems to work fine when it is pointed to a physical drive name, but not when I use a machine name.
I.e.
This works -
SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent= "Win32_Directory.Name="C:\\temp\\folder1\\folder2\folder3""
This fails -
SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent= "Win32_Directory.Name=\\\\machineName\\folder1\\folder2\\folder3"
The failing code does not throw any errors (i.e. SSIS thinks the WQL syntax is correct), but it doesn't pick up any dropped files.
Am I doing something incorrect with the syntax, or must I use a physically mapped drive letter?
Thanks
H
View 11 Replies
View Related
Jan 28, 2007
Hi All,
I have a problem in which I want the run an SSIS based on a file being dropped in a directory. I've tried the WMI event watcher as well as the File Task Watcher component. The problem that I'm seeing is that if the process is currently processing in the pipeline while another file dropped, the newly dropped file doesn't get picked up. Is there a way to create a FileWatcher Task in SSIS which will spawn a SSIS job and return immediately for watching files?
View 3 Replies
View Related
May 18, 2007
I used file system watcher to read excel on my pc it worked fine, but when I tried to read the excel from SharePoint it did't work. The FileWatcher box showing the yellow color for long time that I had to stop the ssis.
So my question what is the cause of this. Do i need to set something or am i missing something? Please help.
View 7 Replies
View Related
May 22, 2008
My SSIS control flow includes a standard "textbook" WMI Event Watcher Task that monitors a folder for incoming files. Generally it works fine, but now I regularly see the error message:
"Watching for the Wql Query caused the following system exception: "Quota Violation." Check the query for errors or WMI connection for access rights/permissions"
I do not see any indication of trouble in the event logs. The SSIS log simply states that it failed.
Is there any magic about WMI Event Watcher?
When I restart, it runs fine for hours.
SQL05 is 9.0.3054 on W2003 with all microsoft updates applied. It is basically a bare machine with SQL Server, SSIS running and a service that kicks in occasionally.
Thanks for reading!
View 3 Replies
View Related
Jul 2, 2015
I know a WMI event watcher can be used to watch forĀ a new file being added to a folder. However, I need to check for new folders being added to an existing folder. I haven't been able to find a post on doing this. Is there a way in WQL to check for a new folder being added instead of a new file? I've used SQL for years, but am new to SSIS.
View 2 Replies
View Related
Jul 7, 2006
Hey there
Ive built an SSIS package which generates a file from a legacy system and then downloads the file into a designated folder on the server. I need the file watcher task to wait for a the file to completely finish loading before it says it is complete. Currently, as soon as the file is created, the WMI step finishes.
Any help would be greatly appreciated!
Kind Regards
David
View 4 Replies
View Related
Apr 8, 2008
I have been testing with the WMI Event Watcher Task, so that I can identify a change to a file.
The WQL is thus:
SELECT * FROM __InstanceModificationEvent within 30
WHERE targetinstance isa 'CIM_DataFile'
AND targetinstance.name = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\AdventureWorks.bak'
This polls every 30 secs and in the SSIS Event (ActionAtEvent in the WMI Task is set to fire the SSIS Event) I have a simple script task that runs a message box).
My understanding is that the event polls every 30 s and if there is a change on the AdventureWorks.bak file then the event is triggered and the script task will run producing the message.
However, when I run the package the message is occurring every 30s, meaning the event is continually firing even though there has been NO change to the AdventureWorks.bak file.
Am I correct in my understanding of how this should work and if so why is the event firing when it should not ?
View 2 Replies
View Related