To create an Optim™ directory, you must provide the name, the database that hosts the directory, and connection information for the database. After you create the directory tables, the Configuration program creates packages, plans, or procedures and a Windows registry entry that allows the workstation to access the directory. You must create the Optim Directory in one of the following databases: Oracle, SQL Server, or DB2® for Linux, UNIX, and Windows. You can create DB Aliases for other supported databases, as well as these databases, but you cannot put the Optim Directory in them. For example, you can create DB Aliases to process data for the following data sources, but cannot put the Optim Directory in them: Informix®, Sybase ASE, DB2 for z/OS®, Teradata, Netezza®, PostgreSQL, and Hive (for Hadoop).
The first step in creating an Optim directory is to name it. Use the Configure First Workstation - Specify Optim Directory dialog to name or select the Optim directory.

The Specify Optim Directory dialog includes the following options. You must select an option, enter a directory name, and click Proceed to open the next dialog.
If no registry entry for the directory exists for the workstation, the default name, OPTIMDIR, is shown. You can use this name or enter a different name for the new directory (1 - 12 characters, no embedded blanks).
Before you can create directory tables, the database instance for the directory must exist; that is, it must be configured under a database management system. To create a directory, you must identify the DBMS type and version on the Specify Optim Directory DBMS dialog.

When the dialog opens, the Optim Directory Description, Type, and Version might be populated with previously entered information. The Specify Optim Directory DBMS dialog includes the following items:
You must create the Optim Directory in Oracle, SQL Server, or DB2 for Linux, UNIX, and Windows. You can create DB Aliases for other supported databases, as well as these databases, but you cannot put the Optim Directory in them.

Select the appropriate option and click Proceed to open the next dialog.
The Configuration program must connect to the database to create the directory tables and packages, plans, or procedures. To enable this connection, you must provide a valid user ID, password, and connection string.
The user ID must have the DBMS privilege to create the directory tables and to catalog the packages, plans, or procedures under the appropriate table identifier. Later, this workstation can access the directory by using the same identifier or a different identifier with a, perhaps, lower level of authorization.
Use the Connect to Database dialog to provide the connection information that allows the configuration program to connect to the database and configure the directory tables.

The Connect to Database dialog provides the previously entered directory name and prompts for the following database connection parameters:
The following table shows examples of the type of Connection Strings you can specify for each DBMS.
| DBMS | Connect String Example |
|---|---|
| DB2 | Database name or alias. |
| Oracle | Connection string or host string. |
| SQL Server | Data source name (DSN) or server. |
If you specify a user ID that is associated with another directory in the same database, you are prompted for a different ID.

After the workstation is connected to the database, you can create the directory. The configuration program names the tables automatically. You must provide the identifier (Creator ID, Owner ID, or Schema Name) and the database table space for each table, however. You can create the directory tables in a unique table space or in a table space with other database tables. You can also specify the table space for tables, individually or as a group, and browse the DDL generated to create the directory tables. The Create Optim Directory Tables dialog prompts you for the information to create these tables.

The Create Optim directory Tables dialog includes the following items:
For an Oracle database, the schema name must not be SYS or a name of a directory table such as, PSTDBA2, PSTPK2, PSTREL2, or PSTPT2.
After the directory tables are created, the configuration program automatically creates the packages, plans, or procedures that are used to access them. If you are creating the directory in an Oracle database, the Create/Drop Packages dialog is displayed. If you are using SQL Server, the same general dialog is displayed as Create/Drop Stored Procedures. However, if DB2 for Linux, UNIX, and Windows is the DBMS for the directory, the Configuration program displays the Bind/Drop Plans dialog. See Bind/Drop Plans.

The Create/Drop Packages dialog includes the following items:

When you create a directory in a DB2 for Linux, UNIX, and Windows database, the configuration program prompts for authorization information by using the Bind/Drop Plans dialog.

The elements in the Bind/Drop Plans dialog are similar to elements described for Create/Drop Packages with the following exception:
If the Optim solution supports Unicode or multibyte data for the DBMS (except Microsoft SQL Server), you must indicate the character format for the directory.
If you are creating a directory in a Unicode database, you are prompted to indicate whether the directory data is kept in Unicode format. The prompt is displayed on the Keep Optim Directory in Unicode Format dialog.

If the directory is in a DB2 for Linux, UNIX, Windows database, a dialog indicates that DB aliases for DB2 databases must use the same character format.
When you create a directory, you are prompted to indicate the format in which the directory stores data: single-byte, Unicode, or multibyte. The character sets of the DBMS client and the database server must match your selection.

If you select Unicode format on the Specify Character Set of Optim Directory Data dialog, you are prompted to acknowledge the following character set requirements:

If you select multi-byte format on the Specify Character Set of Optim Directory Data dialog, you are prompted to acknowledge the following character set requirements:

After you acknowledge the multibyte character set requirements for a directory, you are prompted to acknowledge multibyte round-trip conversion issues.
Your Optim solution uses the Unicode character set in dialogs and to process data. In some multibyte character sets (such as Oracle JA16SJIS), multiple characters are mapped to one Unicode character, multiple Unicode characters are mapped to one multibyte character, or both mappings occur. When these characters are converted from Unicode to multibyte and back or multibyte to Unicode and back, the original character might not be returned. This two-way conversion is considered a round trip and identifies this situation. To avoid round-trip issues with multibyte data, ensure that your source data does not include multibyte characters that can result in ambiguous conversions.
Personal and product options determine how round-trip conversion issues are handled when processing data in a multibyte database.

The Configuration program creates a registry entry on the Windows workstation that is used to access the directory. For subsequent access to the directory from the workstation, you can use the Connect to Database dialog to specify a different user ID and password. (You can modify these entries when you configure Personal Options.)