Unix Technical Forum

Redirected Restore

This is a discussion on Redirected Restore within the DB2 forums, part of the Database Server Software category; --> Hi, I am doing a redirected restore from an offline backup file. All the paths and files have been ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:32 AM
Asphalt Blazer
 
Posts: n/a
Default Redirected Restore

Hi,
I am doing a redirected restore from an offline backup file. All
the paths and files have been created and I managed to do all the set
tablespaces commands. But once I do the "restore db <dbname> continue"
it gives me the following error

db2 => restore db cdbdwp1 continue
SQL2059W A device full warning was encountered on device "DATA32".
Do you want to continue(c), terminate this device only(d), abort the
utility(t) ? (c/d/t)

For data32 this was the command I had run:

db2 "set tablespace containers for 2 using (file
'/u09/db2data/cdbdwm1/data32' 1000)"

and yes, 2 is data 32

I am pasting the db2 list tablespaces out put from the original
database

************************************************** ************************************************** ***
Tablespace ID = 0
Name = SYSCATSPACE
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal

Tablespace ID = 2
Name = DATA32
Type = Database managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal

Tablespace ID = 3
Name = INDX32
Type = Database managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal

Tablespace ID = 4
Name = TEMP32
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal

Tablespace ID = 5
Name = SYSTOOLSPACE
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal

Tablespace ID = 6
Name = SYSTOOLSTMPSPACE
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal

Tablespace ID = 7
Name = DATA4
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal

Tablespace ID = 8
Name = TEMP4
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
************************************************** **************************************************

This error was occuring for a long time and thats why I am trying
data32 with just 1000 pages. Can anybody help me with this? Thanks in
advance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:32 AM
kavallin@hotmail.com
 
Posts: n/a
Default Re: Redirected Restore


Look in the db2diag.log it should be an entry for the tablespace ie
which size it requires to be able and continue with the restore

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 08:33 AM
Hardy
 
Posts: n/a
Default Re: Redirected Restore

can you provide the output of "db2 list tablespaces show detail"?

Asphalt Blazer 写道:

> Hi,
> I am doing a redirected restore from an offline backup file. All
> the paths and files have been created and I managed to do all the set
> tablespaces commands. But once I do the "restore db <dbname> continue"
> it gives me the following error
>
> db2 => restore db cdbdwp1 continue
> SQL2059W A device full warning was encountered on device "DATA32".
> Do you want to continue(c), terminate this device only(d), abort the
> utility(t) ? (c/d/t)
>
> For data32 this was the command I had run:
>
> db2 "set tablespace containers for 2 using (file
> '/u09/db2data/cdbdwm1/data32' 1000)"
>
> and yes, 2 is data 32
>
> I am pasting the db2 list tablespaces out put from the original
> database
>
> ************************************************** ************************************************** ***
> Tablespace ID = 0
> Name = SYSCATSPACE
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
>
> Tablespace ID = 2
> Name = DATA32
> Type = Database managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
>
> Tablespace ID = 3
> Name = INDX32
> Type = Database managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
>
> Tablespace ID = 4
> Name = TEMP32
> Type = System managed space
> Contents = System Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
>
> Tablespace ID = 5
> Name = SYSTOOLSPACE
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
>
> Tablespace ID = 6
> Name = SYSTOOLSTMPSPACE
> Type = System managed space
> Contents = User Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
>
> Tablespace ID = 7
> Name = DATA4
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
>
> Tablespace ID = 8
> Name = TEMP4
> Type = System managed space
> Contents = System Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
> ************************************************** **************************************************
>
> This error was occuring for a long time and thats why I am trying
> data32 with just 1000 pages. Can anybody help me with this? Thanks in
> advance.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 08:33 AM
Asphalt Blazer
 
Posts: n/a
Default Re: Redirected Restore

Yes here it is:

Tablespaces for Current Database

Tablespace ID = 0
Name = SYSCATSPACE
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Total pages = 28351
Useable pages = 28351
Used pages = 28351
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 128
Number of containers = 1

Tablespace ID = 2
Name = DATA32
Type = Database managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Total pages = 640000
Useable pages = 639936
Used pages = 541312
Free pages = 98624
High water mark (pages) = 541312
Page size (bytes) = 32768
Extent size (pages) = 64
Prefetch size (pages) = 256
Number of containers = 1

Tablespace ID = 3
Name = INDX32
Type = Database managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Total pages = 320000
Useable pages = 319936
Used pages = 291264
Free pages = 28672
High water mark (pages) = 291264
Page size (bytes) = 32768
Extent size (pages) = 64
Prefetch size (pages) = 256
Number of containers = 1

Tablespace ID = 4
Name = TEMP32
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 32768
Extent size (pages) = 64
Prefetch size (pages) = 256
Number of containers = 1

Tablespace ID = 5
Name = SYSTOOLSPACE
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Total pages = 2095
Useable pages = 2095
Used pages = 2095
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 64
Number of containers = 1

Tablespace ID = 6
Name = SYSTOOLSTMPSPACE
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 64
Prefetch size (pages) = 128
Number of containers = 1

Tablespace ID = 7
Name = DATA4
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Total pages = 173720
Useable pages = 173720
Used pages = 173720
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 64
Prefetch size (pages) = 256
Number of containers = 1

Tablespace ID = 8
Name = TEMP4
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 64
Prefetch size (pages) = 256
Number of containers = 1



and here are the commands I used to create the new database:

************************************************** *****************************************
db2 "restore db cdbdwp1 user db2inst1 using figaro$ from
/u04/db2bkup/cdbdwp1 to /u01/db2cat into cdbdwm1 redirect without
rolling forward without prompting"

db2 "set tablespace containers for 0 using (path 'SQLT0000.0')"

db2 "set tablespace containers for 2 using (file
'/u09/db2data/cdbdwm1/data32' 640000)"

db2 "set tablespace containers for 3 using (file
'/u08/db2indx/cdbdwm1/indx32' 320000)"

db2 "set tablespace containers for 4 using (path
'/u09/db2temp/cdbdwm1/temp32')"

db2 "set tablespace containers for 5 using (path 'SYSTOOLSPACE')"

db2 "set tablespace containers for 6 using (path 'SYSTOOLSTMPSPACE')"

db2 "set tablespace containers for 7 using (path
'/u09/db2data/cdbdwm1/data4')"

db2 "set tablespace containers for 8 using (path
'/u09/db2temp/cdbdwm1/temp4')"

************************************************** ************************************************

thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 08:33 AM
m
 
Posts: n/a
Default Re: Redirected Restore

Asphalt Blazer wrote:
> Yes here it is:
>
> Tablespaces for Current Database
>
> Tablespace ID = 0
> Name = SYSCATSPACE
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 28351
> Useable pages = 28351
> Used pages = 28351
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 32
> Prefetch size (pages) = 128
> Number of containers = 1
>
> Tablespace ID = 2
> Name = DATA32
> Type = Database managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 640000
> Useable pages = 639936
> Used pages = 541312
> Free pages = 98624
> High water mark (pages) = 541312
> Page size (bytes) = 32768
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 3
> Name = INDX32
> Type = Database managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 320000
> Useable pages = 319936
> Used pages = 291264
> Free pages = 28672
> High water mark (pages) = 291264
> Page size (bytes) = 32768
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 4
> Name = TEMP32
> Type = System managed space
> Contents = System Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 1
> Useable pages = 1
> Used pages = 1
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 32768
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 5
> Name = SYSTOOLSPACE
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 2095
> Useable pages = 2095
> Used pages = 2095
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 32
> Prefetch size (pages) = 64
> Number of containers = 1
>
> Tablespace ID = 6
> Name = SYSTOOLSTMPSPACE
> Type = System managed space
> Contents = User Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 1
> Useable pages = 1
> Used pages = 1
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 64
> Prefetch size (pages) = 128
> Number of containers = 1
>
> Tablespace ID = 7
> Name = DATA4
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 173720
> Useable pages = 173720
> Used pages = 173720
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 8
> Name = TEMP4
> Type = System managed space
> Contents = System Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 1
> Useable pages = 1
> Used pages = 1
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
>
>
> and here are the commands I used to create the new database:
>
> ************************************************** *****************************************
> db2 "restore db cdbdwp1 user db2inst1 using figaro$ from
> /u04/db2bkup/cdbdwp1 to /u01/db2cat into cdbdwm1 redirect without
> rolling forward without prompting"
>
> db2 "set tablespace containers for 0 using (path 'SQLT0000.0')"
>
> db2 "set tablespace containers for 2 using (file
> '/u09/db2data/cdbdwm1/data32' 640000)"
>
> db2 "set tablespace containers for 3 using (file
> '/u08/db2indx/cdbdwm1/indx32' 320000)"
>
> db2 "set tablespace containers for 4 using (path
> '/u09/db2temp/cdbdwm1/temp32')"
>
> db2 "set tablespace containers for 5 using (path 'SYSTOOLSPACE')"
>
> db2 "set tablespace containers for 6 using (path 'SYSTOOLSTMPSPACE')"
>
> db2 "set tablespace containers for 7 using (path
> '/u09/db2data/cdbdwm1/data4')"
>
> db2 "set tablespace containers for 8 using (path
> '/u09/db2temp/cdbdwm1/temp4')"
>
> ************************************************** ************************************************
>
> thanks
>

