HP-UX Directory Server 8.1 deployment guide
NOTE:
Custom schema files should not be numerically or alphabetically higher than 99user.ldif or
the server could experience problems.
After creating custom schema files, there are two ways for the schema changes to be distributed
among all servers:
• Manually copy these custom schema files to the instance's schema directory,
/etc/opt/dirsrv/slapd-instance_name/schema. To load the schema, restart the
server or reload the schema dynamically by running the schema-reload.pl script.
• Modify the schema on the server with an LDAP client such as the Directory Server Console
or ldapmodify.
• If the server is replicated, then allow the replication process to copy the schema information
to each of the consumer servers.
With replication, all the replicated schema elements are copied into the consumer servers'
99user.ldif file. To keep the schema in a custom schema file, like
90example_schema.ldif, the file has to be copied over to the consumer server manually.
Replication does not copy schema files.
If these custom schema files are not copied to all the servers, the schema information are only
replicated to the replica (consumer server) when changes are made to the schema on the supplier
server using an LDAP client such as the Directory Server Console or ldapmodify.
When the schema definitions are replicated to a consumer server where they do not already exist,
they are stored in the 99user.ldif file. The directory does not track where schema definitions
are stored. Storing schema elements in the 99user.ldif file of consumers does not create a
problem as long as the schema is maintained on the supplier server only.
If the custom schema files are copied to each server, changes to the schema files must be copied
again to each server. If the files are not copied over again, it is possible the changes will be
replicated and stored in the 99user.ldif file on the consumer. Having the changes in the
99user.ldif file may make schema management difficult, as some attributes will appear in
two separate schema files on a consumer, once in the original custom schema file copied from
the supplier and again in the 99user.ldif file after replication.
For more information about replicating schema, see “Schema replication”.
3.4.8 Custom schema best practices
When using schema files, be sure to create schema which will be compatible and easy to manage.
3.4.8.1 Naming schema files
When naming custom schema files, use the following naming format:
[00-99]yourName.ldif
Name custom schema files lower (numerically and alphabetically) than 99user.ldif. This lets
Directory Server write to 99user.ldif, both through LDAP tools and the Directory Server
Console.
The 99user.ldif file contains attributes with an X-ORIGIN value of 'user defined';
however, the Directory Server writes all 'user defined' schema elements to the highest
named file, numerically then alphabetically. If there is a schema file called 99zzz.ldif, the
next time the schema is updated (either through LDAP command-line tools or the Directory
Server Console), all the attributes with an X-ORIGIN value of 'user defined' are written to
99zzz.ldif. The result is two LDIF files that contain duplicate information, and some
information in the 99zzz.ldif file might be erased.
3.4 Customizing the schema 35