|
dbname
Name of a database in the DB configuration
realm-name
Name of a realm in the database
The ACCESS command is used to control access rights to the realms of a database or to the entire database. Accesses can be locked, restricted, or access locks can be released. The locks have only logical effect, physically the files are not disconnected.
Access locks
ACCESS LOCK,DB=dbname
locks the database dbname.
ACCESS LOCK,RN=realm-name, [,DB=dbname]
locks the realm realm-name. DB=dbname need only be specified if the realm name is not unique throughout the DB configuration. It then specifies the intended database.
The effect of ACCESS LOCK is that the DBH prohibits all further access to the specified realm or database.
ACCESS LOCK does not take effect until the next READY (status code 12022), i.e. transactions which are processing the realm or database concerned continue until FINISH. Updating accesses are however locked if READY UPDATE is used in an attempt to open a processing chain for a further realm which has already been locked against updates by means of ACCESS LOCK.
Update access locks
ACCESS RETRIEVAL,DB=dbname
locks the database dbname against updates
ACCESS RETRIEVAL,RN=realm-name, [,DB=dbname]
locks the realm realm-name against updates. DB=dbname need only be specified if the realm name is not unique throughout the DB configuration. It then specifies the intended database.
ACCESS RETRIEVAL locks the specified realm or database against updating transactions until the lock is released by means of an ACCESS UPDATE command.
Access is possible for read-only transactions.
ACCESS RETRIEVAL does not take effect in CODASYL applications until the next READY (status code 12123) or in SQL applications until the first updating database access, i.e. updating transactions which are processing the realm or database concerned continue until FINISH. Updating accesses are however locked if READY UPDATE is used in an attempt to open a processing chain for a further realm which has already been locked against updates by means of ACCESS RETRIEVAL. In SQL applications, updating SQL statements are rejected.
Releasing access locks
ACCESS UPDATE,DB=dbname
releases access locks for the database dbname.
ACCESS UPDATE,RN=realm-name [,DB=dbname]
releases access locks for the realm realm-name. DB=dbname need only be specified if the realm name is not unique throughout the DB configuration. It then specifies the intended database.
ACCESS UPDATE cancels a previous ACCESS LOCK or ACCESS RETRIEVAL command, i.e. it releases the lock previously imposed on the specified realm or database.
An ACCESS command for a database may also be issued between the ADD DB and PERFORM commands, in other words as soon as the database has been assigned for attachment.
This serves to ensure that the access lock defined in the ACCESS command will apply after the database has been attached.
This is advisable if, for example, transactions which update a database have to be temporarily suspended.