简体   繁体   中英

Backing up and restoring table date in Oracle 10g

We have a table equipment_details which would require a refresh every month as part of a release. These are reference tables, maintainng the details of the equipments. There are other tables which maintains the order details, having foreign key reference to this table.

The requirement is to update new data in to equipment_details, as part of a release, and if at all required, we should be able to rollback to the previous state before update. The rollback plan\\scripts should remain consistent across releases.

The two approaches we are considering are,

  1. To backup equipment_details as say equipment_details_2.0, create a copy of the table along with the data as equipment_details, update it with the new equipments. If required to be rolled back, rename the table so as to go to the previous state. I believe this would have challenges wrt to maintaining the foreign key references.

  2. To backup only the table data, structure remainng the same and then if required to be rolled back after updating, restore the table with the backed up date.

Or is there any other way this can be dealt with? Any suggestions? Thanks.

You can use flashback technology to unload changes from specific table to specific point or time. http://docs.oracle.com/cd/B19306_01/backup.102/b14192/flashptr003.htm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM