DB2数据恢复一例 SQL0928N(一)

2014-11-24 17:18:19 · 作者: · 浏览: 0

环境是AIX 6.1,DB2版本9.7.0.7
首先查看db2主进程是否存在

ps -ef|grep db2sys

若不存在使用db2start打开数据库

备份介质为冷备数据源,

cd 到介质所在目录下:

cd /home/db2inst1/backup

使用redirect参数来更改目录:

1.>db2 restore db xxx from . replace existing redirect without rolling forward


SQL1277W A redirected restore operation is being performed. Table space

configuration can now be viewed and table spaces that do not use automatic

storage can have their containers reconfigured.

DB20000I The RESTORE DATABASE command completed successfully.



列出xxx数据库容器详细信息:

2.>db2pd -db xxx -tablespaces


Database Partition 0 -- Database xxx -- Active -- Up 0 days 00:00:16 -- Date 2014-05-07-13.06.01.022471



Tablespace Configuration:

Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name

0x0700000103DED1C0 0 SMS Regular 4096 32 Yes 32 1 1 On 1 0 31 SYSCATSPACE

0x0700000103DF06E0 1 SMS SysTmp 4096 32 Yes 32 1 1 On 1 0 31 TEMPSPACE1

0x0700000103DF3C00 2 SMS Regular 4096 32 Yes 32 1 1 On 1 0 31 USERSPACE1

0x0700000103DF7360 3 SMS Regular 4096 32 Yes 32 1 1 On 1 0 31 SYSTOOLSPACE

0x0700000103DFAAC0 4 SMS UsrTmp 4096 32 Yes 32 1 1 On 1 0 31 SYSTOOLSTMPSPACE

0x0700000103DFE220 5 DMS Large 4096 32 No 32 1 1 Off 1 0 31 CDTS

0x0700000105280080 6 DMS Large 4096 32 No 64 1 1 Off 1 0 31 TSASNCA

0x0700000105281560 7 DMS Large 4096 32 No 64 1 1 Off 1 0 31 TSASNUOW

0x0700000105282A40 8 SMS Regular 8192 32 No 32 2 2 Off 1 0 31 CLOBTBS1



Tablespace Statistics:

Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM Max HWM State MinRecTime NQuiescers PathsDropped

0x0700000103DED1C0 0 0 0 0 0 0 0 0 0x02001100 1373014041 0 No

0x0700000103DF06E0 1 0 0 0 0 0 0 0 0x02001100 0 0 No

0x0700000103DF3C00 2 0 0 0 0 0 0 0 0x02001100 1398850212 0 No

0x0700000103DF7360 3 0 0 0 0 0 0 0 0x02001100 1373021563 0 No

0x0700000103DFAAC0 4 0 0 0 0 0 0 0 0x02001100 1301089227 0 No

0x0700000103DFE220 5 50000 49952 0 0 0 0 0 0x02001100 1374892759 0 No

0x0700000105280080 6 38400 38368 0 0 0 0 0 0x02001100 1374890249 0 No

0x0700000105281560 7 12800 12768 0 0 0 0 0 0x02001100 1374890249 0 No

0x0700000105282A40 8 0 0 0 0 0 0 0 0x02001100 1398850032 0 No



Tablespace Autoresize Statistics:

Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF

0x0700000103DED1C0 0 No No 0 0 No 0 None No

0x0700000103DF06E0 1 No No 0 0 No 0 None No

0x0700000103DF3C00 2 No No 0 0 No 0 None No

0x0700000103DF7360 3 No No 0 0 No 0 None No

0x0700000103DFAAC0 4 No No 0 0 No 0