• Ian C0ckcroft (8/2/2012)


    Thanks opc,

    that is the article I used to dev with and then I tried all different options.

    i ORIGINALLY USED

    SELECT *

    FROM __InstanceCreationEvent WITHIN 1800

    WHERE TargetInstance ISA 'CIM_DataFile'

    AND TargetInstance.Drive = 'T:'

    AND TargetInstance.Path = '\\Business Intelligence\\SAP Stock and Distribution File Dump\\'

    AND TargetInstance.FileName LIKE '%Trigger%'

    AND TargetInstance.Extension = 'txt'

    BUT GOT AN ERROR

    [WMI Event Watcher Task] Error: An error occurred with the following error message: "Invalid parameter ".

    any ideas?

    Hmm, that looks good to me. Here is the exact WMI used in the article and it has the same structure as what you have shown.

    SELECT *

    FROM __InstanceCreationEvent WITHIN 5

    WHERE TargetInstance ISA 'CIM_DataFile'

    AND TargetInstance.Drive = 'C:'

    AND TargetInstance.Path = '\\@\\ExcelDrop\\'

    AND TargetInstance.FileName LIKE 'BusinessData%'

    AND TargetInstance.Extension = 'xlsx'

    Which OS and which version of SSIS are you using? I think the WMI used in my article will work on any version of SSIS and any OS equal to or newer than XP but it was only tested in SSIS 2012 on Windows 7.

    I vaguely remember running into the Invalid Parameter error when developing the package and it was related to the variable mapping. Double-check the variable value is properly mapped into the WMI Task property.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato