Presentation is loading. Please wait.

Presentation is loading. Please wait.

® IBM Software Group © IBM Corporation QUY Thai Duy – ITFac DLU Lesson 7: Movement, backup and restore data.

Similar presentations


Presentation on theme: "® IBM Software Group © IBM Corporation QUY Thai Duy – ITFac DLU Lesson 7: Movement, backup and restore data."— Presentation transcript:

1 ® IBM Software Group © IBM Corporation QUY Thai Duy – ITFac DLU Lesson 7: Movement, backup and restore data

2 IBM Software Group Agenda  Data movement overview  Export  Import  Backup  Restore

3 IBM Software Group Data Movement Tools

4 IBM Software Group Data Movement Tools  EXPORT, IMPORT, LOAD  IXF, DEL, ASC  db2move  Easily export/import/load/copy set of tables & data (IXF)  db2look  Extracts:  DDL  permissions  database statistics  Tablespace characteristics

5 IBM Software Group EXPORT  Export data based on SQL Statement

6 IBM Software Group Launching the EXPORT Table Dialog  Control Center > (expand) All Databases folder > (select) Tables Folder > (right-click) Table > Export

7 IBM Software Group IMPORT  High-speed SQL INSERT  Activates triggers  All Constraints enforced immediately  Uses BUFFERPOOL IMPORT FROM employee.ixf OF IXF REPLACE_CREATE INTO employee_copy

8 IBM Software Group Launching the IMPORT Dialog Control Center > (expand) All Databases folder > (select) Tables Folder > (right-click) Table > Import

9 IBM Software Group LOAD  Very High Speed, low level data loader  separate LOAD, BUILD, DELETE phases  Uses utility heap (UTIL_HEAP_SZ)  Does NOT use bufferpool and does NOT activate triggers  Constraints enforced as separate step, may define  EXCEPTION tables  online LOAD supported

10 IBM Software Group Launching the LOAD Wizard Control Center > (expand) All Databases folder > (select) Tables Folder > (right-click) Table > Load

11 IBM Software Group Database Backup  Point-in-time image of a database  Backup example (try it now!):  BACKUP DB sample TO C:\BACKUPS

12 IBM Software Group Example of Backup File Names

13 IBM Software Group Database Recovery  A database restore will recreate the database from a backup  The database will exist as it did at the time the backup completed  If archival logging were used before the database crash, it would then be possible to roll forward through the log files to reapply any changes since the backup was taken.  It is possible to roll forward either to the end of the logs or to a specific point in time.  The granularity available on the last transaction needs to be weighed against database performance.

14 IBM Software Group Recovery Types  Crash/Restart Recovery  Uses the RESTART DATABASE command or the automatic restart enable configuration parameter (autorestart) to protect a database from being left in an inconsistent, or unusable, state.  Version/Image Recovery  BACKUP & RESTORE commands to put the database in a state that was previously saved (data since last backup lost).  Rollforward Recovery  BACKUP & RESTORE and ROLLFORWARD commands to recover a database to a specified point in time (minimal data loss).

15 IBM Software Group Database Restore  Restore example: drop db sample RESTORE DB sample FROM TAKEN AT

16 IBM Software Group Also possible with BACKUP and RESTORE  Restore over existing database  Clone database from a backup image (redirected restore)   Backup by tablespace  Restore only tablespace from full backup image  Delta and Incremental Backups  Backup from flash copy  Recovery of dropped tables


Download ppt "® IBM Software Group © IBM Corporation QUY Thai Duy – ITFac DLU Lesson 7: Movement, backup and restore data."

Similar presentations


Ads by Google