Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2007
    Posts
    6

    Unanswered: Schema Backup & Restore

    Platform : DB2 v9.1.0.356/ Windows 2000 Server

    To backup Schema
    db2look -d <Databasename> -e -o <outputfile.ddl>

    To Restore

    Run the outputfile.ddl in command editor.

  2. #2
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    ??
    question or solution!!

    with db2look you can generate ddl not the data
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  3. #3
    Join Date
    Jan 2007
    Posts
    1

    Schema backup/restore

    You can do this in 2 ways:-

    Backup
    =====
    1. db2look -d $database -z $schema -e > schema.ddl
    2. Export all of the tables to .del files

    Restore
    =====
    1. db2 -tvf schema.ddl
    2. Load nonrecoverable all of the .del files saved in step 2 above

    or

    1. Put all of the tables associated with the schema in to their own tablespace and use standard online tablespace backup and restores.

    Method 2 is a lot quicker to restore the data to a previous state.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Not sure what your exact requirment is ...
    But if you want to make a copy of all data and objects in a schema to another schema (say schema1 to schema1_bak) then ADMIN_COPY_SCHEMA procedure may help

    http://publib.boulder.ibm.com/infoce...c/r0022035.htm

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    Good tech article on :
    Backup and restore SQL schemas for DB2 Universal Database

    http://www-128.ibm.com/developerwork...dm-0602rielau/
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •