Databases - configuration dialog box

Editing of all objects in the process D2000 CNF is being performed in the configuration dialog box, a specific part of which is common for all editable objects and another part depends on the type of edited object.

Configuration dialog box of objects of Database type consists of several parts (tabs) containing the similar parameters.

General properties
Groups
Database

General properties


Description

A text string describing the database. Maximum : 128 characters.
Possibility to use the Dictionary (to open press CTRL+L).

Database


DSN

ODBC Data Source Name (for dbmanager.exe) or Oracle TNS (for dbmanager_ora.exe).

User, Password

User name and password for accessing the database. The name and password will be used by the process D2000 DBManager while working with the database.

Test

The button allows testing the database connection functionality. Before running the test, it is necessary to click the button Save, if you performed any changes in the parameters DSN, User or Password.
The testing requires the running process D2000 DBManager.

Test tables

This button allows testing the functionality of connection to the database. Providing that the connection to database is all right, the configuration of all objects of Table type is tested.
The testing requires the running process D2000 DBManager.

Parameters

Additional parameters allow to optimize work of process D2000 DBManager (process of D2000 system that makes databases accessible). For more details see transaction work with database.
Brief description of individual parameters (more detailed is stated in the chapter Optimization and debugging):

  • Predefined connections: number of database connections, which are created immediately after starting the process D2000 DBManager and will be kept open (optimisation for slow opening of connects to some databases).
    Note: starting with version 7.01.024 the object of Database type has an integer value equal to current number of connections.
  • Maximum connections: maximum number of connections, which the process D2000 DBManager will create. Value 0 means unlimited number of connections.
  • Maximum automatic connections: maximal number of non-transactional connections, which the process D2000 DBManager will create. For more details see transaction work with database.
  • Reserved browser connections - maximal number of connections, which the process D2000 DBManager will reserve for working with browsers. Default value 0 means that no connections are reserved and non-transactional (automatic) connections will be used. For more details see transaction work with database.
  • Close unused connections after (sec): unused connections (over the number of created connects) will be closed after given timeout. Until then they can be re-used.
  • Close DBManager after timeout (min) : if a database connection is blocked for given number of minutes (database ODBC interface call does not return) e.g. because of a locked row in a table being accessed or because of database driver error, the internal watchdog will terminate the process D2000 DBManager. Value 0 means that this feature is disabled.
  • Empty operations after inactivity period (min): if a database connection is not used for given period, "empty" operation is executed on this connection. Executed operation is database specific:
    • Oracle: SELECT 1 FROM DUAL
    • Sybase, MSSQL: SELECT 1
    • any other database: no operation
    If value of this parameter is not given or is 0, no "empty" operations will be executed (default).
    In some cases, database servers or firewalls between them and DBManager cause the connections to be dropped after defined inactivity timeout. "Empty" operation has been implemented to avoid such event and/or periodically detect other random break of connection during longer periods of inactivity.
  • Log operations longer than (sec) - if nonzero value is entered, the operations, duration of which is longer than entered seconds, are logged. See more information on logging in section Size of the log file (below in the text) and D2000 DBManager - debugging.
  • Debug: debug info is displayed in the window of process D2000 DBManager and stored in log file in the TRACE directory.
  • Size of the log file - if a non-zero value is entered, operations executed in the database are not logged in common log file of DBManager, but in the separate log file of the database. Maximum size (in MB) of database log size is defined by this parameter. For more information see the section DBManager - debugging.

    Note: D2000 system allows to use 2 more debug levels by means the process D2000 System Console. The Debug info window opened for the process D2000 DBManager (e.g. SELF.DBM) contains the DBG.DBMANAGER and DBG.DBMANAGER.DATA debug categories besides the others. The DBG.DBMANAGER category enables recording detailed information (performed SQL commands) into the log file of process and the DBG.DBMANAGER.DATA category enables recording read and written values into the log file. Value times are recorded either in the local time if the database uses local time (see the parameter Use monotonic time described below) or the pure UTC (with the offset of 0) if the database uses monotonic time (see the parameter Use monotonic time). For more information see Example.
  • Use monotonic time - if the option is checked, there is an assumption that the database saves arrays of time type in monotonic time (no daylight-saving changes) and its offset from UTC/GMT time (London time) is a given number of hours. After getting values from database, the process D2000 DBManager will recalculate these values to local time (i.e. considers the offset and daylight-saving changes).
    If the option is not checked, there is an assumption that the database saves arrays of time type in local time according to the Windows operating system.
  • Off - the parameter allows to "disable" the object (database).
    Use: temporary stoppage of transaction work with the database (e.g. when creating an application there is no access to the database with predefined connections and the process D2000 DBManager is still writing errors when attempting to connect the database).
    If user disables the database during the run of process D2000 DBManager, all following operations creating new connections (actions DB_TRANS_OPEN) or opening tables (actions DBS*, DB_CONNECT, SQL_CONNECT, opening the Browser in the process D2000 HI) will be terminated with error and the local variable _ERR_NR_TRANS_EX is to be set to the value of 52 (DBM_OFF).
    Transactions that use existing connections (DB_READ, DB_INSERT, DB_TRANS_COMMIT, DB_TRANS_CLOSE, SQL_PREPARE, SQL_FETCH,...) will be still functional.

    Starting with D2000 version 8.00.002 the predefined connections will not be created if the parameter Off is checked.
    In the older versions of D2000, if the number of predefined connections is other than zero and the parameter Off is checked before running the process D2000 DBManager, all predefined connections will be blocked until user unchecks the parameter - the connections then begins to connect the database.

    If a user disables the database during the run of process D2000 DBManager, predefined connections will not be terminated.
  • Maximum returned rows - limits the maximum number of rows returned by actions DB_READ, DBS_READ, SQL_FETCH and SQL_SELECT.
    If these actions intend to read more rows than specified by this limit and more rows than specified by this limit are available in the database, they will return a number of rows equal to this limit and the return code of the actions will be _ERR_DATABASE_ROWS_LIMIT.
    Starting with version 7.02.012, this parameter limits (without causing an error) also the number of rows displayed by Browser and used in the action PG_CONNECT.
    Default value of the parameter is 10 000 rows (if defined number is lower or equal to 0). When reading a large number of rows (1000 rows or less, depending on the number of rows and type of data) we recommend to use the actions PG_READ or SQL_FETCH in loop - reading e.g. 100 rows at once. Reading and moving the data (SQL database --> D2000 DBManager --> D2000 Server --> D2000 Event) will be faster and consume less memory than moving one large structure.
    The parameter is used as a protection from attempts to read a table containing a lot of rows - it can consume all free memory and crash the process D2000 DBManager.

    Note 1: The parameter has been used from the version 7.00.40, release A050516073. In older versions, a fixed limitation of the number was used - 10 000 rows for actions DB_READ and DBS_READ, but not valid for the action SQL_FETCH.

    Note 2: Before the version 7.02.012 the parameter had no effect on the number of rows displayed by Browser or used in the action PG_CONNECT.

Related pages:

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .