J
Jo-Anne
Guest
I have created a .bat file to perform a cold backup of our oracle data. The
script:
a. shuts down the instance
b. runs the save command
c. starts the instance.
I would like to run the save command in background and then loop through a
specified wait period. If the save command completes within the wait period
then the start instance step is run and the job completes successfully. If
the save command does not complete within the wait period then the start
instance step is run and the job completes with error.
I have tried the following 2 commands:
1. CMD /c %BACKUP_DIR%\networker_save.cmd "servername" "pool" "file
directory*" "%SAVELOG_FILE%" >> %SAVECMD_FILE%
2. call "CMD /c %BACKUP_DIR%\networker_save.cmd "servername" "pool" "file
directory*" "%SAVELOG_FILE%" >> %SAVECMD_FILE%"
Both work but not in background. The script does not continue until the
save command has completed.
In Unix, commands can be run in background using & after the command. Is
there something similar that can be used in a .bat file?
Thanks!
PS. I'm not sure if I have put this in the correct discussion group.
Please correct me if I'm wrong.
script:
a. shuts down the instance
b. runs the save command
c. starts the instance.
I would like to run the save command in background and then loop through a
specified wait period. If the save command completes within the wait period
then the start instance step is run and the job completes successfully. If
the save command does not complete within the wait period then the start
instance step is run and the job completes with error.
I have tried the following 2 commands:
1. CMD /c %BACKUP_DIR%\networker_save.cmd "servername" "pool" "file
directory*" "%SAVELOG_FILE%" >> %SAVECMD_FILE%
2. call "CMD /c %BACKUP_DIR%\networker_save.cmd "servername" "pool" "file
directory*" "%SAVELOG_FILE%" >> %SAVECMD_FILE%"
Both work but not in background. The script does not continue until the
save command has completed.
In Unix, commands can be run in background using & after the command. Is
there something similar that can be used in a .bat file?
Thanks!
PS. I'm not sure if I have put this in the correct discussion group.
Please correct me if I'm wrong.