Friday, September 11, 2009

Export backup of the previous 15 days' data?

The Oracle export utility is not "time aware," so it cannot do what you are asking by default. Just about the only way to accomplish this task with the export utility is to add a column to your tables which contains a date when the row was inserted or updated. You can then use the WHERE parameter of the exp utility to export where this column is less than 15 days old, similar to the following:

exp file=mydump.dmp owner=scott where='date_modified < sysdate -15 '