Scheduled Tasks

Hello All I am new at using Toad for Data Analysts and I have create a script that imports data into my Oracle database from an excel file. It works when I run it manually. I attempted to schedule it through the job manager. The program does create a scheduled task for me. When I run the task it says it runs successfully however, the data does not get imported into the database. I don’t see any errors and I am not sure if I am missing something or what the problem would be. Does anyone have any suggestions?

I suggest doing the following:

  1. Using the Script Settings turn the logging level to verbose. We need to get details of what is happening when running from the scheduler.
  2. Then set up the exception handler to send you an email when there is an error. By default this is turned off. Fill in the email information and choose to attach the log file.
  3. Add sending yourself an email when the script successfully completes. Add the log file to the email.

If the log file doesn’t make the issue obvious send me a copy of the log and I will take a look at it.

Debbie

It appears that I am having a connection problem. Here is what the log file says:

– 2/2/2010 1:55:05 PM: test connection.log: Build started-- 2/2/2010 1:55:08 PM: test connection.log: Warning: No Exception Handler. To send an Email when there is an error, change the value of Email on Error to true and enter email values.-- 2/2/2010 1:55:08 PM: test connection.log: Build Completed-- 2/2/2010 1:55:08 PM: test connection.log: Connecting to CA (VIGILE), VIGILE-- 2/2/2010 1:55:10 PM: test connection.log: Connection failed.
– 2/2/2010 1:55:10 PM: test connection.log: Done

I have selected the “save password” and “connect on startup” options but this did not resolve the problem.

Any ideas?

Try the following:

  1. Create a new connection to the database you want. Choose Save Password and connect.
  2. Open up your Automation script and double click on the new connection that is connected.
  3. Test automation.
  4. Shut down TDA.
  5. Restart TDA but do not connect. Open automation script and hit test.

This should use the new connection and confirm it can connect on it’s own, using that new definition.

Debbie

Debbie,
I did what you requested and it imported the data successfully. However when I run the job from the scheduled tasks, it fails with the same error.

Turn logging to verbose. It should give you a little more info. Let’s see if we can get pointed in the right direction as to why it is failing.

Debbie

Debbie,
okay dumb question, how do I do that?

Double click on the Script Settings activity in your automation script. At the bottom there is a logging level. Basic is the default. Change to Verbose.

Debbie,
Log file looks the same…

Mnnn… I get more info on my end.

Let me ask some other questions. Are you testing from the Job Manager from within TDA? If so go to the windows scheduler and run the task from there. Also double click on the task and send me back the run and start in command lines. While you are there reset your password and run again from there. What is the status and result column say?

Debbie,
I tested the schedule job a couple of different ways. First I tried running it through the windows scheduler and I tried running it through the Job Manager within TDA. Here is what the logs say:
– 2/3/2010 10:14:11 AM: Dental_report.log: Build started
– 2/3/2010 10:14:16 AM: Dental_report.log: Warning: No Exception Handler. To send an Email when there is an error, change the value of Email on Error to true and enter email values.
– 2/3/2010 10:14:16 AM: Dental_report.log: Build Completed
– 2/3/2010 10:14:16 AM: Dental_report.log: Done

Here is the run: “C:\Program Files\Quest Software\Toad for Data Analysts 2.5\Toad.exe” -batch=true “C:\scripts\dba\medpros\import scripts\Dental_report.tas”

Here is the Start in: “C:\Program Files\Quest Software\Toad for Data Analysts 2.5”

Status says it ran successfully…

Is this a different script than the first one? There is no attempt to connect in this log.

Can you execute the run command successfully? Try executing the command below. You should see the Toad icon appear in the right corner of you pc while it is running.
“C:\Program Files\Quest Software\Toad for Data Analysts 2.5\Toad.exe” -batch=true “C:\scripts\dba\medpros\import scripts\Dental_report.tas”

After you have done this can you send me your complete automation script, dependant files, and log file? You can email to dpeabody@quest.com.

Debbie

Debbie,
I did all that you asked and still no luck. I sent you the scripts you requested…

-Eric

Okay, I figured it out… What I did was log in into the OS with the account I am going to run the job under. I opened TA and created the database connection and of course saved it. I ran the job through the OS task scheduler and it ran successfully. I know Gita that you told me to do this, however what I was over looking was the Database user name did not match what was in the script and what was in TA for this OS user. Thanks for all your helps guys…