Invoke Oracle Directory Services Manager and connect to the Oracle Internet From the task selection bar, choose Schema.

20-18 Oracle Fusion Middleware Administrators Guide for Oracle Internet Directory ■ Adding a New Attribute to an Auxiliary or User-Defined Object Class by Using Command-Line Tools ■ Modifying Object Classes by Using Command-Line Tools ■ Adding and Modifying Attributes by Using ldapmodify ■ Deleting Attributes by Using ldapmodify ■ Indexing an Attribute for Which No Data Exists by Using ldapmodify ■ Dropping an Index from an Attribute by Using ldapmodify ■ Indexing an Attribute for Which Data Exists by Using the Catalog Management Tool ■ Adding a New Attribute With Attribute Aliases by Using the Command Line ■ Adding or Modifying Attribute Aliases in Existing Attributes by Using the Command Line ■ Deleting Attribute Aliases by Using the Command Line ■ Using Attribute Aliases with LDAP Commands ■ Managing Content Rules by Using Command-Line Tools ■ Viewing Matching Rules by Using ldapsearch ■ Viewing Syntaxes by Using by Using ldapsearch Viewing the Schema by Using ldapsearch You can write the schema to a file by typing: ldapsearch -h OID_host -p OID_port -q -L -D cn=orcladmin \ -b cn=subschemasubentry -s base objectclass= schema.ldif Adding a New Object Class by Using Command-Line Tools In this example, an LDIF input file, new_object_class.ldif, contains data similar to this: dn: cn=subschemasubentry changetype: modify add: objectclasses objectclasses: 2.16.840.1.113894.9999.12345 NAME myobjclass SUP top STRUCTURAL MUST cn sn MAY telephonenumber givenname myattr Be sure to leave the mandatory space between the opening and closing parentheses and the object identifier. To load the file, enter this command: ldapmodify -D cn=orcladmin -q -h myhost -p 3060 -f new_object_class.ldif This example: ■ Adds the structural object class named myobjclass ■ Gives it an object identifier of 2.16.840.1.113894.9999.12345. ■ Specifies top as its superclass ■ Specifies cn and sn as mandatory attributes Managing Directory Schema 20-19 ■ Allows telephonenumber, givenname, and myattr as optional attributes Note that all the attributes mentioned must exist before the execution of the command. To create an abstract object class, follow the previous example, replacing the word STRUCTURAL with the word ABSTRACT. Adding a New Attribute to an Auxiliary or User-Defined Object Class by Using Command-Line Tools To add a new attribute to either an auxiliary object class or a user-defined structural object class, use ldapmodify. This example deletes the old object class definition and adds the new definition in a compound modify operation. The change is committed by the directory server in one transaction. Existing data is not affected. The input file should be as follows: dn: cn=subschemasubentry changetype: modify delete: objectclasses objectclasses: old value - add: objectclasses objectclasses: new value For example, to add the attribute changes to the existing object class country, the input file would be: dn: cn=subschemasubentry changetype: modify delete: objectclasses objectclasses: 2.16.840.1.113894.9999.12345 NAME country SUP top STRUCTURAL MUST c MAY searchGuide description - add: objectclasses objectclasses: 2.16.840.1.113894.9999.12345 NAME country SUP top STRUCTURAL MUST c MAY searchGuide description changes To load the file, enter this command: ldapmodify -D cn=orcladmin -q -h myhost -p 3060 -f new_attribute.ldif Modifying Object Classes by Using Command-Line Tools To add or modify schema components, use ldapmodify. Adding and Modifying Attributes by Using ldapmodify To add a new attribute to the schema by using ldapmodify, type a command similar to the following at the system prompt: ldapmodify -D cn=orcladmin -q -h host -p port -f ldif_file_name The LDIF file contains data similar to this: dn: cn=subschemasubentry See Also: The ldapmodify command-line tool reference in Oracle Fusion Middleware Reference for Oracle Identity Management