本文主要描述了Oracle数据库自动备份的具体实现步骤,具体内容请参考下文:
错误提示1:
message file rman.msb not found
verify that oracle_home is set properly
......
错误的主要原因:
自动执行的不能够识别相应的命令,需要在自动备份脚本中显式的声明Oracle的环境变量。
错误提示2:
standard in must be a tty
......
错误的主要原因:
不能在cron使用su或者管道等操作,必须将su命令移动到相关的shell脚本中。
错误提示3:
argument value description----------------
target quoted-string connect-string for target
databasecatalog quoted-string connect-string
for recovery catalognocatalog none if specified,
then no recovery catalogcmdfile quoted-string
name of input command filelog quoted-string
name of output message log filetrace
quoted-string name of output debugging
message log fileappend none if specified,
log is opened in append modedebug optional-args
activate debuggingmsgno none show rman-nnnn prefix
for all messagessend quoted-string send a command
to the media managerpipe string building block for
pipe namestimeout integer number of seconds to wait
for pipe inputchecksyntax none check the
command file for syntax errors-------------
--both single and double quotes (" or ") are accepted
for a quoted-string.quotes are not required unless the
string contains embedded white-space. rman-00571:
=======================================rman-00569:
=============== error message stack follows
======rman-00571: ================================
rman-00556: could not open cmdfile "backup_ar.rcv" ......
错误原因:
需要在cmdfile中指明绝对路径,不能因为shell脚本调用的cmdfile是在同一个目录下就可以直接使用文件名或者直接使用./
正确示例代码:
1、#cron文件
0 12,18 * * * /home/oracle/bak_sh/backup_ar.sh
#表示每天12,18点对数据库归档日至进行全备份
2、入口shell文件,文件名:backup_ar.sh
export oracle_home=
/home/u01/app/oracle/oracle/product
/10.2.0/db_1export oracle_sid=testexport
lang=en_us.utf-8/home/u01/app/oracle
/oracle/product/10.2.0/db_1/bin/rman cmdfile = backup_ar.rcv
3、rman备份脚本
connect target /connect catalog rman/rman
@rmanrun{allocate channel d1 device type
disk;sql "alter system archive log current";
backup archivelog all delete input forma
摘自:
http://tech.ccidnet.com/art/1107/20071209/1302597_1.html
分享到:
相关推荐
ORACLE数据库自动备份-详细步骤.doc
ORACLE数据库自动备份_详细步骤.doc
ORACLE 数据库自动备份的详细步骤。
本文档详细描述了oracle数据库的备份与恢复技术,不仅有详尽的技术阐述,还有详细的步骤方便初学者参考~
简单并详细的阐述了Oracle数据备份与恢复的使用方法
该文档详细的描述了在windows下备份Oracle数据库的步骤
oracle数据库备份与恢复 Oracle 数据库备份与恢复的基本步骤和方法
先来介绍一些不使用脚本我们直接使用命令备份与还原oracle数据库Oracle数据备份:步骤 1 备份用户数据。1.使用linux系统下的数据库管理员账号连接linux终端。2. 执行以下语句,创建“bak_dir”文件夹。 代码如下: ...
Oracle 自动备份详细步骤 ...要求:Oracle 数据库服务器对数据库 ytcn 每天自动备份一次。 解决方案:利用任务计划、批处理文件和 Oracle 的 exp 导出功能,根据日期自动生成 Oracle 备份文件。详细步骤:
NBU对Oracle数据库的本地/异机备份及恢复操作,主要针对初入NBU备份的小白,里面也有脚本,更改该参数即可使用。不想花积分下载的可以留言邮箱私发。
工作总结,希望有所帮助,主要描述了一下简单操作,包括数据库的备份和恢复!
详细说明了oracle自动定时备份的步骤,以及遇到问题及解决方法等。
Oracle数据库备份、恢复与迁移,详细步骤及代码解释。
Oracle 19c 备份恢复-导入导出
盖国强的这本《循序渐进Oracle:数据库管理、优化与备份恢复》从基础知识入手,详细讨论了Oracle数据库的创建、从OEM到Grid Control、Oracle的字符集、用户的创建与管理、表空间和数据文件、自动存储管理(ASM)、临时...
Oracle自动备份详细步骤,针对数据库运行过程中能自动完成数据库的备份。
6.10 用 Oracle 复制实现失败切换 6.10.1 基本复制 6.10.2 基本复制失败切换的优点 6.10.3 基本复制失败切换的缺点 6.11 将高级复制用于失败切换 6.11.1 高级复制失败切换的优点 6.11.2 高级复制失败切换的...
软件功能强大,持修复因各种原因造成的数据库无法打开或数据库删除后没有备份的问题,从而实现对Oracle数据库的抢修恢复,最大限度减少数据丢失。是用户实现Oracle数据库抢修恢复的好帮手。需要的朋友快来下载吧! ...
绝对原创,全部步骤都有截图,非常详细,十分适合新手和初学者学习,保证有效
Oracle 备份、恢复单表或多表数据步骤,适用于 Oracle 8、9、10。 *备份单表或多表数据: