|
数据库:
C:\>db2dart sample
表空间:
db2dart sample /ts /tsi 2
db2dart sample /ts <= When prompted for the table space ID,
enter "2".
Identify the object:
C:\>db2 "select creator,name,tid,fid from sysibm.systables where name =
'EMP_PHOTO'"
CREATOR NAME TID FID
------------------ --------------------- ------ ------
DB2 EMP_PHOTO 2 8
To inspect this table, execute either of the following db2dart commands:
db2dart sample /t /tsi 2 /oi 8
db2dart sample /t <= When prompted for the table ID and
table space ID, enter "8 2".
The ORG table in the sample database resides in table space 2 and has an object ID of 2. To
extract all of the data from this table, execute this command:
db2dart sample /ddel
When prompted, enter either of the following lines of input:
2 2 0 1000
ORG 2 0 1000
To determine the index object ID for a table, inspect that table. For example, inspect tables T1 and
T2 in table space DMS1 (which has a table space ID of 3):
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
Before moving on to the next section, reset the quiesce state for table space DMS1:
db2 "connect to sample"
db2 "quiesce tablespaces for table kelly.t3 reset"
db2 "connect reset" |
|