rman target sys/oracle
设置数据库为自动备份控制文件与配置文件
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/export/home/oracle/ling/backup/%F'
备份数据库
backup database format '/export/home/oracle/ling/backup/dbL0_%u_%p_%t.db'
二. 拷贝备份文件,ini配置文件,归档文件到异地主机
三. 恢复数据库
rman target sys/oracle
set dbid 469672078 (此ID必须与主机一致)
startup nomout pfile='..'
指定控制文件启动数据库到nomount状态
restore spfile from '..'
恢复配置文件
shutdown immediate
关闭数据库
startup nomout
按配置文件启动数据库
restore controlfile from '..'
恢复控制文件
alter database mount;
启动数据库到mount状态
restore database;
按控制文件中的备份信息恢复数据库数据文件
recover database;
介质恢复数据文件(按归档文件恢复数据)
alter database open resetlogs;
重置重做日志启动数据库
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/262478/viewspace-628815/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/262478/viewspace-628815/