使用作业调度程序运行 RMAN 脚本 (Oracle)
对于任何 Oracle 专家来说,这都是一本很好的书。我正在开发一个在封闭环境中动态配置 Oracle DB 备份设置的网页。现在,我已完成一切设置以生成计划作业,这些作业运行数据库服务器磁盘上已存在的预定 RMAN 脚本。这可行,但我想更进一步。
有什么方法可以使用调度程序创建作业来运行尚未首先写入磁盘的 RMAN 脚本吗?例如,是否可以使用某种管道直接从调度程序启动 RMAN 备份脚本?我在 RMAN 上发现了一些模糊的信息管道接口,但我不知道如何创建一个私有管道,用 RMAN 命令将其打包,然后在一次作业运行中将其提供给 RMAN...任何想法都将非常感激。
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 step 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在与数据库备份/恢复相关的任何事情中,我建议您更喜欢操作系统的方式来执行计划作业(unix 上的 cron/at,Windows 上的计划任务)。优点是它们独立于oracle实例,当oracle实例宕机或出现故障时,您可以更好地处理情况。 “RMAN 管道接口”也旨在与操作系统的 shell 一起使用。
但是,也可以直接从数据库执行脚本: AskTom
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
如果您想使用 DBMS_SCHEDULER,则脚本必须驻留在数据库服务器上。
但是,如果您在 Web 服务器上安装 Oracle 客户端,则可以从那里运行 RMAN 并连接到 TARGET 数据库。例如:
在这种情况下,脚本可以驻留在 Web 服务器上。
希望这有帮助。
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.:
In this case the script can reside on the web server.
Hope this helps.