Home SearchSite MapContact Us

   RemoteDBA Services for CODASYL DBMS and Rdb Remote Management of OpenVMS Systems Preserving Mission Critical IT Applications Through Virtualization

DATABASE
ADMINISTRATION

DBKEY Scoping Problem (DBMS only)
TECHNICAL ARTICLES -> TROUBLESHOOTING ARTICLES
Back ] Next ] Printer Friendly Version ]

Q:

Is there a DBKEY scoping problem?

 

A:

A problem was introduced in v4.3 where DBKEYs (line numbers on database storage area pages) were not being reused as efficiently as possible. This resulted in the space allocated for the line index (not the space used by your data) to be lost. Ideally, the DBCS would allow a DBKEY to be reused after the process which deleted the line (record) has committed its transaction and unbound from the database. While in most environments, the optimal time to allow DBKEY reuse would be after the commit, there are some valid reasons for waiting until the deleting process unbinds from the database.

The problem introduced in v4.3, caused DBKEYs to be reused only when a single process was attached to the database. Thus, at most sites, DBKEYs would never be reused.

For each record that was deleted, eight (8) bytes would be lost if the storage area has snapshots, or four (4) bytes if snapshots were not allowed for that area. Unfortunately, the DBO/ANALYZE report does not report space used by line indices, so it is possible for ANALYZE to show 100% space available, but for the area to completely full!

To determine if your database is suffering from excessive unused dbkeys, you must use DBO/DUMP to dump out the storage area pages. If the pages contain large numbers of "empty" lines (locked by), then this is probably a result of this problem. In severe cases, it is not uncommon to see relatively small pages contain a 80 or more "empty" lines while larger pages may contain even more empty lines.

Recovering the space lost to these dbkeys may be difficult. The excess dbkeys at the end of the page can be freed by using DBO/RESTORE to restore the area, while recovering dbkeys in the "middle" of the page will require an unload/load of the affected storage areas. While this problem was fixed in v4.3b and v5.0a and all versions since, your database may still be suffering from the ill-effects of this problem.

 

Top


If you have a technical question about this article or about any other 
CODASYL DBMS or Rdb topic, then ask our experts.

How would you rate this article?

5 (Highest)
4
3
2

0 (Did not apply)
Comments about this article or topic suggestions for new articles

Please type the word above:

Copyright © 2011 Software Concepts International
All Rights Reserved