开发者

Running RMAN Scripts with the job scheduler (Oracle)

开发者 https://www.devze.com 2022-12-12 01:35 出处:网络
Here\'s a good one for any Oracle gurus out there. I\'m working on a web page that dynamically configures Oracle DB backup settings in a closed environment. Right now, I have everything set up to gene

Here's a good one for any Oracle gurus out there. I'm working on a web page that dynamically configures Oracle DB backup settings in a closed environment. Right now, I have everything set up to generate scheduled jobs that run pre-determined RMAN scripts that already exist on the Database server's disk. This works, but I want to go a ste开发者_StackOverflow社区p further.

Is there any way to create jobs with the scheduler that will run RMAN scripts which haven't first been written to disk? For example, is it possible to fire off an RMAN backup script directly from the scheduler by using a pipe of some sort? I've found some vague information on the RMAN Pipe Interface, but I can't see how I could create a private pipe, pack it with RMAN commands, and then feed it to RMAN all in one job run... Any thoughts would be very much appreciated.


In anything related to backup/restore of the database, I advise you to prefer OS's means to execute scheduled jobs (cron/at on unix, Scheduled tasks on Windows). The advantage is that they are independent from oracle instance and you can better handle cases when oracle instance is down or malfunctioning. The "RMAN pipe interface" is meant to be used together with operating system's shell, as well.

However, executing scripts directly from database is also possible: AskTom


If you want to use DBMS_SCHEDULER then the script has to reside on the database server.
But if you install an Oracle client on the web server you can run RMAN from there and connect to the TARGET database. E.g.:

rman 'usr/pwd@conn_str AS SYSDBA' CMDFILE /home/www/db/backup-full.rman

In this case the script can reside on the web server.
Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号