Preparing the Mapping File

9-6 Oracle Fusion Middleware Administrators Guide for Oracle Directory Integration Platform ORACLE_HOMEldapodiconf directory. You can create the profile by using Oracle Enterprise Manager Fusion Middleware Control or following the instructions described in Creating Synchronization Profiles on page 7-1.

9.4.4 Uploading the Additional Configuration Information and Mapping Files

Use the update operation of the manageSyncProfiles command to update the additional configuration information and mapping files, as follows: Table 9–1 Directory Integration Profile for TESTDBIMPORT Attribute Value Profile Name odip.profile.name TESTDBIMPORT Synchronization Mode odip.profile.syncmode IMPORT Profile Status odip.profile.status ENABLE Agent Execution Command odip.profile.agentexecommand null Advanced Configuration Information odip.profile.configfile Maintains configuration details which are not individually maintained in LDAP attributes. Connected Directory Account odip.profile.condiraccount testdbsync Connected Directory Account Password odip.profile.condirpassword testdbsyncpwd Connected Directory URL odip.profile.condirurl machine.acme.com:1526:iasdb Interface Type odip.profile.interface DB Mapping File odip.profile.mapfile Attribute for storing mapping rules. OID Matching Filter odip.profile.oidfilter employeenumber This means that employeenumber is used to search the directory while looking for a match. If a match is found, then the directory entry is modified. Otherwise, a new entry is created. This is necessary to ensure that the orclOdipOIDMatchingFilter attribute is unique in the database also. Once a database row is retrieved, the Oracle Directory Integration Platform searches the directory for that employeenumber in the domain dc=testdbsync,dc=com according to the domain rules. If it gets a match, it updates that entry with the latest values of the columns in the row retrieved. If it does not get a match, it creates a new entry in the directory with all the attributes from the column values. Last Applied Change Number odip.profile.lastchgnum 20000101000000 This means that the first time the profile executes, it retrieves and synchronizes all four rows. Subsequently, it retrieves rows only when the LAST_UPDATE_DATE column in the table is updated to the time last modified. Synchronizing with Relational Database Tables 9-7 manageSyncProfiles update -h HOST -p PORT -D WLS_USER -pf PROFILE_NAME -file FILE_ NAME

9.4.5 Synchronization Process

In this example, the sequence of steps in the synchronization process is: 1. The Oracle Directory Integration Platform starts a new profile thread for the TESTDBIMPORT profile every time the value specified in the scheduling interval odip.profile.schedinterval attribute expires. 2. The profile thread reads the additional configuration information to get the SQL to execute, and then runs the SQL. 3. For every row retrieved from the database, the mapping rules are applied to the record, and LDAP attributes are created. 4. Depending on the OID Matching Filter odip.profile.oidfilter attribute, the Oracle Directory Integration Platform determines whether a matching entry exists in Oracle Internet Directory. If it exists, then it is updated. If not, then a new entry is created. After the directory operation, the last applied change number odip.profile.lastchgnum attribute is updated.

9.4.6 Observations About the Example

When a row is retrieved from the database, it is in the following form: EmpNum: 98357 EName: JOHN DOE UID: JOHN.DOE EMAIL: JOHN.DOEACME.COM TELEPHONE: 435-324-3455 Modified_Date: 20000102000000 After the mapping is performed on this record, the output is in the following form: dn: uid=john.doe,dc=testdbsync,dc=com uid: JOHN.DOE cn: JOHN DOE sn: JOHN DOE mail: JOHN.DOEACME.COM employeenumber: 98357 telephonenumber: 435-324-3455 objectclass: person objectclass: inetorgperson A subtree search is made in the directory with the filter employeenumber=98357 under the domain dc=testdbsync,dc=com. If the search yields an existing entry, then that entry is updated. Otherwise, a new entry is created. Because the OID Matching Filter odip.profile.oidfilter attribute is set to employeenumber, every database record retrieved must have that column. In this case, it is EmpNum as it maps to employeenumber. Any other attributes in the mapping file that are not in the data retrieved by SQL are ignored—for example, the birthday attribute. After the profile thread processes all the change records from SQL, it updates the directory with correct values for these attributes: ■ Last Applied Change Number odip.profile.lastchgnum