If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Restoring to a new database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-27-10, 03:59
nasali nasali is offline
Registered User
 
Join Date: Apr 2008
Posts: 30
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
Reply With Quote
  #2 (permalink)  
Old 07-27-10, 05:09
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
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.
Reply With Quote
  #3 (permalink)  
Old 07-27-10, 06:28
nasali nasali is offline
Registered User
 
Join Date: Apr 2008
Posts: 30
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
Reply With Quote
  #4 (permalink)  
Old 07-27-10, 11:02
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
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).
Reply With Quote
  #5 (permalink)  
Old 07-27-10, 13:03
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
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
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS

Last edited by MarkhamDBA; 07-27-10 at 13:10.
Reply With Quote
  #6 (permalink)  
Old 07-28-10, 07:15
nasali nasali is offline
Registered User
 
Join Date: Apr 2008
Posts: 30
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On