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 > How to restore 8.1 databases in 9.1?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-26-08, 06:15
ak835 ak835 is offline
Registered User
 
Join Date: Apr 2008
Posts: 29
Arrow How to restore 8.1 databases in 9.1?

Guys

I had created few databases in 8.1 on AIX 5.3.
Now my application (cognos) is going for migration and so is udb.

I already have UDB 9.1 ESE installed where i am trying to restore the backed up databases (from 8.1).

but i am unable to do so.

Every time i run 'restore' command,i get a message"The System is trying to write to a read-only file".

Is such restoration possible? If yes,how?

Regards
Abhi
Reply With Quote
  #2 (permalink)  
Old 12-26-08, 12:01
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
just with restore command- it will be migrated while restored
maybe a container path is to be created on a location that you don't have authority for
check the target locations of db containers/path and check authority
chown all paths to instance owner with at least write authority
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 12-29-08, 07:39
ak835 ak835 is offline
Registered User
 
Join Date: Apr 2008
Posts: 29
Arrow

ok...this is what i did

db2 -v restore db AAUD2305 from <PATH1> to <PATH> redirect
db2 -v "set tablespace containers for 2 using (path 'SQLT0002.0')"
db2 -v "set tablespace containers for 3 using (path 'tmp02')"
db2 -v "set tablespace containers for 5 using (path 'usr01')"
db2 -v "set tablespace containers for 6 using (path 'SYSTOOLSPACE')"
db2 -v restore database AAUD2305 continue

after this if i say "db2 connect to AAUD2305",it throws following error:

bash-3.00$ db2 connect to AAUD2305
SQL1119N A connection to or activation of database "AAUD2305" cannot be made
because a previous restore is incomplete. SQLSTATE=57019
& as per db2

bash-3.00$ db2 ? SQL1119N

SQL1119N A connection to or activation of database "<name>"
cannot be made because a previous restore is
incomplete.

Explanation:

The database is in an inconsistent state because a system error
occurred during a restore function.

No connection was made.

Where is the issue here? Why db is in inconsistent state?

Regards
Abhijeet
Reply With Quote
  #4 (permalink)  
Old 12-29-08, 09:19
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,448
Check db2diag.log - you will probably find the path to the container that was (is) invalid. Also, you seem to be forgetting about the rollforward.
Reply With Quote
  #5 (permalink)  
Old 12-29-08, 10:18
ak835 ak835 is offline
Registered User
 
Join Date: Apr 2008
Posts: 29
Arrow

modified my script:

db2 -v restore db AAUD2305 from <PATH1> to <PATH> into AAUD2305 redirect without rolling f
orward
db2 -v "set tablespace containers for 2 using (path '/../../NODE0000/SQL00001/SQLT0002.0')"
db2 -v "set tablespace containers for 3 using (path '/../../tmpts02/AAUD2305/tmp02')"
db2 -v "set tablespace containers for 5 using (path '/../../tmpts02/AAUD2305/usr01')"
db2 -v "set tablespace containers for 6 using (path '/../../srvr2287/NODE0000/SQL00001/SYSTOOLSPACE')"

db2 -v restore database AAUD2305 continue
#db2 -v rollforward database AAUD2305 complete
#db2 connect to AAUD2305
#db2 list tables

db2 -v terminate


i tried verifying my backup image & found few error there:

[1] Buffers processed: #ERROR: Tablespace control block checksum error detected against tablespace SYSCATSPACE,PoolID 0
ERROR: Tablespace container list checksum error detected against tablespace TEMPSPACE1,PoolID 1
ERROR: Tablespace container list checksum error detected against tablespace USERSPACE1,PoolID 2
ERROR: Tablespace container list checksum error detected against tablespace TEMPSPACE02,PoolID 3
ERROR: Tablespace control block checksum error detected against tablespace COG0001T,PoolID 4
ERROR: Tablespace container list checksum error detected against tablespace USERSPACE01,PoolID 5
ERROR: Tablespace container list checksum error detected against tablespace SYSTOOLSPACE,PoolID 6
###############

Image Verification Complete - ERRORS DETECTED: 7

Any clues?
Regards
Abhijeet
Reply With Quote
  #6 (permalink)  
Old 12-30-08, 10:50
ak835 ak835 is offline
Registered User
 
Join Date: Apr 2008
Posts: 29
Thumbs up

ok...

finally i could debug the issue....

modified my script a bit & it worked...

thanks guys

regards
abhijeet
Reply With Quote
  #7 (permalink)  
Old 12-30-08, 15:59
smith43017 smith43017 is offline
Registered User
 
Join Date: Sep 2006
Posts: 92
can you post it here . if you don't mind
Reply With Quote
  #8 (permalink)  
Old 01-08-09, 10:18
ak835 ak835 is offline
Registered User
 
Join Date: Apr 2008
Posts: 29
Thumbs up

here it is..
-----------------------------------------------------------------
db2 "restore db MYDB from <_path_to_backup_image_> into MYDB REDIRECT WITHOUT ROLLING FORWARD"
db2 "set tablespace containers for 0 using (FILE '<_path>'50000)"
db2 "set tablespace containers for 1 using (PATH '<_path_>')"
db2 "set tablespace containers for 2 using (PATH '<_path_')"
db2 "set tablespace containers for 3 using (PATH '<_path_>')"
db2 "set tablespace containers for 4 using (PATH '<_path_>')"
db2 "set tablespace containers for 5 using (FILE '<_path_>'131072)"
db2 "set tablespace containers for 6 using (PATH '<_path_>')"
db2 "restore database MYDB continue"
-------------------------------------------------------------

i had given ',' for FILE separating path & no of pages...

regards
abhi
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