check for running packages

  • Hi guys, this a two-pronged question.

    I have an SSIS package that needs to run 24/7 as it uses Kosans File Watcher to listen for new files into a directory. When the files are processed the package returns to wait mode. The file location is specified in a config file and differs between dev, test and production. Our packages are deployed using file location and xml config file rather than database storage and/or environment variables.

    Data services have set this up as an on-demand (i.e. non scheduled) SQL Agent job to call the package.

    HOWEVER...

    They have not set the agent job with the /CONFIGFILE switch to change the config file location BUT... the files are being correctly processed.

    So... I think there is another copy of the package already running which was started from dtsexecutil or a command line WITH the /CONFIGFILE . One instance is running but not finding anything because it is looking at the wrong directory and the other one is running outside the control environment and is doing all the work.

    I know that if the package is started from SQL agent or from xp_cmdshell you can see it in dtslog90 but does anyone know how to detect it if started from outside the SQL environment.

    Ultimately I want to do 2 things:

    1) the SQL server agent job should check for any running instance of the package and only start it if it is not started

    2) the SQL server agent job should relinquish control of the package (i.e. the job ends). In other words the Agent is responsible for starting the package rather than running the package.

    If anyone can help I would be very grateful

    Obiron

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply