Enterprise Software

Speed NDS searches with Catalog Services

The quickest way to find information in an NDS tree that has thousands of objects is by using Catalog Services. John Sheesley shows how Catalog Services saves you time in this Daily Drill Down.


It’s easy to administer an NDS tree that only has a few dozen objects. You can group everything in one Organizational Unit and find all of the NDS objects you want to deal with there. Unfortunately, most NDS trees aren’t this basic. Even in a medium-size organization, an NDS tree can contain hundreds, if not thousands, of objects, within several Organizational Units.

That’s where Catalog Services comes in. You can use Catalog Services to make it easier and quicker to find NDS objects, saving you the time and hassle of sorting through hundreds of irrelevant objects. In this Daily Drill Down, I’ll explain how to take advantage of Catalog Services.

How Catalog Services does its work
Let’s say you want to find out the address and telephone number of a particular user on your network. NDS is a good place to store such information, but finding it can be a pain. You start NetWare Administrator and then navigate your way through each Organization and Organizational Unit object in your tree, searching for the user object. Then, you have to double-click the object to open it and find the information. Alternatively, you can use NetWare Administrator’s search feature by selecting Search from the Object menu. This causes NetWare Administrator to search the NDS tree for you, but it can still be very slow because NetWare Administrator checks the values of every object in the tree.

Catalog Services can create catalogs of NDS objects. The NDS catalogs that Catalog Services creates are nothing more than flat file databases of information about objects in your NDS tree. A catalog can contain information from an entire NDS tree or a portion of the tree. The catalog doesn’t actually contain the entire object itself; it only contains selected information about the object.

You get to pick and choose which objects’ information and properties appear in the catalog. You’re not limited to only creating a catalog based on user IDs and telephone numbers. You can create catalogs that contain group and file system rights, for example. Such a catalog would come in handy if you wanted to find out exactly who is granted rights to a given directory. You can also create as many catalogs as you want in your NDS tree.

Some parts of Catalog Services run on your server; others run from your administrative workstation. The server component of Catalog Services consists of the dredger. The dredger, DSCAT.NLM, runs on the server and searches NDS for the object and property information you want to appear in the catalog. As you make changes to objects in your NDS tree, the dredger collects the changes and updates the catalog. Usually, the dredger runs on a daily basis, but you can change that frequency.

Workstation components of Catalog Services are actually NetWare Administrator snap-ins. The Dscqry16.dll and Dscqry32.dll DLL snap-ins run the Catalog Services query engines, which help NetWare Administrator query the NDS database and build the catalogs. Another NetWare Administrator snap-in, Dscatmgr.dll, allows you to administer Catalog Services from within NetWare Administrator. With it you can create, modify, query, index, and delete Catalog objects.

Master and slave catalogs
Every time you create a new catalog, you first create a master catalog. The master catalog contains all of the information you want the catalog to store. Slave catalogs are optional catalogs that mirror the information found in the master catalogs. The dredger places information into the master catalog, which then replicates the information to the slave catalog.

You’ll usually use slave catalogs if you have servers in multiple locations, in which case the slave catalogs will reside on those remote servers. Using slave catalogs in remote locations rather than master catalogs at all locations speeds catalog creation and minimizes NDS replication traffic.

Installing Catalog Services
Catalog Services installs as a part of NetWare’s basic installation routines, so you shouldn’t have to worry about installing it. You can verify that Catalog Services is running on your computer by checking the installed products on your server. To do so, go to the server’s console prompt, type load nwconfig, and press [Enter]. When the Configuration Options menu appears, select Product Options and press [Enter]. Next, select View/Configure/Remove Installed Products. When the Currently Installed Products menu appears, check the list to find NDS Catalog Services.

If Catalog Services is installed, exit NWConfig and check to make sure the Catalog Services NLM is loaded and running. To do so, type modules dscat from the server’s console prompt. You should see information for DSCAT.NLM appear after your console prompt. If you don’t, you must load the NLM by typing load dscat at the NetWare server console prompt.

If Catalog Services isn’t installed, you can install it by first choosing Product Options from the Configuration Options menu and then choosing Install A Product Not Listed. Press [F3] to specify a new path. When the Specify A Different Path screen appears, type the path to your server’s CD-ROM drive and place the NetWare CD in the drive. After a few files copy to your server, the NetWare GUI installation screen will appear. On the Other Products And Services screen, check the box next to NDS Catalog Services and click OK. Next, you’ll see the Products To Be Installed screen with the NDS Catalog Services choice selected. Click Finish to install the files. After the files have been copied, click No when asked whether you want to reboot the server. After the installation is complete, you must load the Catalog Services NLM using the process described above.

Creating master catalogs
After you’ve made sure the dredger is loaded on your server, you can start creating catalogs. As mentioned above, you create catalogs from your administrative workstation using NetWare Administrator. Before you begin creating catalogs, log in as Admin or as a user with the Supervisor file right and the Write right to the Catalog List property to the server that’s running the dredger of the NetWare Server object.