Your SET TABLESPACES has to be at LEAST equal to the number of used
pages for the tablespace you are restoring - and a couple extra would be
better. to DATA32 needs to be 541312 pages - and the disk you are
creating this on has to have enough space....

M
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 08:33 AM
m
 
Posts: n/a
Default Re: Redirected Restore

Asphalt Blazer wrote:
> Yes here it is:
>
> Tablespaces for Current Database
>
> Tablespace ID = 0
> Name = SYSCATSPACE
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 28351
> Useable pages = 28351
> Used pages = 28351
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 32
> Prefetch size (pages) = 128
> Number of containers = 1
>
> Tablespace ID = 2
> Name = DATA32
> Type = Database managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 640000
> Useable pages = 639936
> Used pages = 541312
> Free pages = 98624
> High water mark (pages) = 541312
> Page size (bytes) = 32768
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 3
> Name = INDX32
> Type = Database managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 320000
> Useable pages = 319936
> Used pages = 291264
> Free pages = 28672
> High water mark (pages) = 291264
> Page size (bytes) = 32768
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 4
> Name = TEMP32
> Type = System managed space
> Contents = System Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 1
> Useable pages = 1
> Used pages = 1
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 32768
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 5
> Name = SYSTOOLSPACE
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 2095
> Useable pages = 2095
> Used pages = 2095
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 32
> Prefetch size (pages) = 64
> Number of containers = 1
>
> Tablespace ID = 6
> Name = SYSTOOLSTMPSPACE
> Type = System managed space
> Contents = User Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 1
> Useable pages = 1
> Used pages = 1
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 64
> Prefetch size (pages) = 128
> Number of containers = 1
>
> Tablespace ID = 7
> Name = DATA4
> Type = System managed space
> Contents = Any data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 173720
> Useable pages = 173720
> Used pages = 173720
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
> Tablespace ID = 8
> Name = TEMP4
> Type = System managed space
> Contents = System Temporary data
> State = 0x0000
> Detailed explanation:
> Normal
> Total pages = 1
> Useable pages = 1
> Used pages = 1
> Free pages = Not applicable
> High water mark (pages) = Not applicable
> Page size (bytes) = 4096
> Extent size (pages) = 64
> Prefetch size (pages) = 256
> Number of containers = 1
>
>
>
> and here are the commands I used to create the new database:
>
> ************************************************** *****************************************
> db2 "restore db cdbdwp1 user db2inst1 using figaro$ from
> /u04/db2bkup/cdbdwp1 to /u01/db2cat into cdbdwm1 redirect without
> rolling forward without prompting"
>
> db2 "set tablespace containers for 0 using (path 'SQLT0000.0')"
>
> db2 "set tablespace containers for 2 using (file
> '/u09/db2data/cdbdwm1/data32' 640000)"
>
> db2 "set tablespace containers for 3 using (file
> '/u08/db2indx/cdbdwm1/indx32' 320000)"
>
> db2 "set tablespace containers for 4 using (path
> '/u09/db2temp/cdbdwm1/temp32')"
>
> db2 "set tablespace containers for 5 using (path 'SYSTOOLSPACE')"
>
> db2 "set tablespace containers for 6 using (path 'SYSTOOLSTMPSPACE')"
>
> db2 "set tablespace containers for 7 using (path
> '/u09/db2data/cdbdwm1/data4')"
>
> db2 "set tablespace containers for 8 using (path
> '/u09/db2temp/cdbdwm1/temp4')"
>
> ************************************************** ************************************************
>
> thanks
>

Besides the tablespace size and disk space used - there is another
possibility - the filesystem needs to be "large file enabled" in order
to create a singe file (DMS) that is 20GB (640000 * 32768) - OR - you
will need to create multiple containers if you have to stay under 2GB
per file

M
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:16 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com