c:\>db2pd -db JEPRODB -tablespaces
Database Partition 0 -- Database JEPRODB -- Active -- Up 0 days 00:49:29
Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0xFCA487D0 0 DMS Regular 8192 4 Yes 4 1 1 Off 1 0 3 SYSCATSPACE
0xFCA48FC0 1 SMS SysTmp 8192 32 Yes 32 1 1 On 1 0 31 TEMPSPACE1
0xFCA4D7A0 2 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 USERSPACE1
0xFCA4DF90 3 DMS Large 8192 4 Yes 4 1 1 Off 1 0 3 SYSTOOLSPACE
0xFCA4E780 4 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 DATA
0xFCA4EF70 5 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 INDX
0xFCA4F760 6 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 EXAMPLE
0xFA770060 7 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 DEANZA
0xFA770800 8 SMS Regular 8192 32 Yes 32 1 1 Off 1 0 31 BIZTALK
0xFA772FC0 9 SMS UsrTmp 8192 4 Yes 4 1 1 On 1 0 3 SYSTOOLSTMPSPACE
Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM State MinRecTime NQuiescers
0xFCA487D0 0 8192 8188 7308 0 880 7308 0x00000000 0 0
0xFCA48FC0 1 1 1 1 0 0 0 0x00000000 0 0
0xFCA4D7A0 2 4096 4064 160 0 3904 160 0x00000000 1355985382 0
0xFCA4DF90 3 4096 4092 116 0 3976 116 0x00000000 0 0
0xFCA4E780 4 2048 2016 224 0 1792 224 0x00000000 1356067869 0
0xFCA4EF70 5 4096 4064 96 0 3968 96 0x00000000 0 0
0xFCA4F760 6 12800 12768 96 0 12672 96 0x00000000 0 0
0xFA770060 7 12800 12768 96 0 12672 96 0x00000000 0 0
0xFA770800 8 1 1 1 0 0 0 0x00000000 0 0
0xFA772FC0 9 1 1 1 0 0 0 0x00000000 1356069253 0
Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
0xFCA487D0 0 Yes Yes 33554432 -1 No None None No
0xFCA48FC0 1 Yes No 0 0 No 0 None No
0xFCA4D7A0 2 Yes Yes 33554432 -1 No None None No
0xFCA4DF90 3 Yes Yes 33554432 -1 No None None No
0xFCA4E780 4 No No 0 0 No 0 None No
0xFCA4EF70 5 Yes Yes 33554432 -1 No None None No
0xFCA4F760 6 No No 0 0 No 0 None No
0xFA770060 7 No Yes 0 20971520 No 0 None No
0xFA770800 8 No No 0 0 No 0 None No
0xFA772FC0 9 Yes No 0 0 No 0 None No
Containers:
Address TspId ContainNum Type TotalPgs UseablePgs StripeSet Container
0xFCA48E50 0 0 File 8192 8188 0 C:\DB2\NODE0000\JEPRODB\T0000000\C0000000.CAT
0xFCA495F0 1 0 Path 1 1 0 C:\DB2\NODE0000\JEPRODB\T0000001\C0000000.TMP
0xFCA4DE20 2 0 File 4096 4064 0 C:\DB2\NODE0000\JEPRODB\T0000002\C0000000.LRG
0xFCA4E610 3 0 File 4096 4092 0 C:\DB2\NODE0000\JEPRODB\T0000003\C0000000.LRG
0xFCA4EE00 4 0 File 2048 2016 0 c:\db2\node0000\jeprodb\data01
0xFCA4F5F0 5 0 File 4096 4064 0 C:\DB2\NODE0000\JEPRODB\T0000005\C0000000.LRG
0xFCA4FDE0 6 0 File 12800 12768 0 c:\db2\node0000\jeprodb\example.dbf
0xFA770690 7 0 File 12800 12768 0 c:\db2\node0000\jeprodb\DEANZA.DBF
0xFA770E30 8 0 Path 1 1 0 c:\db2\node0000\jeprodb\BIZTALK
0xFA7735F0 9 0 Path 1 1 0 C:\DB2\NODE0000\JEPRODB\T0000009\C0000000.UTM
目标数据库:同名数据库恢复DB2:JEPRODB => INST1:JEPRODB4,验证恢复结果
c:\>db2 connect to JEPRODB user db2admin using Amaxgs123
c:\>db2pd -db JEPRODB -tablespaces
Database Partition 0 -- Database JEPRODB -- Active -- Up 0 days 00:01:54
Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0xFCB58050 0 DMS Regular 8192 4 Yes 4 1 1 Off 1 0 3 SYSCATSPACE
0xFCB58840 1 SMS SysTmp 8192 32 Yes 32 1 1 On 1 0 31 TEMPSPACE1
0xFCB5D020 2 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 USERSPACE1
0xFCB5D810 3 DMS Large 8192 4 Yes 4 1 1 Off 1 0 3 SYSTOOLSPACE
0xFCB5E000 4 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 DATA
0xFCB5E7F0 5 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 INDX
0xFCB5EFE0 6 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 EXAMPLE
0xFCB5F7D0 7 DMS Large 8192 32 Yes 32 1 1 Off 1 0 31 DEANZA
0xFA010060 8 SMS Regular 8192 32 Yes 32 1 1 Off 1 0 31 BIZTALK
0xFA012820 9 SMS UsrTmp 8192 4 Yes 4 1 1 On 1 0 3 SYSTOOLSTMPSPACE
Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM State MinRecTime NQuiescers
0xFCB58050 0 8192 8188 7308 0 880 7308 0x00000000 0 0
0xFCB58840 1 1 1 1 0 0 0 0x00000000 0 0
0xFCB5D020 2 4096 4064 160 0 3904 160 0x00000000 1355985382 0
0xFCB5D810 3 4096 4092 116 0 3976 116 0x00000000 0 0
0xFCB5E000 4 2048 2016 224 0 1792 224 0x00000000 1356067869 0
0xFCB5E7F0 5 4096 4064 96 0 3968 96 0x00000000 0 0
0xFCB5EFE0 6 12800 12768 96 0 12672 96 0x00000000 0 0
0xFCB5F7D0 7 12800 12768 96 0 12672 96 0x00000000 0 0
0xFA010060 8 1 1 1 0 0 0 0x00000000 0 0
0xFA012820 9 1 1 1 0 0 0 0x00000000 1356069253 0
Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
0xFCB58050 0 Yes Yes 33554432 -1 No None None No
0xFCB58840 1 Yes No 0 0 No 0 None No
0xFCB5D020 2 Yes Yes 33554432 -1 No None None No
0xFCB5D810 3 Yes Yes 33554432 -1 No None None No
0xFCB5E000 4 No No 0 0 No 0 None No
0xFCB5E7F0 5 Yes Yes 33554432 -1 No None None No
0xFCB5EFE0 6 No No 0 0 No 0 None No
0xFCB5F7D0 7 No Yes 0 20971520 No 0 None No
0xFA010060 8 No No 0 0 No 0 None No
0xFA012820 9 Yes No 0 0 No 0 None No
Containers:
Address TspId ContainNum Type TotalPgs UseablePgs StripeSet Container
0xFCB586D0 0 0 File 8192 8188 0 c:\INST1\NODE0000\JEPRODB\T0000000\C0000000.CAT
0xFCB58E70 1 0 Path 1 1 0 c:\INST1\NODE0000\JEPRODB\T0000001\C0000000.TMP
0xFCB5D6A0 2 0 File 4096 4064 0 c:\INST1\NODE0000\JEPRODB\T0000002\C0000000.LRG
0xFCB5DE90 3 0 File 4096 4092 0 c:\INST1\NODE0000\JEPRODB\T0000003\C0000000.LRG
0xFCB5E680 4 0 File 2048 2016 0 c:\INST1\node0000\jeprodb\data01
0xFCB5EE70 5 0 File 4096 4064 0 c:\INST1\NODE0000\JEPRODB\T0000005\C0000000.LRG
0xFCB5F660 6 0 File 12800 12768 0 c:\INST1\node0000\jeprodb\example.dbf
0xFCB5FE50 7 0 File 12800 12768 0 c:\INST1\node0000\jeprodb\DEANZA.DBF
0xFA010690 8 0 Path 1 1 0 c:\INST1\node0000\jeprodb\BIZTALK
0xFA012E50 9 0 Path 1 1 0 c:\INST1\NODE0000\JEPRODB\T0000009\C0000000.UTM
INST1_JEPRODB.ddl(编辑表空间路径为新数据库的表空间路径)
-- *****************************************************************************
-- ** automatically created redirect restore script
-- *****************************************************************************
UPDATE COMMAND OPTIONS USING S ON Z ON JEPRODB_NODE0000.out V ON;
SET CLIENT ATTACH_DBPARTITIONNUM 0;
SET CLIENT CONNECT_DBPARTITIONNUM 0;
-- *****************************************************************************
-- ** automatically created redirect restore script
-- *****************************************************************************
RESTORE DATABASE JEPRODB
-- USER
-- USING ''
FROM 'c:\'
TAKEN AT 20121225105802
ON 'c:\'
DBPATH ON 'c:\'
INTO JEPRODB
-- LOGTARGET ''
-- NEWLOGPATH 'C:\INST1\NODE0000\SQL00001\SQLOGDIR\'
-- WITH BUFFERS
-- BUFFER
-- REPLACE HISTORY FILE
-- REPLACE EXISTING
REDIRECT
-- PARALLELISM
-- WITHOUT ROLLING FORWARD
-- WITHOUT PROMPTING
;
-- *****************************************************************************
-- ** table space definition
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name = SYSCATSPACE
-- ** Tablespace ID = 0
-- ** Tablespace Type = Database managed space
-- ** Tablespace Content Type = All permanent data. Regular table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 4
-- ** Using automatic storage = Yes
-- ** Auto-resize enabled = Yes
-- ** Total number of pages = 8192
-- ** Number of usable pages = 8188
-- ** High water mark (pages) = 7308
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name = TEMPSPACE1
-- ** Tablespace ID = 1
-- ** Tablespace Type = System managed space
-- ** Tablespace Content Type = System Temporary data
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 32
-- ** Using automatic storage = Yes
-- ** Total number of pages = 1
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name = USERSPACE1
-- ** Tablespace ID = 2
-- ** Tablespace Type = Database managed space
-- ** Tablespace Content Type = All permanent data. Large table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 32
-- ** Using automatic storage = Yes
-- ** Auto-resize enabled = Yes
-- ** Total number of pages = 4096
-- ** Number of usable pages = 4064
-- ** High water mark (pages) = 160
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name = SYSTOOLSPACE
-- ** Tablespace ID = 3
-- ** Tablespace Type = Database managed space
-- ** Tablespace Content Type = All permanent data. Large table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 4
-- ** Using automatic storage = Yes
-- ** Auto-resize enabled = Yes
-- ** Total number of pages = 4096
-- ** Number of usable pages = 4092
-- ** High water mark (pages) = 116
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name = DATA
-- ** Tablespace ID = 4
-- ** Tablespace Type = Database managed space
-- ** Tablespace Content Type = All permanent data. Large table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 32
-- ** Using automatic storage = No
-- ** Auto-resize enabled = No
-- ** Total number of pages = 2048
-- ** Number of usable pages = 2016
-- ** High water mark (pages) = 224
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 4
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE 'c:\INST1\node0000\jeprodb\data01' 2048
);
-- *****************************************************************************
-- ** Tablespace name = INDX
-- ** Tablespace ID = 5
-- ** Tablespace Type = Database managed space
-- ** Tablespace Content Type = All permanent data. Large table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 32
-- ** Using automatic storage = Yes
-- ** Auto-resize enabled = Yes
-- ** Total number of pages = 4096
-- ** Number of usable pages = 4064
-- ** High water mark (pages) = 96
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name = EXAMPLE
-- ** Tablespace ID = 6
-- ** Tablespace Type = Database managed space
-- ** Tablespace Content Type = All permanent data. Large table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 32
-- ** Using automatic storage = No
-- ** Auto-resize enabled = No
-- ** Total number of pages = 12800
-- ** Number of usable pages = 12768
-- ** High water mark (pages) = 96
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 6
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE 'c:\INST1\node0000\jeprodb\example.dbf' 12800
);
-- *****************************************************************************
-- ** Tablespace name = DEANZA
-- ** Tablespace ID = 7
-- ** Tablespace Type = Database managed space
-- ** Tablespace Content Type = All permanent data. Large table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 32
-- ** Using automatic storage = No
-- ** Auto-resize enabled = Yes
-- ** Total number of pages = 12800
-- ** Number of usable pages = 12768
-- ** High water mark (pages) = 96
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 7
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
FILE 'c:\INST1\node0000\jeprodb\DEANZA.DBF' 12800
);
-- *****************************************************************************
-- ** Tablespace name = BIZTALK
-- ** Tablespace ID = 8
-- ** Tablespace Type = System managed space
-- ** Tablespace Content Type = All permanent data. Regular table space.
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 32
-- ** Using automatic storage = No
-- ** Total number of pages = 1
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 8
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
PATH 'c:\INST1\node0000\jeprodb\BIZTALK'
);
-- *****************************************************************************
-- ** Tablespace name = SYSTOOLSTMPSPACE
-- ** Tablespace ID = 9
-- ** Tablespace Type = System managed space
-- ** Tablespace Content Type = User Temporary data
-- ** Tablespace Page size (bytes) = 8192
-- ** Tablespace Extent size (pages) = 4
-- ** Using automatic storage = Yes
-- ** Total number of pages = 1
-- *****************************************************************************
-- *****************************************************************************
-- ** start redirected restore
-- *****************************************************************************
RESTORE DATABASE JEPRODB CONTINUE;
-- *****************************************************************************
-- ** end of file
-- *****************************************************************************