Library Version 11.2.5.3

DB_ENV->get_lk_partitions()
Prev | Chapter 6. The DB_LOCK Handle | Next

## DB_ENV->get_lk_partitions()

    #include <db.h>

    int
    DB_ENV->get_lk_partitions(DB_ENV *dbenv, u_int32_t *lk_partitions);

The `DB_ENV->get_lk_partitions()` method returns the number of lock table partitions used in the Berkeley DB environment. You can configure this using the DB_ENV->set_lk_partitions() method.

The `DB_ENV->get_lk_partitions()` method may be called at any time during the life of the application.

The `DB_ENV->get_lk_partitions()` method returns a non-zero error value on failure and 0 on success.

### Parameters

#### lk_partitions

The `DB_ENV->get_lk_partitions()` method returns the number of partitions in lk_partitions.

### Errors

The `DB_ENV->get_lk_partitions()` method may fail and return one of the following non-zero errors:

#### EINVAL

The method was called on an environment which had been opened without being configured for locking.

### Class

DB_ENV, DB_LOCK

### See Also

Locking Subsystem and Related Methods, DB_ENV->set_lk_partitions()

Prev | Up | Next
DB_ENV->get_lk_max_objects() | Home | DB_ENV->get_lk_priority()