ITPub博客

首页 > 数据库 > Oracle > 备份与恢复

备份与恢复

原创 Oracle 作者:cbso520 时间:2011-01-24 11:11:04 0 删除 编辑

1.基于用户的备份与恢复

冷备(noarchivelog mode):

shutdown immediate;

cp datafile,control file,redo log to the new location

startup;

热备(archivelog mode):

alter database begin backup;

cp datafile,control file,redo log to the new location

alter database end backup;

alter tablespace <> begin backup;

cp datafile to a new location;

alter tablespace <> end backup;

热备恢复:

--完全恢复

startup mount;

recovery database;

alter database open;

--不完全恢复

startup mount;

recover database until time <>;

alter database open resetlogs;

2.使用 rman 完成备份与恢复(archivelog mode)

备份:

backup database plus archivelog delete input;

backup tablespace <>;

backup datafile <>;

恢复:

--完全恢复

startup mount;

restore database;

recover database;

alter database open;

--不完全恢复

run{

startup mount;

set until time=<>;

restore database;

recover database;

sql 'alter database open';
}

3.做实验

(1). 完全恢复和不完全恢复。

(2). 7*24小时系统利用在测试库的不完全恢复完成生产库的恢

复,即利用生产库的备份创建测试库,再从测试库导出生产库所

要恢复的数据,再导入生产库。

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16298743/viewspace-1045102/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: DBCA迁移数据库
请登录后发表评论 登录
全部评论

注册时间:2008-11-12

  • 博文量
    72
  • 访问量
    312697