To configure a data store, you must specify the distinguished name of the naming context that identifies the data store, and the name of the directory where the database files reside. Optional configuration information includes:
Additional naming contexts stored (see "Naming Contexts")
Cache size (see "Caching" for information about caching)
Congestion thresholds (see "Congestion Thresholds" for information about the congestion monitoring system and setting thresholds)
Which attributes are indexed (see "Indexing Directory Data" for information about indexing)
Whether any of the naming contexts held in the data store are replicated to other servers (see "Setting Up Replication")
"To Create a Data Store" gives step-by-step instructions for creating a new data store. "To Modify a Data Store or Naming Context" explains how to modify an existing data store.
In your initial configuration, you must specify the distinguished name of the naming context that identifies the data store on the server, and the directory where the data store files are held.
In the Admin Console main window, highlight the default data store o=XYZ, c=US, in the Data Store section and choose Modify from the Selected menu.
Alternatively, you can double-click on the default data store o=XYZ, c=US. The Modify Data Store window is displayed, as shown in Figure 4-2.
Modify the data store suffix to reflect the distinguished name of the naming context that the directory server will store.
If you intend to initialize the NIS service, you must modify the suffix made up of dc elements so that this naming context can contain the NIS domain managed by the server.
If you want the data store to hold more than one naming context, you can specify additional naming suffixes by clicking the More Suffixes button. If necessary, use the Set button to specify the distinguished name. "Using the DN Editor" explains how to enter a DN in the Admin Console.
Specify the path name to the directory where the data store is to be held.
For a default configuration, you do not need to specify any other information. For more information about creating a data store, see "Creating or Modifying a Data Store".
This section gives information on the options you can configure when creating or modifying a data store. It also guides you through the steps for performing these tasks.
A data store can be identified by up to four suffixes. A suffix corresponds to a naming context. The term naming context also applies to any subtree under a data store suffix. In the Admin Console, the Data Store section displays the naming contexts held in the data store. This list contains the data store suffixes plus any naming contexts created under the data store suffixes.
The distinguished name of a naming context corresponds to the base DN you specify when you perform a directory operation such as a search, or when you configure an LDAP client application.
You can specify a DN that conforms to the OSI tree structure (for example o=XYZ, c=US), or a DN that reflects your organization's DNS naming structure, through a sequence of domain components (for example dc=XYZ, dc=com).
A data store can contain a mixture of master and replica (slave) naming contexts, some or all of which can be replicated to other servers. For information on replication, refer to Chapter 9, Implementing Replication.
You can modify the DN of a data store only when the data store is empty.
As information is retrieved from the directory it is saved in the cache. When the cache is full, the oldest entry is discarded to make room for new information. Retrieving information from the cache is faster than retrieving entries from the database, but a large cache occupies more memory.
Default value for cache size is 5000 entries.
Congestion thresholds ensure that the directory does not become overloaded, by preventing new operations from starting when there are insufficient resources.
When the available disk space reaches the congested limit, add operations are no longer permitted, though modify, modify RDN (modrdn), search, read, and delete operations are allowed. The default limit is 500 Kbytes.
When the database reaches the critical limit, only search, read, and delete operations are allowed, and add, modify, and modrdn operations are not permitted. The default limit is 200 Kbytes.
The restrictions remain in force until the remaining disk space becomes greater than the back-to-normal limit. The default limit is 1000 Kbytes.
If your database reaches the congested limit, after deleting unnecessary entries, you must still regenerate the database to optimize the use of disk space. Refer to "Regenerating the Database".
Threshold values are given in Kbytes free on the disk holding the data store. The default location for the data store is /var/opt/SUNWconn/ldap/dbm.
In the Admin Console, choose Data Store from the Create menu.
The Create Data Store window is displayed. It is similar to the Modify Data Store window shown in Figure 4-2.
In the General Section, in the Data Store Suffix field, specify the distinguished name of the naming context stored in this data store.
To specify more than one naming context, click the More Suffixes button.
Specify the path name to the directory where this database is to be stored.
Specify whether the data store is read-only or not.
By default, it is not.
Specify whether the last modification attributes should be recorded.
When this option is enabled, the creator's DN, a creation timestamp, the modifier's DN, and a modification timestamp are added in the entry. This enables you to search the directory for entries created or modified since a particular date or time. This can be useful if you are synchronizing changes across data stores, or you are using partial replication.
Specify the cache size limit, in entries and in bytes.
See "Caching" for details.
Specify congestion thresholds.
See "Congestion Thresholds" for details.
Optionally, you can specify which attributes to index in the database.
See "To Create Indexes" for details.
In the Naming Contexts section, specify the master and slave subtrees held in this data store.
These are naming contexts that are subtrees or objects under the naming context used to name the data store. If you do not specify any naming contexts, the distinguished name of the data store itself is added to the list of master naming contexts automatically, but it is not displayed until you save the naming contexts information. See "Naming Contexts" for details.
Choose Naming Context from the Create menu.
The Add Naming Context window is displayed. Figure 4-3 shows the appearance of the window when Slave mode is selected.
Specify:
The subtree type (subtree or object)
The DN of the subtree or object in the Suffix field
The mode (master or slave)
If the naming context is a replica (slave), specify:
The name of the server from which it is replicated in the Master hostname field
The Master Update DN that dspushd will use when the master initiates the bind to replicate changes.
Whether you want the slave to pull updates from the master. If so, see "To Create Replicas" for details on how to specify the bind parameters.
Click OK to save the naming context information.
The new naming context is displayed in the Naming Contexts section.
Optionally, you can replicate any of the stored naming contexts to a different server.
If you do, you must create the naming context on the target server following the procedure described in Step 9, because the replication procedure does not create it automatically. See "Setting Up Replication" for details.
Click OK in the Create Data Store window to save the data store definition.
Add a directory entry for the root of the data store.
See "Creating the Root Entry" for details of how to add an entry to the directory. You cannot add any entries to this data store until this root entry exists.
To modify a data store, select the data store you want to modify from the Data Store list, and choose Modify Data Store or Modify Naming Context from the Selected menu.
Alternatively, you can double-click on your selection. The current characteristics of the data store or naming context are displayed. You can modify any part of the configuration, apart from a data store suffix, when the data store is not empty.
A data store can contain a number of attribute indexes to help optimize the speed of access to directory information. An attribute index is a list of entries containing a given attribute or attribute value. You can index attributes using any of the following matching rules:
Equality - Optimizes direct access to entries where an exact attribute value is supplied.
Presence - Optimizes searches with filters specifying the presence of an attribute but no specific value (cn=*, for example).
Substring - Optimizes searches with filters containing a partially-specified attribute value (cn=adr*, for example). Substring indexing uses all possible combinations of three successive letters. For example, if cn=adrianne, the substring indexes are: adr, dri, ria, ian, ann, nne. This type of index is longer to generate and is the most costly in terms of disk space.
Approximate - Optimizes searches with approximate match filters. The method used in approximate indexing is to discard vowels.
In a data store having the default characteristics, the following attributes are indexed:
commonName, surname, mail, mailHost, and givenName are indexed by presence, equality, approximate match and substring match
uid is indexed by presence and equality
preferredRfc822Recipient, rfc822Mailbox, cCMailAddress, pROFSAddresses, mSMailAddresses are indexed by presence and equality
The advantage of indexing is that it optimizes access for indexed attributes. The disadvantages are that it uses more disk space, and that adding and modifying entries takes longer.
When you add or modify an entry after an index has been created, the index is automatically updated. However, if you create a new index and the data store already contains entries, those entries are not automatically included in the index. Indexes are not automatically updated when entries are removed from the directory, so the size of the index files does not reduce as entries are removed.
To update all the indexes defined in a data store, choose Refresh Index from the Data Store menu of the data store window (see "Directory Maintenance".) Regenerating the indexes for a data store can take several minutes, depending on the number and complexity of the indexes defined. For example, regenerating the default indexes for a data store of 20,000 entries takes approximately five minutes.
Whether you are creating a new data store or modifying an existing one, select Index from the Create menu.
The Add Index window is displayed.
Specify the name of the indexed attribute and the index types.
Use the Set button to select attributes from a list. You can specify several attributes separated by commas. These indexed attributes will have the same index types.
Click Apply to add the index.
The backup function enables you to create a backup of the information held in your directory database in text format. The restore option enables you to restore your database from a set of backup files.
To back up a data store, double-click on the data store in the Data Store list to display it.
The Modify Data Store window is displayed.
Click the Data Store pull-down menu, and select Backup.
A selector window is displayed.
Use the selector window to select or create a directory for your backup.
Click Save.
To restore a data store, double-click on the data store in the Data Store list to display it.
The Modify Data Store window is displayed.
Click the Data Store pull-down menu, and select Restore.
A selector window is displayed.
Select the directory containing the backed up data store that you want to restore.
The default selection is the previous backup directory.
Click Load.
The directory service is restarted with the restored data store.