Topics: IBM Content Manager

Icmrmvolval and finding the document

Problem: When the Icmrmvolval validation utility finds documents in de Resource Manager database, but not on your file system. You need to find out which document this is about. Icmrmvol reports item ID's that cannot be found on your filesystem, but do exist in the Resource Manager database.

Run the Icmrmvolval utility:

# ./icmrmvolval.sh -f [directory]
(The directory must already exist).

After a while you will get 2 output files: icmrmvol[date]_FILENOTFOUND.xml and icmrmvol[date]_SIZEMISMATCH.xml. Entries in those files are in XML format stanza's, which shows item ID's as:
A1001001A04D28A95704H07197
The following query on the Library Server database, determines the library server item ID:
db2 => connect to ICMNLSDB user ICMADMIN
select sourceitemid from icmstri001001 where targetitemid = 'A1001001A04D28A95704H07197'
This will result in something like:
SOURCEITEMID
--------------------------
A1001001A04D28A95704F54278
Now your able to determine the numerical value of the itemType:
select componenttypeid from icmstitems001001 where itemid = 'A1001001A04D28A95704F54278'
This will result in something like:
COMPONENTTYPEID
---------------
1007
Now the attributes of the item can be queried:
select * from icmut01007001
where itemid = 'A2001001A04J03C02629E64804'
(Substitute the numerical itemType value you queried before in the table name of this query).

At the end of this query you will find attributes in columns like: ATTR000..... This will usually give you enough document information to find the document in the client and to be able to delete this document from the Library Server.

You can combine the first 2 queries:
select a.componenttypeid, a.itemid from icmstitems001001 a, icmstri001001 b
where a.itemid = b.sourceitemid and b.targetitemid = 'A1001001A04D28A95704H07197'
This will result in something like:
COMPONENTTYPEID ITEMID
--------------- --------------------------
1007            A1001001A04D28A95704F54278
It would be the easiest to work with a temporary table of all ItemIDs from the icmrmvol utility. Let's say this table is called TEMPITEMS with 1 column named RITEMID. The combined query can be expanded to:
select a.componenttypeid, a.itemid from icmstitems001001 a, icmstri001001 b, tempitems c where a.itemid = b.sourceitemid and b.targetitemid = c.ritemid
This will result a list of all wrong Library Server ItemIDs and their numerical ItemTypeID value. If all items are from the same ItemTypeID (e.g. 1007), then the following query can be made to provide an overview of the attributes:
select * from icmut01007001 where itemid in (select a.itemid from icmstitems001001 a, icmstri001001 b, tempitems c where a.itemid = b.sourceitemid and b.targetitemid = c.ritemid)
For readability reasons all SQL queries have been typed on more lines. A SQL query should be put on one (1) line.



If you found this useful, here's more on the same topic(s) in our blog:


UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.

Interested in learning more?