`

【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
分享到:
评论
1 楼 di1984HIT 2015-12-25  
学习了~~~

相关推荐

Global site tag (gtag.js) - Google Analytics