Toad World® Forums

Automation steps work on PC, not on Server

We use TfDA rel 2.5.1 from a Server. In almost all cases, this has been working reliably. However, there is one monthly TfDA automation task with four discrete steps that just does not work. Each step is a separate scheduled task. They are executed in series, with plenty of time between each task for the previous one to finish. These four tasks execute as expected when testing on my PC. However, on the Server, they stop working at Step 2 with the following error msg:

The process cannot access the file ‘XXXX’ because it is being used by another process.

Here’s a description of what happens in each step of this monthly task - just to reiterate, each step is scheduled separately; it runs fine from my PC; it bombs out at Step 2 with above msg:

  1. Previous month’s file is copied-and-renamed for archival purposes.
  2. Previous month’s file is deleted.
  3. Extract is done for the current month.
  4. Current month file is e-mailed out to recipients as an attachment.

It must have something to do with the (attempted) use of the File Activities (Copy File, Delete File) because the other scheduled TfDA jobs do not use these. Any insights would be very much appreciated. Many thanks in advance.

It’s hard to determine why there would still be a hold on a file when the previous Automation task is complete. Usually when another server is used for Automation it is a win server and the OS handles some things differently.

If the issues occurs frequently I would suggest changing your process instead of trying to debug it.

You could try creating reports that uniquely name the file with the report date. In this manner all reports could stay in the same directory and never need copying or deleting.

Another way around this is to put all actions into one automation script.

Or you could use one automation script to call the other automation scripts. I can’t remember if 2.5.1 has a ‘Run Automation Script’ activity or not. But even if it doesn’t you can use the ‘Run Activity’ and call the Automation script from the command line the same way that the scheduler does.

And my last suggestion is to upgrade to the latest version of TDA. These are side by side installs so you can do so without upsetting your current install. I would make copies of your scripts and not use the originals.


Thanks for the reply, Debbie. I’ll try rewriting the scripts so that the Date is appended to the file-name, after making sure this will be okay with the external vendor receiving this file. They originally asked for a specific file-name (that did not have the Date value appended).

I’ll post a message on the outcome once this is done.

Thanks, again.