Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2004
    Posts
    11

    Unanswered: Restore Error (codepage convert problem ) when trying to restore a database into a ne

    Hi ,

    Newbie to DB2 UDB.

    I am using DB2 V7 with fixpak 6 and I am trying to restore a backup database from a machine different from the restore target machine.

    The backed up database also uses the same environment ( DB2 V7 with fixpak 6) as the restore target machine.

    When i try to restore the database, I encounter an error = Database codepage "950"
    indicated in the backup image differs from that of the current on-disk
    database codepage "1252". The Restore operation has failed'.


    Please any ideas of how I can solve this problem.

    Thanks in advance!!!!

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: Restore Error (codepage convert problem ) when trying to restore a database into

    Originally posted by dicy
    Hi ,

    Newbie to DB2 UDB.

    I am using DB2 V7 with fixpak 6 and I am trying to restore a backup database from a machine different from the restore target machine.

    The backed up database also uses the same environment ( DB2 V7 with fixpak 6) as the restore target machine.

    When i try to restore the database, I encounter an error = Database codepage "950"
    indicated in the backup image differs from that of the current on-disk
    database codepage "1252". The Restore operation has failed'.


    Please any ideas of how I can solve this problem.

    Thanks in advance!!!!
    You'll have to recreate the target database with the same codepage setting as the source (or drop it and let restore create it for you).

  3. #3
    Join Date
    Mar 2004
    Posts
    11
    >You'll have to recreate the target database with the same codepage >setting as the source (or drop it and let restore create it for you).


    How do I do this, I have tried using the create-restore technique, thus using the control centre interface, I right-clicked on the databases folder icon and then selected create>database from backup and then entered all the information, which evetually fails.

    I have also tried creating a new database from scratch, again using the control centre interface, ( create>database using wizard). Then i attempt to change the codpage by clicking on the region tab. But the codeset list only has two options which are: IBM-1252 & UTF-8.
    Again, this fails as well, when i try to restore the database.

    I assume the two above techniques can be exceuted via command prompt but i dont how to write the SQL query command.

    So, this brings me back to asking how do I do this:
    >You'll have to recreate the target database with the same codepage >setting as the source (or drop it and let restore create it for you).

    in command prompt without getting any errors.

    Thanks in advance!!!!!!!

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by dicy

    So, this brings me back to asking how do I do this:
    >You'll have to recreate the target database with the same codepage >setting as the source (or drop it and let restore create it for you).

    in command prompt without getting any errors.

    db2 ? create database

    db2 ? restore

  5. #5
    Join Date
    Mar 2004
    Posts
    11
    >db2 ? create database

    >db2 ? restore

    dont i need to specify wot codepage to use when creating it.

    How do i write this

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by dicy
    >db2 ? create database

    >db2 ? restore

    dont i need to specify wot codepage to use when creating it.

    How do i write this
    C:\SQLLIB\BIN>db2 ? create database
    CREATE DATABASE database-name
    [AT NODE | [ON drive] [ALIAS database-alias]
    [USING CODESET codeset TERRITORY territory]
    [COLLATE USING {SYSTEM | IDENTITY | IDENTITY_16BIT |COMPATIBILITY}]
    [NUMSEGS numsegs] [DFT_EXTENT_SZ dft_extentsize]
    [CATALOG TABLESPACE tblspace-defn] [USER TABLESPACE tblspace-defn]
    [TEMPORARY TABLESPACE tblspace-defn] [WITH "comment-string"] ]

    tblspace-defn:
    MANAGED BY { SYSTEM USING ('string' [ {,'string'} ... ] ) |
    DATABASE USING ({FILE | DEVICE} 'string' number-of-pages
    [ {,{FILE | DEVICE} 'string' number-of-pages} ... ] ) }
    [EXTENTSIZE number-of-pages] [PREFETCHSIZE number-of-pages]
    [OVERHEAD number-of-milliseconds] [TRANSFERRATE number-of-milliseconds]

  7. #7
    Join Date
    Mar 2004
    Posts
    11
    Thanks so much n_i been really helpful,

    But could u possibly substitute the query value [] {} (thus a typical example of a sql query ready to execute) for some real data , just so that i no which is what, get abit confused when i get to tablespace definition and system studfff

    Say am running the command on a windows xp platform.

    Thank u again , plz help

  8. #8
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by dicy
    Thanks so much n_i been really helpful,

    But could u possibly substitute the query value [] {} (thus a typical example of a sql query ready to execute) for some real data , just so that i no which is what, get abit confused when i get to tablespace definition and system studfff

    Say am running the command on a windows xp platform.

    Thank u again , plz help
    db2 "create db newdb on c: using codeset 950 territory us"

  9. #9
    Join Date
    Mar 2004
    Posts
    11
    I am getting this error when i excute the query:

    The code page "0" and/or country code "44" that has been specified
    is not valid.

    I changed us to GB

    Thanks

  10. #10
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by dicy
    I am getting this error when i excute the query:

    The code page "0" and/or country code "44" that has been specified
    is not valid.

    I changed us to GB

    Thanks
    Sorry, I guess it must be

    db2 "create db newdb on c: using codeset big5 territory gb"

  11. #11
    Join Date
    Mar 2004
    Posts
    11
    NOW AM GETTING AN ERROR = this command is not valid for this node type.

    I am running this command on a machine that just has the Db2 Administartion client version, is this a problem & also using big5 codeset will that not be aproblem whe ity to restore.



    Thanks again

  12. #12
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by dicy
    NOW AM GETTING AN ERROR = this command is not valid for this node type.

    I am running this command on a machine that just has the Db2 Administartion client version, is this a problem & also using big5 codeset will that not be aproblem whe ity to restore.



    Thanks again
    Would you mind opening a manual for a change?

    CREATE DATABASE

    Initializes a new database with an optional user-defined collating sequence, creates the three initial table spaces, creates the system tables, and allocates the recovery log.
    This command is not valid on a client.

Posting Permissions

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