powered by CADENAS

Manual

Manual

4.5.7.2.4.1.  Logging of LinkDB changes

INSERTS, DELETES and manual UPDATES (by PARTlinkManager or PARTdataManager) are automatically logged in the table LOGTABLE.

Structure of LOGTABLE

LOGID VARCHAR(40) NOT NULL,
TABNAME VARCHAR(15) NOT NULL,
KEYFLD VARCHAR(15) NOT NULL,
LOGKEY VARCHAR(500) NOT NULL,
LOGEXT VARCHAR(64),
LOGTIME VARCHAR(20) NOT NULL,
USERNAME NVARCHAR(20),
HOSTNAME NVARCHAR(20),
PROGNAME VARCHAR(15),
MODTYPE SMALLINT DEFAULT 0 NOT NULL,
UPDSEARCH SMALLINT DEFAULT 0 NOT NULL,

You can view this table via PARTlinkManager -> Extras menu -> Database -> Edit additional tables.

If in plinkcommon.cfg under ADDITIONALTABLES the entry LOGTABLE has been set it is displayed here.

If in plinkcommon.cfg under ADDITIONALTABLES the entry LOGTABLE has been set it is displayed here.

Meaning of single LOGTABLE columns

  • LOGID: LOGID is an unique number (GUID)

  • TABNAME: Table, where changes are stored, meaning ERPTABLE or LINKTABLE.

  • KEYFLD:

    • For ERPTABLE this is always ERP_PDM_NUMMER and LOGKEY contains the ERP number

    • For LINKTABLE this is always PRJ_PATH and LOGKEY contains the path

  • LOGEXT: Additional information. At LinkDB changes this is version and line ID.

  • LOGTIME: Time of change (in UTC)

  • USERNAME: Login name of user, which performed the change

  • HOSTNAME: Computer name of client

  • PROGNAME: Program, where changes have been performed

  • MODTYPE: Modification type

    Value range:

    • 1: Insert (dataset has been added)

    • 2: Update (dataset has been changed)

    • 3: Delete (dataset has been deleted)

    • 4: Installation (updates during cip installation)

  • UPDSEARCH: If UPDSEARCH is 1 then the ERP search index should be updated. Will be turned back to 0 by the AppServer after finished update

In order for the task to be performed the following settings have to be made in the configuration file pappserver.cfg.

Example:

[TaskManagerModule]
TimerInterval=60 
tasks=loadAll 
DBSearchIndexTask=1h
DBClearLogTask=24h

[DBClearLogTask] 
DaysToKeep=365

  • TimerInterval: Specification in which interval (seconds) it shall be checked whether a new task is pending. Normally this does not have to be adjusted.

  • tasks:

    Value range:

    • loadAll: All Task Modules shall be loaded when launching the AppServer. Currently there are only two:: DBSearchIndexTask and DBClearLogTask

  • DBSearchIndexTask: Task interval for updating the ERP search index. The task checks the LOGTABLE whether there are new entries available. If yes, the ERP search index is updated.

  • DBClearLogTask: Task interval for clearing the LOGTABLE. This task deletes all entries from LOGTABLE.

    Possible date formats:

    1m Task is executed every minute
    1h Task is executed every hour
    13:21z Task is executed every day at 13:21 GMT
    mon 14:30 Task is executed every Monday at 14:30 (locale time)

  • DaysToKeep: Number of days to store the entries in the LOGTABLE.

[Note] Note

The exact timing with nightupdate.vbb (update of ERPTABLE) has to be regarded.