cancel
Showing results for 
Search instead for 
Did you mean: 

Pre\post command syntax

Chris_Cosper
Level 3
I have been having problems with time-out errors on some new backup jobs with pre and post commands. This is the first time that we have had to use these.

Our backup server is trying to backup Oracle DB info on another server. We have a script for the pre-command that shuts down the DB services and a post command script that starts them back up after the backup.

These scripts (.bat files) run fine by themselves if run manually on the oracle server. One of the only things I can think of is that we are confused as how to set up the command line in the job properties under the job setup tab. Is the path in the command line relative to the target machine or to the backup server?

The command was "C:\backup\stopdb.bat"

The checkbox was set to run the command on the target machine.

Obviously, purchasing the Oracle Agent would solve this problem, but money is always a problem. Any help you can give with this issue is appreciated.
11 REPLIES 11

Ken_Putnam
Level 6
If you have specified "run on all servers" the path will be relative to each server in the backup job

In your example, the Oracle Server must have a directory called "Backup:" on the C: drive and it must contain the specified bat/cmd file.


If you have specified "run on media server". then (obviously) the path must exist on the media server, and must contain commands that will execute on the remote server ie:

NETSVC \\Oracle_servername STOP ORACLE rather than
NET STOP ORACLE

Chris_Cosper
Level 3
Ken,

It looks like our backup jobs were set up correctly.

This still would not explain why the time out keeps occurring. The time out window is already at 2 hours.

This is getting frustrating.

Ken_Putnam
Level 6
What exactly are the errors you are gettng?

When do they show up?

Sharvari_Deshmu
Level 6
Hello,

We request you to update us.


Thanks,

NOTE : If we do not receive your reply within two business days, this post would be marked assumed answered and would be moved to answered questions pool.

Chris_Cosper
Level 3
Here is a copy of part of the job log. The timeout window is set at 2 hours. Yesterday I changed the file extensions from .bat to .cmd with no change in results.
--------------------------
Starting Pre Job Command < C:\BACKUP\stop.cmd >

Error: Pre Job Command did not complete in time.

Error: Pre Job Command < C:\BACKUP\stop.cmd > Canceled.

Job Completion Status

Job ended: Tuesday, August 16, 2005 at 6:06:50 AM
Completed status: Failed
Final error: 0xa00081d0 - The pre/post command has timed out.

Final error category: Job Errors

Errors

Click an error below to locate it in the job log
Backup - server-5
Error: Pre Job Command did not complete in time.

Error: Pre Job Command < C:\BACKUP\stop.cmd > Canceled.
---------------------------------------

I have searched for the error in the knowledge base but it didn't turn up anything helpful.



Thanks,

Chris

Sharvari_Deshmu
Level 6
Hello,

Please see the technote below to resolve the issue:
http://support.veritas.com/docs/270489


We request you to keep us updated.

Thanks,

NOTE : If we do not receive your reply within two business days, this post would be marked assumed answered and would be moved to answered questions pool.

Chris_Cosper
Level 3
I know that I can extend the time out window. It's already at 2 hours. How long can it take for a 4 line script to run? What is the most common cause of job time outs?

A_van_der_Boom
Level 6
It could be that your batchfile does not return correctly from executing the commands. Stopping services could take some time, so much that the OS will say the service does not react anymore when in fact it takes the service some more time to stop then the time-out off the OS.

You could force the batchfile to always return a 'return value' or you can change the 'Pre/Post Command' options. You coud try some combination off these options like 'Cancel command if not completed within xx minutes'

You could try to run the backup job from the commandline rather than scheduling it in BE itself and see what happens.(don't know if you can use pre/post commands when doing a backup from the commandline though)

Just my E0.02
Regards
A van der Boom

Chris_Cosper
Level 3
I finally got it to run last night. I created a .cmd file that kicked off the scripts and used that as the pre/post commands. Thanks to everyone that tried to help out.

Chris

Ashutosh_Tamhan
Level 6
You're welcome Chris.

We are marking this post as answered. Thank you for the update.


Regards,
Ashutosh

frank_wesolek
Not applicable
I am currently running into the same problem. What was the .cmd file you created to resolve the timeouts?