Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2004
    Posts
    54

    Angry Unanswered: DB2MOVE Urgent!!!!!!!!!

    Hi,

    Please help me.

    Using db2move I moved my DB from AIX to NT, everything ok, but sequences are automatically set to 1. How I can set the same sequence value as AIX DB.

    Allian

  2. #2
    Join Date
    Mar 2004
    Posts
    448
    Alter sequence <sequence_name> restart with <numeric_constant>

    regards

    Mujeeb

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    If they are IDENTITY columns you can use:

    ALTER table mytable alter column identCol restart with X
    (where X is the next value that you AIX system would generate).

    HTH

    Andy

  4. #4
    Join Date
    Dec 2004
    Posts
    54

    Angry

    Hi,

    I would like to know is any facility there in DB2MOVE to get exact same sequece from source db


    allian

  5. #5
    Join Date
    Jan 2009
    Posts
    1

    answer?

    did you ever figure out how to set these sequences automatically. I have 100s of tables. If I have to go through them one at a time it would be a very long week.

  6. #6
    Join Date
    Jun 2002
    Posts
    15
    under windows, you can use the following command to generate the alter statements required to restart the identity columns with their proper value...

    db2look -z schema -d dbname -e -nofed | find /i "restart with" > restart.sql

    the file restart.sql will contain the alter statements.

Posting Permissions

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