Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2008
    Posts
    32

    Unanswered: Restoring to a new database

    Dear Friends

    I try to take offline backup for my db on local machine then after successful backup I try to create new db from this backup but it fails :

    Information needed :
    Server : AIX
    UserName:iwmbuat
    Database: IEABDB2U
    InstanceHome: /var/mqsi/iwmbuat
    New Database to be created :test_db

    ================================================== ========
    iwmbuat:/var/mqsi/iwmbuat> db2 backup db IEABDB2U to /var/mqsi/iwmbuat without prompting

    Backup successful. The timestamp for this backup image is : 20100727100526

    iwmbuat:/var/mqsi/iwmbuat> db2 restore db IEABDB2U from /var/mqsi/iwmbuat into test_db without prompting
    SQL1205N The code page "819" and/or territory code "785" that has been
    specified is not valid.
    ================================================== ========

    I don't know what’s wrong with this because I am restoring in same machine.

    Any help will be appreciated

  2. #2
    Join Date
    Jan 2010
    Posts
    335
    You need to perform a redirect restore.
    Let DB2 generate a script for you:
    restore db IEABDB2U redirect generate script <filename>

    Edit the script and start the restore with this script.

  3. #3
    Join Date
    Apr 2008
    Posts
    32

    Unhappy

    Dear nvk

    Thanks for help and I appreciate it.

    I try this generated scriopt and modify it but same problem still exist


    iwmbuat:/var/mqsi/iwmbuat> db2 restore db IEABDB2U TAKEN AT 20100727100526 into test_db redirect
    SQL1205N The code page "819" and/or territory code "785" that has been
    specified is not valid.

    check this link for clone db :
    DB2 Basics: Cloning DB2 Databases Using Redirected Restore
    "A database restore operation uses a database backup image to recreate a database. If you want to clone a database from one machine to another, the simplest way is to restore the database from a backup image. The file system paths used by the database are also contained within the backup image. Therefore, unless the file systems and the physical devices that are referenced by the database on the source system are set up exactly the same way on the target system, you will need to perform a redirected restore operation"




    Note: i to do same restore db on development server and it's work fine as foolowing :

    wmbint:/var/mqsi/wmbint> db2 restore db IEABDB5U from /var/mqsi/wmbintt/backup into test_db without prompting
    DB20000I The RESTORE DATABASE command completed successfully.


    I don't know what's wrong "code page" with iwmuat instance in test server.


    Regards,
    Nasser

  4. #4
    Join Date
    Jan 2010
    Posts
    335
    Hmmm,

    i'm not sure about the reason for this. Does your Servers have the same OS-Levels, locales, installation settings? Check your environments (Output of env Command).

  5. #5
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by nvk@vhv View Post
    Hmmm,

    i'm not sure about the reason for this. Does your Servers have the same OS-Levels, locales, installation settings? Check your environments (Output of env Command).
    nvk is right. the combination of codeset and territory on this particular OS you are using is not allowed. See this for more info:

    http://publib.boulder.ibm.com/infoce.../r0004565.html

    or look for 'Choosing the code page, territory, and collation for your database' in DB2 Infocenter
    Last edited by MarkhamDBA; 07-27-10 at 14:10.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  6. #6
    Join Date
    Apr 2008
    Posts
    32
    Dear nvk@vhv & MarkhamDBA

    The issue i check profile and it's show :

    LANG=ar_AA.ISO8859-6
    LC_ALL=ar_AA.ISO8859-6

    I commente it and it's worke fine.


    Thanks very much guys for help.
    Nasser

Posting Permissions

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