Command Line Interface - Restore - SAP Oracle iDataAgent
Use XML to restore databases.
You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.
Before You Begin
- Run the qlogin command to log on to the CommServe computer.
- Download the restore_template.xml file to the computer where you will run the command.
- Open the restore_template.xml file, add your specific parameters, and save the file.
For information on supported instance XML parameters, see SAP for Oracle XML Instance Parameters.
- On the command line, go to Software_Installation_Directory/Base and type the command.
qoperation execute -af restore_template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name' –subclientName 'subclient_name' -destClient/clientName 'dest_client_name' -switchDatabaseMode true -restoreStream 'number_restore_streams'
- Verify the status of the job. On the command line type the command:
qlist job –j job_id
- Once the job completes, run the qlogout command to log off the CommServe computer.
Restoring Data and Log from Latest Browse
qoperation execute -af restore_template.xml -appName 'SAP for Oracle' -clientName client1 -instanceName instance1 -destClient/clientName client2 -switchDatabaseMode true -restoreStream 8
In addition to the parameter values provided in the template xml file, if you want to include additional options for the restore, you can do so by selecting the required options from the CommCell Console and generate the command line xml script for the restore operation.
Follow the steps given below to generate a script which you can use to perform a restore from the command line interface:
- From the CommCell Browser, navigate to Client Computers | <Client> | SAP for Oracle | <Instance>
- Right-click the <Instance> and then click All Tasks | Browse and Restore.
- Click OK.
- In the right pane of the Browse window, select the data that you want to restore and click Recover All Selected.
- Select the required restore options which you want to execute using the script.
- Click Save as Script.
- Enter the location to save the script along with the file name and extension. For example, "C:\scripts\myscript.bat" on Windows and "/usr/scripts/myscript.sh" on Unix. Alternatively, you can also click Browse and navigate to the location.
The script will be saved as a .xml file and .bat/.sh file.
If a file with the same name already exists in the specified location, both the .xml and .bat/.sh files will be overwritten.
- Enter the username and password for the user account which you want to use to perform the restore.
By default, the user account which you have used to login to CommCell console is used for performing the restore. However, if the user account does not have access to application and database, click Use a different account.
- Click OK.