0

I'm trying to schedule a backup recovery to my oracle 11g Database, I use the above script with the windows task scheduler :

rman target/
run
{
shutdown immediate;
startup mount;
backup incremental level 0 database plus archivelog delete input;
backup archivelog all delete input;
delete force noprompt obsolete;
backup current controlfile spfile;
alter database open;
}

The scheduler started at the specified time, however backup doesn't start. When i excute the backup via : rman it works fine.

========What i got from widows scheduling task=========== enter image description here

=========What i should get (it's working fine without task scheduling)=== enter image description here

Obviously, the run script isn't working :

run
{
shutdown immediate;
startup mount;
backup incremental level 0 database plus archivelog delete input;
backup archivelog all delete input;
delete force noprompt obsolete;
backup current controlfile spfile;
alter database open;
}
Amine
  • 225
  • 3
  • 13
  • Are you sure your scheduled task is running as the proper user? – mmmmmpie May 29 '15 at 13:15
  • The user that runs the scheduled task should be part of ORA_DBA windows group if you want to use windows authentication to connect to the database. Invoking rman target / uses windows authentication. – Stefan Yordanov May 29 '15 at 13:19
  • Well i'm using the default user, not sysdba. How can i fixe that ? What i can't figure out is why it's working when i call the script directly from cmd (as a simple user) but not when using the windows tool for task scheduling ??? – Amine May 29 '15 at 13:38
  • You need to make sure the *windows user* you are running the scheduled task has proper environment and privileges to access RMAN on the database. – mmmmmpie May 29 '15 at 17:58
  • Out of curiosity: why do you shut down the database? It looks like your database is in archivelog mode. – Jon Tofte-Hansen Jun 02 '15 at 08:51

0 Answers0