(c)Copyright Nadezhda Company 1995.
All rights reserved.

---------------------------------------------------------------

      LDBF CONFIG FILE PARAMETERS DESCRIPTION  (LDBF.CONF)


NOTES

Each of these parameters may specified more than once.

---------------------------------------------------------------
group_allow = (0|1)

  Description:This paramaeter if set to 1 allows users with same group id 
   as administrator runs ldbfmonitor.If set to 0 administrator can
   run ldbfmonitor only.

---------------------------------------------------------------
shadow = (0|1)

  Description:Specifies how check user passwords.If system supports
   shadow passwords(/etc/shadow or other) set it to 1.
   

---------------------------------------------------------------
empty_tts = (1|0)

  Description:if 1 transaction log files will be emptied 
    after each commit.If you want inspect transaction log
    files set this parameter to 0.

---------------------------------------------------------------
log_new = (1|0)

   Description:When set to 1 all log files will be 
     overwritten every time server started.
     If you want to save log files set log_new to 0

---------------------------------------------------------------
log_level = (0..9)

  Description:If set to 0 no information will be written to log
    files.

---------------------------------------------------------------
flush_count = n

  Description:Determines number of updates after each
    table will be flushed.

---------------------------------------------------------------
use_fsync = (0|1)

  Description:If you want guaranties that data was writing on disk
   set it to 1.Server will  use system call fsync for each flushing.
   But this may be cause of slowness of your server.

---------------------------------------------------------------
exclusive = (1|0)

  Description:If set to 1 this parameter specify server to open all
    tables in exclusive mode.It useful if no program accessing
    the same datafiles.If set to 1 performance will be increased
    because no locks are made.

---------------------------------------------------------------
optimize = (0|1)

  Description:If set to 1 server allocated more memory for cache.
    Performance will increase in this case.

---------------------------------------------------------------
alias
   
  Syntax:  alias ALIAS = table_PATH

  Description:Parameter alias defines short(nickname) name for table.
     You may access table by alias only.If you want anybody
     open table, put alias parameter for this table in the
     ldbf.conf file first.

  Example:
      alias bucks=bucks
      alias names=/tmp/names

---------------------------------------------------------------
access_allow
  
   Syntax: access_allow = USERNAME[@HOST][,USERNAME@HOST]...

   Description:This parameter specifies users that have access to server.
     If hostname missing user with username may login from any host.
     In order to specify entire domain, HOST must begins with '*'.

  Example:
     access_allow=vlad,joy@hostname
     # permit access to all from domain kharkov.ua
     access_allow=@*kharkov.ua

