文章导航PC6首页软件下载单机游戏安卓资源苹果资源

pc软件新闻网络操作系统办公工具编程服务器软件评测

安卓新闻资讯应用教程刷机教程安卓游戏攻略tv资讯深度阅读综合安卓评测

苹果ios资讯苹果手机越狱备份教程美化教程ios软件教程mac教程

单机游戏角色扮演即时战略动作射击棋牌游戏体育竞技模拟经营其它游戏游戏工具

网游cf活动dnf活动lol周免英雄lol礼包

手游最新动态手游评测手游活动新游预告手游问答

您的位置:首页技术开发数据库教程 → Oracle数据库自动备份的具体实现步骤

Oracle数据库自动备份的具体实现步骤

时间:2010/2/10 17:29:00来源:本站整理作者:我要评论(0)

 

Oracle数据库自动备份的具体实现步骤:

本文主要描述了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

 

相关视频

    没有数据

相关阅读 Oracle PRKC-1002错误原因和解决方案oracle10g安装图解(win7)Oracle错误代码大全oracle查看实例名方法Oracle表空间恢复方案微软亚太研发集团总部大楼 扎根中国"硅谷"亚马逊网络服务推出Oracle RDS如何关闭oracle rac选项 make rac_off

文章评论
发表评论

热门文章 oracle10g安装图解(wi

最新文章 数据库流行度排行2019oracle10g安装图解(wi SQL2008全部数据导出导入两种方法SQL2005新建复制“找不到存储过程 错误:28Dos远程登录mysql数据库详细图文教程mysql怎么开启远程登录功能

人气排行 mysql自动定时备份数据库的最佳方法-支持wiVisual Foxpro 6.0安装向导图文教程SQL Server 2008 安装图文教程SQL2008全部数据导出导入两种方法SQL 2000/2005/2008 的收缩日志方法,和清理mysql出 Can't connect to MySQL server onoracle10g安装图解(win7)sql2005安装图解_(sql server2005)安装教程