The depository database is implemented as an independent tablespace named APPLICATION_TS_TREZORID, where ID=1,2.. etc (e.g. TEST_TS_TREZOR5). The tablespace contains datafiles - their number is defined by the parameter TrezorCountDatafiles (1, by default). Data files are generated in the TrezorPath directory.
If TrezorCountDatafiles=1, the data file name is APPLICATION_TS_TREZORxxID_YYYYMMDD.ORA.
If TrezorCountDatafiles>1, the data file names are APPLICATION_TS_TREZORxxID_01_YYYYMMDD.ORA, APPLICATION_TS_TREZORxxID_02_YYYYMMDD.ORA etc, where xxID is ID enhanced from the left with a zero to the length of 4 characters and YYYYMMDD is the depository database creation date, e.g. TEST_TS_TREZOR0005_03_20060930.ORA. Datafile size is specified by the parameter TrezorStartDatafileSize, the parameter TrezorMaxDatafileSize allows specifying the maximum data file size.
Similarly to Sybase, the configuration of the process D2000 Archiv contains a configured time period TrezorPeriod, during which the process writes data to one depository database. When this period elapses, the database is released and the process starts storing values in a new database. The released database is available for storing delayed data for a given time (configuration parameter TrezorCompressTime). After the expiration of this time, the tablespace is first switched into read-only mode (ALTER TABLESPACE APPLICATION_TS_TREZORID READ ONLY) and then if the value of parameter TrezorCompressOffline=1, switched to offline mode (ALTER TABLESPACE APPLICATION_TS_TREZORID OFFLINE). If the parameters TrezorPath and TrezorCompressPath are defined, data files are to be moved to the TrezorCompressPath directory.
After releasing a depository database (and possibly moving), it is possible to run an external program - its name and path are defined by the parameter TrezorPostCompressCmd, and its parameters are defined by the parameter TrezorPostCompressPar.
The TELL command RELEASE_TREZOR allows releasing a depository database before its time.
The process D2000 Archiv creates its internal list of depository databases - the Trezors table.
Note 1: When switching a tablespace to read-only mode, Oracle requires no active transactions in the whole database. The D2000 Archiv process, therefore, commits the writes to the archive as well as to an active depository database. Therefore it is important for the database containing the tablespace not to be used for other purposes that would require transactions that could take more time because the depository parts of the archive will be blocked until the transactions are finished (see theTrezorReadOnlyTimeout parameter).
Note 2: The Maximum length of a tablespace name in Oracle is 30 characters. That limitation must be taken into account when defining an application name - the name APPLICATION_TS_TREZORID (or APPLICATION_TS_TREZORID_seg in use of depository database segments) cannot be longer than 30 characters.
Note 3: An Oracle database can contain as many data files as defined by the parameter DB_FILES in the initialization file of the database. Therefore, setting up the value of the parameter to a sufficient value before creating the depository databases is enabled.
Since the 7.01.10 version, the process D2000 Archiv supports the concept of depository database segments on the Oracle platform. Depository database segments is a depository database tablespace, several of which can be created and filled in parallel. Each historical value is stored in one segment, the number of which is specified by the parameter Depository segment in the historical value configuration.
The number of segments created by the process D2000 Archiv is specified by the parameter TrezorCountSegments in the Windows registry. Historical values with the parameter depository segment higher than the value of the parameter TrezorCountSegments are to be stored in the zero depository segment (it is the segment that is also created when depository database segments are disabled).
The main purpose of depository database segments is the creation of several smaller depository databases so that reading one historical value for a long time interval requires less disk space (because only specific segments containing that historical value need to be mounted) - compared to mounting all non-segmented depository databases for a required time interval.
Having depository database segments enabled, the name of the zero segment tablespace is APPLICATION_TS_TREZORID (identical with the name of the depository database tablespace if segments are disabled), and the names of all other segments are APPLICATION_TS_TREZORID_seg, where seg is a double-digit number of the segment (between 01 and TrezorCountSegments).
If TrezorCountDatafiles=1, the names of the data files are APPLICATION_TS_TREZORxxID_Syy_YYYYMMDD.ORA
If TrezorCountDatafiles>1, the names of the data files are APPLICATION_TS_TREZORxxID_Syy_zz_YYYYMMDD.ORA, where xxID is ID enhanced from the left with zeros to the length of 4 characters, yy is the segment number enhanced from the left with a zero to the length of 2 characters, z is the datafile number enhanced from the left with a zero to the length of 2 characters, and YYYYMMDD is the depository database creation time. Example: TEST_TS_TREZOR0005_S02_01_20060930.ORA
Note: Starting with D2000 version 7.02.010, it is possible to specify a different suffix of datafile than ORA by using the parameter TrezorDatafileSuffix.
Note: The default prefix of depository tablespaces and datafiles APPLICATION_TS_TREZOR can be changed using the parameter TrezorPrefix.
All the configuration parameters in the Windows Registry are of String type, besides the parameters TrezorCountDatafiles, TrezorCountSegments, TrezorCountDatafiles, and TrezorNoLogging of DWORD type.
Oracle-based archives support creating the depository databases in a different database than the archive is in. The TNS of the depository database is defined by the configuration parameter
TNS_Service_Name_Trezor. The username and password are the same as in the archive database.
Parameter TNS_Service_Name_Trezor is located in the registry in a branch belonging to the application and archive, e.g., HKEY_LOCAL_MACHINE\Software\Ipesoft\D2000V70\cfg_test\SELF.ARC
The database, in which the depository will be created, must contain the archive tablespace (created in the same way as if the archive was supposed to be located in this database) and appropriate archive user application_name_archiv, e.g., test_archiv.
Oracle-based archives support the configuration where two or more shadow archives work with a common depository database. Only an active instance of the archive uses the depository database. The common depository database is defined by the setting of the configuration parameter Trezor_Active_Only (of REG_DWORD type) to a non-zero value. This parameter is located in the registry in a branch belonging to the application and archive. As the archives are shadow archives, the branch of the archive also contains instance numbers, generally HKEY_LOCAL_MACHINE\Software\Ipesoft\D2000V70\cfg_APPLICATION_NAME\ARCHIVE_NAME.ARC_INSTANCE_NUMBER, e.g. HKEY_LOCAL_MACHINE\Software\Ipesoft\D2000V70\cfg_test\SELF.ARC_2\)
Note 1: Parameter Trezor_Active_Only must be configured on all instances of the shadow archive; otherwise, the archives will block each other from trying to write the same value to the depository database.