Setting Up the Search List and Order
As explained in
About the Database Search List, your template-based product stores in its search list, all the databases currently defined in your configuration files. When you request a file from the databases, your template-based product uses a defined search order to search the databases for the requested file.
Note: | By default, your template-based product doesn't search all defined databases when it cannot locate a file. You can, however, re-enable the searching by setting the MDI_CDB_SEARCH environment variable to yes. In the Command Navigator, you can issue the following command: variable set variable_name=do_search & integer_value=(putenv("MDI_CDB_SEARCH","yes")) For more information, see the Adams Car release notes. |
See the following topics to learn more about the search order, how it impacts you, and how you set it up:
About Search Order
During a session, you can have many databases listed in the search list. Your template-based product assigns to each database in the search list a numerical value representing its place in the search order. For example, if there are three databases in your search list, your template-based product numbers them 1, 2, and 3, with 1 representing the first database it searches.
When you request a file, such as a property file, your template-based product searches the databases in the specified search order. It first tries to open the file as specified. If the filename has a database alias, your template-based product expands it to a full file system path.
If your template-based product cannot find the file in the specified database, it begins searching the other databases in its search list in the search order. Your template-based product begins with the first database in the search order. It continues through all the databases in the search order until it finds a matching filename.
Your private configuration file sets the search order of these databases, but you can change it at anytime during a session.
Note that in many cases changing the database search order can cause your template-based product to find a different file. For example, if two databases contain a file with the same name but with different data, changing the search order may change which file your template-based product uses. You may find this helpful in many cases, but it can produce unintended results when you change the search order without realizing that you can access different files. The database search order is also important if you specify the database path incorrectly.
To avoid using the search order to find a file, which can result in longer searches and unintended results, you can specify the database name (its alias) directly in the associated property file to ensure that your template-based product searches the correct database.
You can look at the search order of the databases in the search list using the
Database Info command, as shown in
Viewing Database and Table Information. Your template-based product displays the current list of databases, showing the search order level of each database in the first column.
Learn about displaying database information.
Adding Databases to the Search List
As you are working with your template-based product, you can add databases to the current search list. Your template-based product adds the databases to the end of the search order.
Learn about changing the search order.
To add a database to the search list:
1. From the Tools menu, point to Database Management, and then select Add to Search.
3. Select OK.
Removing Databases from the Search List
You can remove a database from the search list so that your template-based product does not search for files in it. Removing a database from the search list does not remove the database from the file system.
If you want to remove the current default writable database from the search list, you must first specify another database as the
default writable database.
To remove a database from the search list:
1. From the Tools menu, point to Database Management, and then select Remove from Search.
3. Select OK.
Changing the Search Order
You can change the order in which your template-based product searches databases for files.
Learn about search order.
To change the search order:
1. From the Tools menu, point to Database Management, and then select Change Search Order.
3. Select OK.