Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    13

    Unanswered: URGENT - copye a full database

    Hi guys

    I new to DB2, and I must copy a database from a server on another one with all the data before tonight ??

    The first db is on DB 7.2.1 on win2k server the new is on windows 2003 same db version.

    I try to backup the db on the first one and restore on the second. But i can't.


    Please Help Me !!!

    Kevin

    ps : and I bring you in a good restaurant if you go to paris one Day !!
    MS MVP.NET
    CodeWise Member

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I'm sure you are aware that version 7.2 is out of support. additionally, I'm not sure if Windows 2003 ever was a supported platform for V7.2 .. So, be prepared for the unexpected!!

    To my knowledge, w2k and w2003 are compatible for backup and restore ... Use a sample database to backup and restore between these boxes before you do live ..
    http://www-128.ibm.com/developerwork...rected+restore

    should give you all the information you need ... (If the directory structure is same on both boxes, then you do not need to redirect)

    The other option is to user db2look, export and load.
    In brief
    1) Use db2look to generate the ddl for the database objects
    db2look -d <dbname> -e -a -l -x -o db2look.out -wrapper -server
    2) Use the db2look.out to create a database objects in the database on the other machine.
    3) On the source machine, generate export and load scripts
    select 'export to '||rtrim(tabschema)||'.'||rtrim(tabname)||'.ixf of ixf lobdir . lobfile '||rtrim(tabschema)||'.'||rtrim(tabname)||' modified by lobsinfile select * from '||rtrim(tabschema)||'.'||rtrim(tabname)||' ; ' from syscat.tables where tabschema not like 'SYS%'

    select 'load from '||rtrim(tabschema)||'.'||rtrim(tabname)||'.ixf of ixf lobdir . lobfile '||rtrim(tabschema)||'.'||rtrim(tabname)||' modified by lobsinfile replace into '||rtrim(tabschema)||'.'||rtrim(tabname)||' nonrecoverable; ' from syscat.tables where tabschema not like 'SYS%'

    4) Use the above export command to export the data and copy all files to the othe box.

    5) Use the above load command to load the data into the tables on the target m/c

    6) Backup the database on the target ...

    HTH

    Sathyaram

    PS: Would love to meet you in Paris for a drink when I happen to be there
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Feb 2004
    Posts
    13

    thanks

    I'll try it now !!

    I certainly repost some question while I'm doing this..


    ps: Sure for a meeting when you are in Paris
    MS MVP.NET
    CodeWise Member

  4. #4
    Join Date
    Feb 2004
    Posts
    13

    Yeahhhh

    I'll try on a test db and it works fine !!

    great

    I'll try on the true DB..

    thanks

    Kevin
    MS MVP.NET
    CodeWise Member

  5. #5
    Join Date
    Feb 2004
    Posts
    13

    Talking Thanks...

    Super ! It works fine. I use backup and restore redirect from the article.
    I've got my old base on my new server.
    Great

    Thanks for all

    and if you come to Paris mail me !! ('s'k'e'v't'a'z'@'y'a'h'o'o'.'c'o'm')


    Bye bye

    Kevin
    MS MVP.NET
    CodeWise Member

Posting Permissions

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