2

I am using oracle 11g database in windows platform. Also, my db is in archivelog mode and I am taking daily RMAN backups. Now, I need to schedule my Rman backups on daily and weekly basis. I read about dbms_scheduler and using windows task scheduler to schedule this.

Now my question is: Which is the better method to schedule this? Do I use dbms_scheduler or batch scripts or does we have method using OEM?

0

TL/DR

Most Windows Oracle Shops usually go the Windows Scheduler route. However, I'll list the 3 main ways that Oracle RMAN backups can be scheduled, so that you can make a decision what is best for your environment.

1) Oracle Enterprise Manager (via Enterprise => Job) which you can read all about from the docs.

Advantages

Keeps all of your backup control in a centralized location. This can be a pretty big deal if you have many Oracle Databases to manage their backups for.

Disadvantages

Creates a dependency between OEM and all of your backups. If OEM goes down, your backups don't run for any database. This may not be as big of a deal if you keep your Recovery Catalog in the OEM database, since if that is the case for you, the dependency is already there (unless you have a failover to perform the backup using the Control File if the Backup Script can't talk to the Recovery Catalog).

2) DBMS_SCHEDULER

Advantages

No external dependency (provided the backup scripts are local). Automatic logging of runs for reporting.

Disadvantages

Running desktop executables from Oracle can be a little tricky. You either have to start the OracleJobScheduler service, which is deprecated as of 11g, or create dbms_scheduler credentials, then attach those credentials to the scheduler job, which Tim Hall explains here. No centralized maintenance or reporting (unless you schedule them from the same machine, but you may create unnecessary dependencies there).

3) Windows Scheduler

Advantages

Easy to setup and maintain.

Disadvantages

No centralized maintenance or reporting (unless you schedule them from the same machine, but you may create unnecessary dependencies there).

1

Personally I would schule it using the Windows Scheduler. You might want to get robocopy if you are copying your backup files to another server. Having an email client that you can send emails from DOS can be helpful. But otherwise you would just write .BAT files and or a Powershell file. You want a process that creates a backup log and checks that log for errors. Then you can send out emails when there are errors. There should be something already written online somewhere.

0

dbms_scheduler is the best way to approach this sort of problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.