- 论坛徽章:
- 0
|
Pending的解除问题以及数据迁移
db2dart sample /t /tsi 3 /tn T1
Look for the T1 entry. It should look something like this:
Table inspection start: DB2.T1
Data inspection phase start. Data obj: 4 In pool: 3
Data inspection phase end.
Index inspection phase start. Index obj: 4 In pool: 3
Scanning pages for index itoken(1) root page:258p.
Index inspection phase end.
Table inspection end.
As you can see, both the data object (the table) and the index object have the same table space ID (4) and object ID (3). To mark this index object as bad, execute the following db2dart command:
db2dart sample /mi /tsi 3 /oi 4
If this is successful, you will see the following:
Connecting to Buffer Pool Services...
Attempting to mark index (p=3;o=4) as bad.
Modification for page (obj rel 0, pool rel 256) of pool ID (3) obj ID
(4), written out to disk successfully.
______________________________________
The requested DB2DART processing has completed successfully!
All operation completed without error;
no problems were detected in the database.
______________________________________
When T2 was created, it was created such that its table was in one table space and its indexes were in another. Find the index object ID for this table:
db2dart sample /t /tsi 3 /tn T2
Look for the T2 entry. It should look something like this:
Table inspection start: DB2.T2
Data inspection phase start. Data obj: 5 In pool: 3
Data inspection phase end.
Index inspection phase start. Index obj: 4 In pool: 4
Index inspection phase end.
Table inspection end.
In this case, the table space IDs are different (this is expected) and the object IDs are different as well. To mark the index object bad, specify the index table space (4) and index object ID (4):
db2dart sample /mi /tsi 4 /oi 4
If this is successful, you will see the following:
Connecting to Buffer Pool Services...
Attempting to mark index (p=4;o=4) as bad.
Modification for page (obj rel 0, pool rel 12 of pool ID (4) obj ID
(4), written out to disk successfully.
______________________________________
The requested DB2DART processing has completed successfully!
All operation completed without error;
no problems were detected in the database.
______________________________________
If you accidentally use the table space ID and object ID of the base table, it will fail because the index object will not be found:
db2dart sample /mi /tsi 3 /oi 5
Connecting to Buffer Pool Services...
Attempting to mark index (p=3;o=5) as bad.
______________________________________
DB2DART Processing completed with error!
WARNING:
The inspection phase did not complete! |
|