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 > redirected restore problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-28-04, 09:10
ashaq ashaq is offline
Registered User
 
Join Date: Dec 2003
Posts: 39
redirected restore problem

I am trying to create a test DB (AIX 5.1 ,db2 V7.2) from the image copy of Production (AIX 4.3 ,db2 V7.2)

I created the DB first with the same code page as production
then executed the script as

db2 -v "restore db db1 from '/backup' taken at 20040403220734 to /db2
/db200001/dbnc3db into db1 redirect without rolling forward without prompting" >> $OUTFILE

ia m getting the following error
SQL2523W Warning! Restoring to an existing database that is different from the database on the backup image, but have matchi
ng names. The[db200001@nc3dbaix#]ls -ltr target database will be overwritten by the backup version. The Roll-forward recovery logs associated with the t
arget database will be deleted.
Do you want to continue ? (y/n) y
SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

I checked the filesystem if the instance is not having permission ,everything seesm fine

eg
[db200001@nc3dbaix#]pwd
/db2/db200001

[db200001@nc3dbaix#]ls -ltr
drwxrwxrwx 4 db200001 db2iadm1 512 May 28 06:48 dbnc3db
also /db2 have same permission

I noticed that the image copy is creating new instance directory under /db2
eg
/db2/ncadb01

which is the structure of production DB

Kindly help me in this regard,wld be appreciated
Reply With Quote
  #2 (permalink)  
Old 05-28-04, 12:07
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by ashaq
I am trying to create a test DB (AIX 5.1 ,db2 V7.2) from the image copy of Production (AIX 4.3 ,db2 V7.2)

I created the DB first with the same code page as production
then executed the script as

db2 -v "restore db db1 from '/backup' taken at 20040403220734 to /db2
/db200001/dbnc3db into db1 redirect without rolling forward without prompting" >> $OUTFILE

ia m getting the following error
SQL2523W Warning! Restoring to an existing database that is different from the database on the backup image, but have matchi
ng names. The[db200001@nc3dbaix#]ls -ltr target database will be overwritten by the backup version. The Roll-forward recovery logs associated with the t
arget database will be deleted.
Do you want to continue ? (y/n) y
SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

I checked the filesystem if the instance is not having permission ,everything seesm fine

eg
[db200001@nc3dbaix#]pwd
/db2/db200001

[db200001@nc3dbaix#]ls -ltr
drwxrwxrwx 4 db200001 db2iadm1 512 May 28 06:48 dbnc3db
also /db2 have same permission

I noticed that the image copy is creating new instance directory under /db2
eg
/db2/ncadb01

which is the structure of production DB

Kindly help me in this regard,wld be appreciated
Your post is a bit confusing... but at any rate, if you'd like to see what file is causing the problem, set the DIAGLEVEL to 4 and monitor the db2diag.log

That should give you a good start.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #3 (permalink)  
Old 05-28-04, 12:14
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
if the database already not exists then the restore command will create one implicitly but according to new db directory path that is available.
so try to restore the database without first creating it with a different name.

regards,

mujeeb
Reply With Quote
  #4 (permalink)  
Old 05-28-04, 12:18
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
adding to that in that case you have two databases (one is production) and the other with the new name is that what you want to do.

db2 changes some file permission when they are in use one is db2nodes.cfg
file. I don't know much about the other files.so check that one too.

regards,

mujeeb
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