How might I go about finding all duplicate access paths on a given file or set of files? Many of these files have over 10-12 keys and 10-30 logicals each, which makes it difficult to do this manually.
Yes, that can be difficult process. The good news is that DB2 automatically shares the underlying OS/400 index object across access paths (i.e., logical files or indexes) that have the exact same key fields. So even though logically access paths have been duplicated, physically there's only one copy of the access path object that's being shared across all the duplicates.
If you want to try and graphically display/compare the access path definitions, then you could use the Database Navigator function of iSeries Navigator to draw a picture of the access paths related to a file. Queries can also be run against the system data dictionaries to output a list of the access paths just giving the object name and key fields names. There's an example utility using this approach on the ##DB2 UDB for iSeries Web site|http://www.iseries.ibm.com/db2/indexlist.htm ##
MORE INFORMATION ON THIS TOPIC
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this Search400.com Featured Topic: Database issues resolved
Dig Deeper on DB2 UDB (universal databases)
Related Q&A from Kent Milligan
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ... Continue Reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ... Continue Reading
IBM did not change the default of the reuse deleted files function to YES for physical files in order to minimize the impact on any existing ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.