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

更新时间:2019-11-08 来源:备份教程 点击:

【www.hzclsc.cn--备份教程】

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

本文主要描述了Oracle数据库自动备份的具体实现步骤,具体内容请参考下文:

 


 

错误提示1:


 

自动执行的不能够识别相应的命令,需要在自动备份脚本中显式的声明Oracle的环境变量。

错误提示2:

 


错误的主要原因:

不能在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文件


#表示每天12,18点对数据库归档日至进行全备份

2、入口shell文件,文件名:backup_ar.sh


lang=en_us.utf-8/home/u01/app/oracle /oracle/product/10.2.0/db_1/bin/rman cmdfile = backup_ar.rcv
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://www.hzclsc.cn/pingguo/38349.html

为您推荐

[杀戮尖塔手机版]杀戮尖塔存档位置在哪 杀戮尖塔存档位置一览

杀戮尖塔存档位置在哪?很多玩家朋友们在想备份或替换游戏存档时候,却不知道要在哪找到位置,为此很是苦恼,下面我们就来看一看杀戮尖塔存档位置一览,希望对各位有所帮助。杀戮尖塔存档位置一览:C: Users策略与战棋

2020-12-12 17:04:21   杀戮尖塔攻略   杀戮尖塔手游  

亿万僵尸存档位置_亿万僵尸存档在哪 亿万僵尸存档位置一览

亿万僵尸存档在哪?不少玩家朋友们在想替换或备份游戏存档的时候,不知道具体位置在哪,下面我们就来看一看亿万僵尸存档位置一览,希望对不知道的玩家朋友们有所参考和帮助。亿万僵尸存档位置一览:存档位置 C: 策略与战棋

2020-12-11 07:04:40   亿万僵尸怎么存档   亿万僵尸下载  

信长之野望15大志pk|信长之野望大志存档位置在哪 信长之野望15存档位置一览

信长之野望大志存档位置在哪?不少玩家朋友们再想备份或替换存档的时候不知道在什么位置,为此非常的苦恼,下面我们就来分享一下信长之野望15存档位置一览,希望对各位有所参考和帮助。信长之野望15存档位置:1策略与战棋

2020-12-11 07:04:40   信长之野望大志pk   信长之野望大志攻略  

【牧场物语希望之光攻略】牧场物语希望之光存档在哪 牧场物语希望之光存档位置一览

牧场物语希望之光存档在哪?不少玩家朋友们在想备份或替换游戏存档的时候不知道具体位置在哪,下面我们就来看一看牧场物语希望之光存档位置一览,希望对还不知道的玩家们有所参考。牧场物语希望之光存档位置一览:在模拟游戏

2020-12-09 17:04:22   牧场物语希望之光钓鱼   牧场物语希望之光挖矿  

【启用icloud云备份失败】icloud云备份失败怎么办 icloud云备份失败原因及解决方法

您的位置:首页 → 资讯 → 教你一招 → icloud云备份失败怎么办 icloud云备份失败原因及解决方法 icloud云备份失败怎么办 icloud云备份失败原因及解决方法时间:2017 11 教你一招

2020-12-06 17:04:20   iphone备份失败icloud空间不足