I'm trying to issue commands to RMAN (oracle's backup manager utility) through a .bat file (though I hope the syntax is similar.) I'm very new to RMAN and even newer to .bat files, but copying the format I've found from examples online, I made:
rman target system/password
run {
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
}
But when I attempt to run that as a .bat file, it just launches an rman window and does nothing else until I manually enter exit;, at which point it gives errors for the remaining lines being sent directly to the command line.
What am I doing wrong?