I want to run an oracle online backup through the rman setup in 12c. I have 3 scripts that need to be run and they are:
rman target sys@[db_name]/[db_password] nocatalog
configure channel device type disk clear;
RUN { ALLOCATE CHANNEL c1 DEVICE TYPE DISK FORMAT 'C:\Users\Administrator\Documents\Backup\%U'; BACKUP DATABASE PLUS ARCHIVELOG; }
I want to be able to run them as a single entry through a c# Process
object. I want to emulate using a command line and not a batch file.
So, I've looked at a few questions/answers and have used &&
to try and combine the commands but that didn't quite work. It took the first two commands and connected me to the RMAN center but the RUN
command didn't execute (most likely because of the ;
within that part of the script).
EDIT* - actually only the first command was run. The second did not execute.
My question: Is there a way that I can combine these 3 script items into 1 to run through the c# Process.Start()
method?