Tip, May 2003

Keeping track of usage of your textbases

Since Version 5.2, Inmagic® DB/TextWorks® has included two very useful features: enhanced logging and slot files. Of course, these features are also available to you if you have Content Server.

Enhanced logging

Enhanced logging enables you to keep relatively detailed historical records of usage of your textbases: who has been using them and what operations have been carried out.

In other words, the sort of information that is produced by enhanced logging file can be used to improve your marketing activities. If you can see from your log files that only certain people are using a textbase, you can think about marketing that textbase to other users, or perhaps you can think about changing something about the textbase to make it more attractive to other users. Likewise, if you can use your log files to demonstrate that your textbases are well used, that information can be very handy in making a case for your service's continued funding – or even increased funding!

From a purely technical point of view, it is also sometimes invaluable to be able to refer back to your log file in order to see which records were created, deleted or amended in a particular time period – especially if something like a corruption has occurred and you need to know which records have been used since the corruption took place.

Setting up enhanced logging is not difficult. If you are using DB/TextWorks version 5.2 or later or any version of CS/TextWorks, your textbases all have an INI file. For example, a textbase called MEMBERS has an INI file called MEMBERS.INI that is located in the same folder as the textbase itself. Open this file in a text editor (for example, Wordpad or Notepad). Insert the following lines in the file:

     [LogFile]
     Details=3

Note that the line that reads "Details=3" can be set as follows:

     Details=0 - no enhanced logging, or
     Details=1 - logs when a user opens or closes the textbase, or
     Details=2 - logs when a user modifes records (and opens/closes textbase), or
     Details=3 - logs when a user opens/closes a record in an edit window (and opens/closes textbase or modifies records)

Obviously, the last option is the most useful.

The README.HTM file that comes with your TextWorks software gives the following lines as an example of the kind of data that the log file might contain if you have set it to "Details=3":

     12/7/2001 9:52:53 AM: Textbase opened using slot 2 - Inmagic DB/TextWorks: LIBRARY:lisa
     12/7/2001 9:53:04 AM: Record 7460 locked - Inmagic DB/TextWorks: LIBRARY:lisa
     ID: 7529
     12/7/2001 9:53:49 AM: Record modified (deferred) - Inmagic DB/TextWorks: LIBRARY:lisa
     ID: 7529
     12/7/2001 9:53:50 AM: Record 7460 unlocked - Inmagic DB/TextWorks: LIBRARY:lisa
     ID: 7529
     12/7/01 9:55:43 AM: Record 7460 locked - Inmagic DB/Text PowerPack: ITDEPT:SYSTEM
     ID: 7529
     12/7/01 9:55:44 AM: Update posted by DB/Text Updater
     ID: 7529
     12/7/01 9:55:44 AM: Record 7460 unlocked - Inmagic DB/Text PowerPack: ITDEPT:SYSTEM
     ID: 7529

Note that this file will be added to each time you or anyone else searches or edits in the textbase. From time to time, you might like to open the file and delete all but the most recent data.

Slot files

Slot files enable you to see precisely which users are in a particular textbase right now. This option is off by default. The two lines that turn it on are:

     [Advanced]
     EnableSlotLog=1

If you include these two lines in your DBTEXT.INI file (for DB/TextWorks) or your INMCSRV.INI file (for Content Server), the setting affects all textbases. If you include them in a textbase INI file (such as the MEMBERS.INI file mentioned above), you affect only that textbase. This option will also affect WebPublisher PRO, assuming it has full rights to the file. If you set the option in the DBTEXT.INI or INMCSRV.INI file, the file must be located in the WEBPUB directory for DB/Text® WebPublisher PRO or the ICSWEB directory for CS/WebPublisher PRO.

When this option is on, every time someone opens the textbase, TextWorks writes to the textbase .SLT file. This file has the same name and folder as the textbase. For example, a textbase named MEMBERS would have a slot file called MEMBERS.SLT. The line in the file shows:

     <the slot in use>: <the program used to open the textbase> <the machine name>:<the user name>

The example given in the README.HTM file is:

     Slot 2: Inmagic DB/TextWorks LIBRARY:lisa

When the user closes the textbase, the line in the .SLT file is cleared.

You can open this file with a text editor to see who has the textbase open at any given time – very handy if you are trying to back up or edit the textbase structure!



Maxus Australia Pty Ltd - Contact us for any further information or other hints.