HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)

n
nis_db(3N) nis_db(3N)
with numattrs number of elements.
db_remove_entry()
removes all entries that satisfy the given attributes.
db_free_result() can
be used to free up the returned
db_result structure. attrs is an array of nis_attr structure with
numattrs number of elements.
db_add_entry()
adds a copy of the given object to the specified table, replacing the one identified by
the given attributes. If the given attributes identify more than one object,
DB_NOTUNIQUE is returned.
If no object is identified by the given attributes, the object is added.
attrs is an array of nis_attr
structure with numattrs number of elements. db_free_result()
can be used to free up the returned
db_result structure.
db_table_exists()
provides an efficient way for the NIS+ service to detect that a table exists. This
increases response time to the client and lowers the load on the server.
db_unload_table()
is used by the service to unload or deactivate tables that are not currently being
used. The service internally keeps track of access patterns to tables and will unload those tables that
have not been accessed for a while. By unloading infrequently accessed tables, the service can minimize
the amount of system resources for efficient operation.
db_checkpoint()
organizes the contents of the table in a more efficient manner. Checkpointing may
mean different things to different types of databases. It does not affect the logical contents of the table
operations and queries should return the same result before and after a checkpoint. For example, in a
log-based system, checkpointing may mean incorporating log entries of updates accumulated since the
previous checkpoint into the table.
db_free_result()
frees up the space allocated by various functions listed on this manual page that
return a
db_result structure.
db_standby() is an advisory call to the database manager. This call informs the database that
activity has slowed down and it can free up unnecessary resources such as file descriptors.
MULTITHREAD USAGE
Thread Safe: No
Cancel Safe: No
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
These functions can not be called safely in a multithreaded environment.
PROGRAMMING
Most of the routines in this library use an NIS+ name to identify the object that the user desires. The
name must be in canonical form before being passed to the database because one server may be serving
several namespaces and discrimination of the requested objects is accomplished by comparing the domain
names.
WARNINGS
HP-UX 11i Version 2 is the last HP-UX release on which NIS+ is supported.
LDAP is the recommended replacement for NIS+. HP fully supports the industry standard naming ser-
vices based on LDAP.
DIAGNOSTICS
DB_SUCCESS The query or operation completed successfully and returned status.
DB_NOTFOUND The name or entry that was named in the argument did not exist.
DB_NOTUNIQUE An attempt was made to remove an entry from a table that is not uniquely specified.
DB_BADQUERY The query that was submitted to the database was invalid (for example, it might
name some nonexistent fields).
DB_BADTABLE The table was corrupted.
DB_BADOBJECT The fields of the object does not conform to the fields of the table to which it is being
added.
DB_MEMORY_LIMIT
There is insufficient memory to complete the operation requested.
HP-UX 11i Version 2: September 2004 3 Hewlett-Packard Company Section 3657