on 01-18-2008 2:20 AM
Hi.
I am trying to write up a restore script which will import log files
until a point in time which is 24 hours earlier than the current time.
This is a requirement from the client in having the DR instance lag the
production instance by about 24 hours.
In my Korn Shell script, I have the following commands:
dbmcli -uUTL -d $ -U c recover_start $ LOG $ UNTIL $ $ ...(check if return code is -8020, then...) dbmcli -uUTL -d $ -U c recover_replace
$ "$" $
However, since the Utility session does not persist across the
different DBMCLI calls, the restore does not happen and the database
shuts down.
Obviously, we need a shell script to put the logic in for checking the
return code since we are trying to do the restore to a point in time.
Hence using a script for the DBMCLI which just runs a set of commands
without logic is not of any help to us.
Can someone please advise of a solution whereby this can be done? Is there
a way to make a Utility session persist across multiple DBMCLI calls?
Best Regards,
Reenal Chandra.
Hi Reenal,
dbmcli itself does support only simple command sequences without control.
You may build a recovery strategy from the backup history with the command backup_history_list before and store the command sequence in such a simple dbmcli command file.
A second way will be to use dbmcli in session mode and control it via redirected input and output pipes to your own script or program.
Last but not least there are also interfaces for scripting languages like perl, python or java which contains a DBM object which correspond to dbmcli in session mode. Check our documentation for more information about these interfaces.
Best reagrds
Bernd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.