Daylight Summer School 2000, June 7-9, Santa Fe, NM

Daylight Worksheet - Configuring databases -- with HINTS

Daylight databases are configurable in several ways. Configuration options are stored as fields in the header file for the database (the .THOR file). The header file can be edited directly, as it is a simple text file. However, the approved and more reliable method is to use a Thor-manager client (sthorman, thorchange, etc.).

  1. Auxilliary Databases - All databases have at least one auxilliary database, a datatypes database. Other possible auxilliary databases are indirect and monomer. The auxilliary databases can be set at database creation, and can be modified by sthorman or thorchange. Try changing the datatypes database of a regular database. This may make the database dysfunctional since database will no longer be defined. Change it back to correct the situation.

    % thorchange -help
    % thorchange -DATATYPES_DATABASE foobar medchem99demo
    % thordbping medchem99demo (Shouldn't work.)
    % thorchange -DATATYPES_DATABASE medchem99demo_datatypes medchem99demo
    % thordbping medchem99demo (Should work.)
    

  2. Database Passwords - Databases each have three passwords: read, write, and executive. Set all three passwords for a database and access the database to test that the passwords work. Then set all passwords to null "".

    % thorchange medchem99demo
    Enter server access password for norte:thor:jj >> 
    Enter EXECUTIVE password for database: 
    thorchange: Database opened.
     
    Changing passwords: [Return] means no change
                        "" means remove existing password
     
    Enter   READ password for database: 
    Confirm READ password for database: 
    Enter   WRITE password for database: 
    Confirm WRITE password for database: 
    Enter   EXECUTIVE password for database: 
    Confirm EXECUTIVE password for database: 
    thorchange: Done.
    
    % thordbping medchem99demo (Test passwords.)
    

  3. Read-only - Databases can be set to read-only. Set a database read-only using thorchange -SETACCESS READONLY <DB> and verify its state by attempting to open writeable with xvthor. Then revert to WRITEABLE.

    % thordbinfo medchem99demo (Note read-only status.)
    % thorchange -SETACCESS READONLY medchem99demo
    % thordbinfo medchem99demo (Note read-only status.)
    % xvthor (Attempt to open-writeable.)
    % thorchange -SETACCESS WRITEABLE medchem99demo
    

  4. Caching - Databases can be configured for caching in several ways to improve their performance (speed). Caching forces the Thorserver to hold some or all of a database in memory for fast access, and supplements the operating system's normal file caching. Modify a database's cache configuration with a command like thorchange -CACHE_WHEN ALWAYS -CACHE_LEVEL WRITETHRU<DB>. Inspect the .THOR header file to see how this is stored. Return the database to its original state with another command.

    % thordbinfo medchem99demo (Note caching status.)
    % thorchange -CACHE_WHEN ALWAYS -CACHE_LEVEL WRITETHRU medchem99demo
    % thordbinfo medchem99demo (Note caching status.)
    % thorchange -CACHE_WHEN OK medchem99demo
    % thordbinfo medchem99demo (Note caching status.)
    

Daylight Chemical Information Systems Inc.
support@daylight.com