After you log in, launch NetWare Administrator and navigate the tree until you find the container where you want to create the Catalog object. Right-click the container and select Create. When the New Object window appears, select the NDSCat:Master Catalog icon and click OK.

You’ll then see the Create Catalog window. Enter the name for your catalog in the Catalog Name field. Try to make the catalog’s name descriptive so it will be easier to use in the future. Check the Define Additional Attributes check box and click Create.

You’ll see the properties notebook for the new catalog object appear, as shown in Figure A. In this notebook, you’ll configure the catalog to store the object information you’re interested in.

Figure A
The properties notebook controls how you configure the catalog.


First, you must choose a host server, the server that’s running DSCAT.NLM and populates and updates the master catalog you’re creating. Type in the server's NDS Complete Name, such as brain.tpg.techrepublic. If you don't know the name of the server, you can browse the NDS tree to find the server by clicking the … button next to the host server field.

Next, you must make the Catalog object security equivalent to another object so that the catalog has rights to browse the tree. You don’t have to use the Admin user object, but it may be convenient to do so. To set security equivalency, click the … button next to the Security Equals field and select the object you want to use.

After you’ve set security for the catalog, enter information in the Description, Location, Department, and Organization fields for the master catalog. All of these fields are optional, but they’ll help you identify the catalog in the future. This can be important if you create several catalogs and want to quickly determine the information stored in the catalogs.

Next, label the catalog. Click New in the Label box. When the Label window appears, enter values in both the Primary and Secondary fields and click OK. These labels help you identify the catalog; applications and administrators can also use the labels to identify which catalog to use. (Multiple applications can share the same catalog.) Try to make the label descriptive.

You can use the other tabs in the properties notebook for the catalog object to further configure the way the catalog will work. If you click the Filter tab, shown in Figure B, you can customize your catalog to include specific objects. You can also control where in the NDS tree the dredger searches and what it is to do as a result of a failure.

Figure B
You can control the type of information stored in the catalog.


The Filter field controls the attributes that appear in the catalog. If you leave it blank, the catalog will include information about every object in the NDS tree. If you wanted to limit the catalog to only include user objects, you’d type “object class” = “user” in the Filter field. As you can see in the example above the field (in Figure B), you can specify any attribute value with any attribute name using the example’s syntax. You can view a list of available attribute names by clicking on the Attributes/Indexes tab and clicking Select Attributes. The most common attribute you’ll use is “object class”, but you can choose literally hundreds of attributes. Each attribute name has its own attribute values. For example, valid attribute names for object class include user, server, and group.

You can create multiple attribute filters by using conjunctions such as & (and) and | (or). So, if you wanted a catalog to include all users in the Sales group, you’d type “object class” = “user” & “group membership” = “sales” in the Filter field.

The Scope box allows you to control where in the NDS tree the catalog looks for its information. By default, the catalog searches every subordinate branch of the NDS tree where you’ve created the catalog. So, if you create the catalog at the root of your NDS tree, the catalog dredger will fill the catalog with information from the entire tree. If you locate the catalog in an OU, the dredger will only look at objects in that OU and any subordinate OUs.

If you want to choose specific contexts, click the … button and select the specific contexts you want to search. You can choose as many contexts as you want. If you select the Search Subtree radio button, the dredger will look in all branches of the NDS tree below the contexts you’ve selected. If you select Search Immediate Subordinates, it will only look in the current contexts.

The Search Retry Values fields control how the dredger reacts to problems with NDS. You can control the number of times the dredger will retry to access NDS if it encounters a problem and how long it will wait between retries.

The Schedule tab, shown in Figure C, controls how the dredger gathers its information. By default, the catalog is set to Manual, which means you must click the Update Now button to make the dredger gather information for the catalog. You can automate the dredger by selecting Automatic. Then, you can tell the dredger how often to dredge for information and when to start. Just change the values in the Frequency, Start Time, and Start Date fields.

Figure C
You can control how often the dredger gathers information for the catalog.


The Attributes/Indexes tab, shown in Figure D, controls which attributes will appear in the catalog. By default, the catalog includes every attribute in the NDS tree. You can limit it by selecting Selected Attributes. Then, click the Select Attributes button and choose attributes from the Select Attributes window.

Figure D
The Attributes/Indexes tab controls which attributes appear in the catalog.


After you’ve set all of the basic information for the catalog, click OK to save it. You can then start querying the catalog.

Querying the catalog
To query the catalog, you first run the dredger. If you set the catalog’s schedule to Manual, you should go into the object’s properties page, select the Schedule tab, and click Update Now. This will ensure the latest information is in the catalog.

After you’ve done that, select Query Catalog from the Tools menu in NWAdmin. This will display the Query Catalog window, shown in Figure E. Enter the attributes you want to search for in the Attribute Names field and any specific expressions in the Where field. Click Query to start the query. Results will appear in the Query Results window.

Figure E
After you create the catalog object, you can query it.


Conclusion
Finding information in a large NDS tree can be problematic and slow, but Catalog Services can help speed this process. Once you get the hang of creating and querying catalogs, you’ll be amazed at how quickly you can sort through thousands of NDS objects.

Editor's Picks