---------------------------------------------------------------
open_deny

   Syntax: open_deny = ALIAS,USER[,USER[@HOST,.......]

   Description:This parameter specifies who can't open 
     specified table.Users may be specified as user name only or
      in the form username@hostname.In order to specify entire domain, 
      HOST must begins with '*'.

   Example:
     open_deny=names,sasha,joy@torn
     open_deny = bucks, sasha

---------------------------------------------------------------
open_deny_except

   Syntax: open_deny_except = ALIAS,USER[,USER[,.......]

   Description:This parameter specifies who can't open 
     specified table.
     All users except specified cannot open this table.
     In order to specify entire domain, HOST must begins with '*'.

   Example:
     # only sasha and joy may open table names
     open_deny_except=names,sasha,joy@torn

---------------------------------------------------------------
read_only
  
  Syntax:read_only=ALIAS,USER[,USER,...]

  Description:This parameter specifies read only access for 
    table.

  Example:
    read_only=names,vlad@torn,joy
    read_only=bucks,joy

---------------------------------------------------------------
read_only_except
  
  Syntax:read_only_except=ALIAS,USER[,USER,...]

  Description:This parameter specifies read only access for 
    table.For all users except specified this tbale will be opened in
    read only mode.
    In order to specify entire domain, HOST must begins with '*'.

  Example:
    read_only_except=names,vlad@torn,joy

---------------------------------------------------------------
create_allow
 
  Syntax: create_allow = USER[,USER,...]

  Description:This parameter specifies users who can create 
     tables.By default users cannot create and delete tables.
     In order to specify entire domain, HOST must begins with '*'.
 
  Example:
    create_allow = vlad,joy@torn
---------------------------------------------------------------
drop_allow
 
  Syntax: drop_allow = USER[,USER,...]

  Description:This parameter specifies users who can  
      delete tables.By default users cannot create and delete tables.
      In order to specify entire domain, HOST must begins with '*'.
 
  Example:
    drop_allow = vlad,joy@torn

---------------------------------------------------------------
exchange_allow

  Syntax: exchange_allow = USER[,USER,...]

  Description:This parameter specifies users who can use exchange
     feature of LDBF.By default users cannot do it.See function.doc
     for ldbfExchange command.
     In order to specify entire domain, HOST must begins with '*'.

  Example:
   exchange_allow = vlad

---------------------------------------------------------------
append_deny

   Syntax: append_deny in ALIAS { condition }
     where condition is any valid SLang condition including
     calls of any SLang functions.

   Description:This rule refuses append if condition become true and
        error will be returned to user.

   Example:
     append_deny in names { (
      (not(strcmp(ldbfStr("names","name"),"Scott"))) and
      (ldbfLong("names","age") > 40)
      ) }
     This rule doesn't allow append record in the table names
     if field name contain "Scott" and its age more than 40.
    
---------------------------------------------------------------
update_deny

   Syntax: update_deny in ALIAS { condition }

   Description:This rule refuses update if condition become true.

   Example:

      update_deny in names { (
       (ldbfLong("names","age") == 0) or
       (ldbfLong("names","age") < 20)
       ) }

     This rule doesn't allow update records in the table names
     when age is equal to zero or less then 20.

---------------------------------------------------------------
delete_deny

   Syntax: delete_deny in ALIAS { condition }

   Description:This rule refuses delete if condition become true.

   Example:
      delete_deny in names {
        (ldbfLong("names","age") < 40 ) }
     Don't permit deletion persons with age less then 40.
     

---------------------------------------------------------------
after_append
  
  Syntax: after_append in ALIAS call PROCEDURE { condition }

  Description:This rule execute SLang procedure PROCEDURE 
     after append in the table ALIAS only if appended record 
     satisfies given condition.PROCEDURE may be file with extension
     .sl or name of function defined in ldbf.sl startup file.

  Example:
      % call file check_append.sl
      after_append in names call check_append.sl {
        (ldbfLong("names","age") < 25) }
      % call function check_append from ldbf.sl
      after_append in names call check_append {
        (ldbfLong("names","age") < 25) }

    Call check_append.sl file if record has appended with age < 25.

---------------------------------------------------------------
after_update

  Syntax: after_update in ALIAS call PROCEDURE { condition }

  Description:This rule execute file PROCEDURE after update if
     updated record satisfies given condition.
     PROCEDURE may be file with extension .sl or name of 
     function defined in ldbf.sl startup file.

  Example:
     after_update in names call check_update.sl {
       (ldbfLong("names","age") < 25 ) }

     % call function check_update from ldbf.sl
     after_update in names call check_update {
       (ldbfLong("names","age") < 25 ) }


---------------------------------------------------------------
after_delete

  Syntax: after_delete in ALIAS call PROCEDURE { condition }

  Description:This rule execute file PROCEDURE after deletion
      in the table ALIAS if condition is true.     
      PROCEDURE may be file with extension .sl or name of 
      function defined in ldbf.sl startup file.


  Example:
    after_delete in names call check_delete.sl {(1)}

    %This rule will call check_delete.sl after each deletion in the
    %table names.

---------------------------------------------------------------
procedure

   Syntax: procedure = PROCEDURE_NAME,PROCEDURE_PATH

   Description:This is definition of stored procedure that may 
    be called by users.Procedures defined in the ldbf.conf file
    may be called only.
    PROCEDURE_PATH may be file with extension .sl or name of 
    function defined in ldbf.sl startup file.

   Example:
      procedure = check_append,check_append.sl
      procedure = check_delete,check_delete.sl
      procedure = check_update,check_update


---------------------------------------------------------------
call_deny

   Syntax: call_deny = PROCEDURE_NAME,USER[,USER..]

   Description:This parameter defines who cannot call specified
    stored procedure.
    In order to specify entire domain, HOST must begins with '*'.

   Example:
      call_deny = check_append,vlad,joy@space


---------------------------------------------------------------
call_deny_except

   Syntax: call_deny_except = PROCEDURE_NAME,USER[,USER..]

   Description:This parameter defines than all users escept
    specified cannot call this procedure.
    In order to specify entire domain, HOST must begins with '*'.

   Example:
      # only vlad and joy may call this procedure
      call_deny_except = check_append,vlad,joy@space

---------------------------------------------------------------
event

  Syntax: event = EVENT_NAME

  Description:This is definition of event.All events that may be 
    occur in the system must be registered in ldbf.conf file.

  Example:
    event=alarm
    event=You_are_fool

---------------------------------------------------------------
schedule_interval
  
      Syntax: schedule_interval = number

      Description:Schedule interval.
        Every specified minutes server will be scan all
        scheduled task for executions.By default 3 minutes.

---------------------------------------------------------------
schedule_task

      Syntax: schedule_task = min hour day mon dow PROCEDURE

      Description:Definition of schedule tasks
        Each line consists of six fields.The fields are separated by spaces or tabs.
        The first five are integer patterns that specify the following:
              minute(0-59)
              hour (0-23)
              day of the month(1-31)
              month of the year(1-12)
              day of the week(0-6 with o=Sunday)
        Each of these pattern may be either an asterisk 
        (meaning all valid values) or a list of elements separated 
        by commas.An element is either a number or two number separated 
        by dash(identifying an inclusive range).The sixth field of the 
        line is name of stored procedure of file name written on S-Lang 
        language.

   Example:
     # run stat.sl every sunday at 1:00
     schedule_task= 0 1 * * 0 stored/stat.sl
     # run backup_tables at 1:00 in first day of every month
     schedule_task= 0 1 1 * * backup_tables

---------------------------------------------------------------
replica_server 

   Synstax:  replica_server = HOST[,PORT[,INTERVAL]]

   Description:This option specifies replication server where all
    transaction will be copied.
    HOST is address of host where another LDBF server is running.
    PORT is server's port.
    INTERVAL is time interval over that server check for new transaction for replication.
    Interval must be specified in minutes,you can specify values less then minute,
    for example 0.5.

 Example:
   # copy all transaction to server on host torn,that waiting on port 5546,
   # check new transaction over each 5 minutes
   replica_server=torn,5546,5

---------------------------------------------------------------
replica_close = (0|1)

   Description:If set to 1,replication session will close connection
    after copying of transactions.If your interval is large enough,
    set this parameter to 1. 

---------------------------------------------------------------
