Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007

    Unanswered: DB2 migration from windows to AIX, schema re-naming problem

    Hi folks,

    I am following the process outlined here: (which I found from the FAW here, many thanks for that!) but I have come across the following problem which I am at a loss as to how to solve.

    The source database has a schema named "user1" and I want those tables shifted over to the destination, but "user1" does not exist there, instead the schema should be "user2". I hoped to be able to simply rename the schema after completing the copy. However, the "user1" schema appears as "NULLID" in the list of schemas and none of the tables under that schema appear to have been transferrred (they don't show up in control center).

    So my question to you is "how on Earth do I move my database (from Windows to AIX) and cope with a change of schema name in the process?" Any help appreciated, I've been searching the 'net for answers all afternoon and I've given up for the day now, it's time to go home.



  2. #2
    Join Date
    Aug 2001
    If you have followed the procedure in the FAQ, then you must Find Replace 'user1' with user2 in your db2look output before creating tables on the target db.

    You should do the same in the db2move.lst file.

    I have not tested this one now ... but i guess it should work

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

  3. #3
    Join Date
    Jan 2003
    Provided Answers: 5
    Use the following two SQL statements to generate two separate SQL script files, one for export and one for load:

    select 'export to d:\temp\'||tabname||'.ixf of ixf select * from user1.'||tabname||';' from syscat.tables where tabscheme = 'USER1' order by tabname

    select 'load from '||tabname||'.ixf of ixf into user2.||tabname||';' from syscat.tables where tabschema = 'USER1' order by tabname

    Run both SQLs on the source server. Use the output from the first on to make your export script. Use the second SQL output to make your load script. Run the export script on the source. Copy the ixf files and the load script to the target. Run the load script on the target.



  4. #4
    Join Date
    Jul 2006
    Pune , India
    if u are at db2 9 LUW
    then u can use db2move with copy option
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  5. #5
    Join Date
    Mar 2007
    Thanks all, changing schema name in the ddl and those scripts from ARWinner did the trick nicely.

Posting Permissions

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