Problem solve Get help with specific problems with your technologies, process and projects.

Object locked by QDBSRVxx

Many of our logical files have an object locked by QDBSRVxx. When we try to end this lock it doesn't end and gives an error message. Can you please advise how to unlock such objects?

In some circumstances, logical files access paths may not be valid. To find out if you have such files on the system, do DSPFD FILE(*ALL/*ALL) TYPE(*MBR) OUTPUT(*OUTFILE) OUTFILE(QTEMP/myfile) and search records that have field MBINDX set as "N". They have to be rebuilt for the logical files to be accessible. If you do not rebuild such access paths, by opening the file for instance, the system will build a list and rebuild the access paths itself. This is done in the QDBSRVxx jobs. They are system jobs and can't be stopped.

To avoid this problem, you may decide to change your logicals so that their access paths are rebuilt during the IPL before the system is fully operational, should they be invalid at that time (for instance following a system crash). To do so, run the command CHGPF or CHGLF myfile RECOVER(*IPL). This is a good option, as it will ensure the system will have full use of its power to redress the situation and once started, the system will be "clean". Alternatively, you may decide that the access path must only be rebuilt when the file is opened, in which case use RECOVER(*NO). The other value is *AFTIPL for which QDBSRVxx jobs will be used. (You can use the DSPFD above to check how your files are described. The field to check is MBRECV and its values are N=*NO, S=*IPL, A=*AFTIPL.)

Another problem concerns backups and restores. If you save a file, the default is not to save the access path. It's OK because it's a lot quicker and uses less space on the tape. But if you need to restore, catastrophe. The access paths will be rebuilt and that could take a lot of time if you have large files.


Search400's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: tips, tutorials and more.

Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.

Dig Deeper on Oracle on iSeries

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.