【oracle】备份

每周进行数据库备份,以防数据库被意外破坏后恢复数据
安排如下:
周一: 完全备份(f1) exp xxx/xxx inctype=complete file=f1.dmp
周二: 增量备份(f2) exp xxx/xxx inctype=incremental file=f2.dmp
周三: 增量备份(f3) exp xxx/xxx inctype=incremental file=f3.dmp
周四: 增量备份(f4) exp xxx/xxx inctype=incremental file=f4.dmp
周五: 累积备份(f5) exp xxx/xxx inctype=cumulative file=f5.dmp
周六: 增量备份(f6) exp xxx/xxx inctype=incremental file=f6.dmp
周日: 增量备份(f7) exp xxx/xxx inctype=incremental file=f7.dmp
比如数据库在周日被破坏,则可用以下方式恢复:
1.创建空的数据库,同之前的结构。
2.imp xxx/xxx inctype=RESTORE FULL=y FILE=f1.dmp
3.imp xxx/xxx inctype=RESTORE FULL=y FILE=f5.dmp
4.imp xxx/xxx inctype=RESTORE FULL=y FILE=f6.dmp

详细出处参考:http://www.jb51.net/article/20976.htm


oracle 建立物化视图

create materialized view YLZ_IDENTIFY
refresh force on demand
start with to_date('05-11-2013 5:00:00', 'dd-mm-yyyy hh24:mi:ss') next to_date( concat( to_char( sysdate+1,'dd-mm-yyyy'),' 5:00:00'),'dd-mm-yyyy hh24:mi:ss')
as
select "SAC100","AAC002","AAC003","AAE036","SIC120","SIC130" from v_scrz_rzjg@YLZ_VIEW;

CREATE MATERIALIZED VIEW LOG ON YLZ_IDENTIFY
tablespace MATE_VIEW_LOG --日志保存在特定的表空间
WITH ROWID ;

参考:http://www.itpub.net/thread-1614812-1-1.html
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值