2.5 Selecting the eDirectory Data Source

To ODBC, the data source is the database that you are accessing. Since eDirectory is a hierarchical, distributed database, the Novell ODBC Driver for NDS allows you to select the NDS tree or trees you want to access, and within the tree, the NDS context or contexts you want to use as data sources. Each tree and each point within a tree are configured as a different data source.

This allows you great flexibility. You will want to configure at least one NDS data source for each NDS tree or specific context that you want to query. The data source determines from which NDS containers the driver can gather information. If the data source uses the root container as its context, information can be gathered from the entire NDS tree. If the data source uses a child container as its context, the driver can gather information only from that branch of the NDS tree.

You can have different data sources for different trees and contexts in the database. For example, you can specify a data source for your whole directory tree, another for a Organizational Unit object in the tree, and another for an Organization object in the tree. All three would use the Novell ODBC Driver for NDS, but each would have a unique data source name (DSN) and abstract a unique scope within the directory. If your organization has multiple NDS trees, you can specify multiple data sources for each NDS tree.

The ODBC Data Source Administrator requires four pieces of information to create a data source: name, description, NDS tree, and NDS context. The Novell Data Source Setup dialog box allows you to browse and select an NDS tree, and from the NDS tree, to browse and select an NDS context.

The Windows ODBC Data Source Administrator dialog box allows you to view a list of the configured data sources and add, delete, and modify the data source names. It allows you to select the Novell ODBC Driver for NDS, which opens the Novell Data Source Setup dialog box. Once this Novell dialog box is open, you can enter a DSN and configure the NDS context of the data source. When you install the Novell ODBC Driver for NDS, the installation program automatically installs a default data source to the NDS context that you were using during installation.

Once you have created a data source with a unique name, applications can view this as another repository of relational database information. The directory can now be viewed and used in standard reporting applications. To retrieve and order this information, you can embed SQL requests in your application, or use applications that automatically generate SQL statements for reporting directory information.

To select the default data source, complete the following steps:

  1. Start your SQL application.

  2. Connect to the Novell ODBC Driver for NDS.

  3. From the data source window, select the "Default NDS Data Source".

To add, modify, or delete a data source, see one of the following:

2.5.1 Adding an eDirectory Data Source

For a given driver you can create multiple data sources. For example, if you have several network trees, you can create one data source for each tree, or you can select multiple contexts within a tree and create a data source for each context. All data sources uses the same ODBC driver but will have a unique DSN (data source name).

Follow these steps to add a new data source, select a driver, and name the data source:

  1. Select Start > Settings > Control Panel > 32BIT ODBC (or just ODBC on Windows NT).

    The ODBC Data Source Administrator dialog box in Windows opens.

  2. Select the USER DSN tab. Click the Add button.

    The Create New Data Source dialog box opens, displaying a list of drivers.

  3. Double-click the Novell ODBC Driver for NDS driver in the list.

    The NDS ODBC Driver dialog box will open.

  4. Enter a Name and Description for the new data source.

  5. To use your current NDS context for the data source, select the Use Default NDS Context button and skip to Step 7. To select the NDS context for the data source, deselect the Use Default NDS Context button.

    The NDS tree view window will activate.

  6. Select the NDS tree and context from the tree view in the list box.

  7. Select OK.

    The ODBC Data Source Administrator lists the new data source.

NOTE:These steps can be accomplished in a different order depending on the version of ODBC Administrator installed on your machine. This example is based on the 32-bit ODBC administrator supplied with ODBC version 3.0. In earlier versions, click the Add button to select a data source list.

2.5.2 Deleting an eDirectory Data Source

Follow these steps to remove a data source from the Data Source Administrator dialog box:

  1. Select the data source to be deleted from the ODBC Data Source Administrator dialog.

  2. Click the Remove button.

You will be prompted to verify the deletion before the DSN is removed from the list.

2.5.3 Modifying an eDirectory Data Source

You can change your mind and alter the configuration of a data source in the administrator dialog box. This allows you to reuse the DSN (Data Source Name) and redefine the tree or organization unit.

Follow these steps to modify a new data source for an existing Data Source Name.

  1. Double-click an existing data source name in the Data Source Administrator dialog box.

    The NDS ODBC Driver dialog will open with Name, Description, and the current data source displayed.

  2. Select a new tree and context data source from the Database Details list box.

  3. Click OK.

The DSN remains in the list, but will now have a new configuration of entry class definitions.