HI, I want to listen the creation of a new file in a remote folder from my SSIS package but it does not work.
Does the scope is missed?
Using either of the following approaches:
1)
By using xp_cmdshell I am doing the mapping to Y: drive
exec master..xp_cmdshell ' net use Y: \\myserver\L$ /user:myADaccount mypassword /PERSISTENT:YES '
In spite of no errors, the Y: drive is not really created in the server
2)By using the "Execute Process Task" with exe = CMD.exe and params as follows:
NET USE Y: \\myserver\L$ /user:myADaccount mypassword /PERSISTENT:YES
Here raises a DOS window with the prompt linked to my VS PRoject: C:\AdminSql\folder\folderIntegration Services Project1>
After the assignment the idea is run the second step:
Just call the WMI Event Watcher Task calling my SSIS variable. My understanding is WMI will not recognize a path out of the own caller for that reason I am trying to create a map drive...
My SSIS variable contains:
SELECT * FROM __InstanceCreationEvent WITHIN 10
WHERE TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name = 'Y:\\myfolder\\subfolder\\PromoTest.xls'