如何备份特定时间段的数据

2025-03-25 13:46:10
推荐回答(1个)
回答1:

1 如果数据量特别小可以尝试用spool命令

SQL> spool /home/oracle/cc.txt
SQL> select * from tables where time between 20150101 and 20150102;
SQL> spool off

2 如果数据库版本高于9i,并且查询数据库小,时间段是最近的可以尝试闪回查询
SQL> select * from tables as of timestamp (systimestamp - interval '10' minute);

3 可以通过闪回数据库,闪回到你要的时间点,然后在备份

4 可以通过exp或expdp的query参数