Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

Note: To find out about the configuration of depository database, use a TELL command LIST_TREZOR.

Kotva
trezory_pre_sybase
trezory_pre_sybase
Depository databases on Sybase platform

...

Early releasing the depository database can be performed using the TELL command RELEASE_TREZOR.

Off-line analysis of the data from the depository database is possible without performing any decompression. The support for data import from depository database into MS EXCEL was created for the analysis. As the Sybase Adaptive Server Anywhere is a standard SQL server, any tool suitable for work with SQL databases can be used for the analysis.

...

Note: It is possible to query the configuration of depository databases and currently mounted depository databases by Tell command LIST_TREZOR.

Warning: When Depository database is created or if it does not exist, the process D2000 Archiv of database templates copies the template of depository database and starts its structure. Because of this it is not allowed to copy the templates of depository database manually as process D2000 Archiv does not initiate depository database when it finds it in directory \Trezor of application directory.

...

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 into a new database. The released database is available for storing delayed data for a given time (configuration parameter TrezorCompressTime). After expiration of this time, the tablespace is first switched into read-only mode (ALTER TABLESPACE APPLICATION_TS_TREZORID READ ONLY) and then if value of parameter TrezorCompressOffline=1, switched to offline mode (ALTER TABLESPACE APPLICATION_TS_TREZORID OFFLINE). If the parameters TrezorPath and TrezorCompressPath are defined, datafiles are to be moved to the TrezorCompressPath directory.
After releasing a depository database (and possible moving), it is possible to run an external program - its name and path to it is 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 time.
The process D2000 Archiv creates its internal list of depository database - the table Trezors.

...

The main purpose of depository database segments is creation of several smaller depository databases so that reading of 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 required time interval.
Having depository database segments enabled, the name of 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 another segments are APPLICATION_TS_TREZORID_seg, where seg is a double-digit number of segment (between 01 and TrezorCountSegments).

...

  • Kotva
    trezorpathora
    trezorpathora
    TrezorPath - path to the directory, the datafiles of tablespaces are created in. You must also enter the character "\" after the directory name. If the parameter is not given, datafiles are created in the database directory.
  • TrezorCompressPath - path to the directory, the datafiles of tablespaces released are being moved to. You must also enter the character "\" after the directory name. Once the parameter TrezorCompressPath is defined, you must also define TrezorPath, otherwise datafiles not to be moved.
  • Kotva
    trezorperiodora
    trezorperiodora
    TrezorPeriod - period of the depository creation. It is specified in format NX, where N is an integer number and X defines a time unit.
    Permitted time units are: H - hour, D - day, W - week, M - month.
    Note: Setting the parameter either to empty value or to 0H disables the functionality of depository databases.
  • Kotva
    trezorcompressofflineora
    trezorcompressofflineora
    TrezorCompressOffline - value 1 (default) means that compressed depository database will be put into offline mode. Value 0 means that depository database remains in read-only mode and data will be available for reading.
  • Kotva
    trezorcompresstimeora
    trezorcompresstimeora
    TrezorCompressTime - time for releasing depository tablespace. The tablespace is available for writing delayed data during this period. TrezorCompressTime must be less than TrezorPeriod.
  • Kotva
    trezorcountsegments
    trezorcountsegments
    TrezorCountSegments - number of depository database segments (depository database tablespaces), that are being created in parallel. Default value is 0 (only one segment 0 is being created), maximum value is 99 (segments 0 to 99 are being created). The parameter is of DWORD type !!!.
  • Kotva
    trezorcountdatafiles
    trezorcountdatafiles
    TrezorCountDatafiles - number of datafiles in tablespace, by default is 1 (the parameter is of DWORD type !!!).
  • Kotva
    trezorstartdatafilesize
    trezorstartdatafilesize
    TrezorStartDatafileSize - size of datafile that is to be created (in Oracle syntax, e.g. 500K, 300M). The parameter must be specified. 
    Note: For OpenVMS+Oracle 9.2.0.x platform, there is a problem with datafiles damaged at the size of 4GB - must be tested before!
  • Kotva
    trezormaxdatafilesize
    trezormaxdatafilesize
    TrezorMaxDatafileSize - maximum size of datafile (in Oracle syntax, e.g. 500K, 300M or UNLIMITED). If is not defined, size of datafile is specified at its creation (see the note for the previous parameter).
  • Kotva
    trezordatafilesizestep
    trezordatafilesizestep
    TrezorDatafileSizeStep - size of datafile increment (in Oracle syntax, e.g. 200K, 1M) during growth of the datafile (ON NEXT clause of the CREATE TABLESPACE command). If the parameter is not defined, the ON NEXT clause is not used and the increment is the database default value (8K, by default).
  • Kotva
    trezordatafilesuffix
    trezordatafilesuffix
    TrezorDatafileSuffix - suffix of datafile. Default value of this parameter is ORA.
  • Kotva
    trezorprefix
    trezorprefix
    TrezorPrefix - if this parameter is not set, prefix of trezor tablespaces and datafiles is APPLICATION_TS_TREZOR.
    Setting the value of TrezorPrefix changes this prefix. Parameter can be used together with parameter DbUsername when doing a migration of archive database from one application to another (or when renaming an application) and keeping the archive tablespace and existing trezors (i.e. setting the value of TrezorPrefix to OldApp_TS_TREZOR).
  • TrezorReadOnlyTimeout - specifies the timeout (in seconds) for switching depository database into READ ONLY mode. After expiration, the archive generates the system alarm "Changing trezor tablespace read-only takes more than 120 sec, possible Oracle lock!". Default value is 120 seconds.
  • Kotva
    trezorreadsegment0
    trezorreadsegment0
    TrezorReadSegment0
    - Parameter has a meaning only if depository segment are configured (non-zero value of TrezorCountSegments parameter). Activation of a parameter (value 1) instructs archive to read also from depository segment 0 when reading from any other depository segment. Reading from depository databases will be slower, but it enables to reconfigure historical values from default depository segment 0 to a different segment while keeping access to data previously stored in depository segment 0.
    The parameter TrezorReadSegment0 can be changed by TELL command SET_OPTION .
  • TrezorPostCompressCmd - name of a program to be run after releasing depository database and possible moving of datafiles of the depository database released. The program may be used e.g. to pack datafiles and copy them within network.
  • TrezorPostCompressPar - optional parameter, used for the program specified by the parameter TrezorPostCompressCmd. It can contain optional text and predefined macros to be replaced before running the program:
    • #ID# - is replaced by depository database Id (e.g. 15).
    • #TREZOR# - is replaced by the depository tablespace name (e.g. TEST_TS_TREZOR5).
    • #SEGMENTS# - is replaced by the number of depository database segments (i.e. the value of the parameter TrezorCountSegments).
    • #FILES# - is replaced by the number of datafiles of depository database (i.e. value of the parameter TrezorCountDatafiles).
    • #FILE1#, #FILE2# etc. - is replaced by the name of corresponding datafile along with the path, if the path is defined by the parameter TrezorPath (e.g. C:\ora920\oradata\D2000\TEST_TS_TREZOR5_1.ORA).
    Example 1: There is enabled the creating of depository databases with one datafile to be packed into the file TrezorID.zip (ID=1,2 etc.) and moved to the directory D:\backup
    TrezorCountDatafiles 1
    TrezorPostCompressCmd C:\utils\zip.exe
    TrezorPostCompressPar -m D:\backup\Trezor#ID#.zip #FILE1#

    After releasing for example the depository database nr. 5, there is run the program:
    C:\utils\zip.exe -m D:\backup\Trezor5.zip C:\ora920\oradata\D2000\TEST_TS_TREZOR5_1.ORA

    Example 2: Configuration, which will remount (using TELL command) the depository tablespace immediately after it is released by:
    TrezorPostCompressCmd c:\D2000\D2000.E70\bin\tell.exe
    TrezorPostCompressPar dst=SELF.ARC cmd="MOUNT_TREZOR #ID#" uid=myuser pwd=mypassword
  • TrezorNoLogging - the parameter of DWORD type, its non-zero value causes the depository tablespace to be created in the NOLOGGING mode. If its value is zero or doesn't exist, the depository tablespace is to be created in the LOGGING mode (it generates REDO logs and is restorable).

...

The main purpose of depository database segments is creation of several smaller depository databases so that reading of 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 required time interval.

...

  • Kotva
    pg_createtrezor
    pg_createtrezor
    PG_CreateTrezor - SQL command for creating a depository database. Default value is
    CREATE DATABASE "#TREZOR#" WITH ENCODING='UTF8' OWNER=dba TABLESPACE="D2000" TEMPLATE=template0
    where #TREZOR# is a name of depository database (defined by configuration parameter PG_TrezorName0 resp. for depository database segments 1..N by parameter PG_TrezorName). By default existence of tablespace named D2000 and template database template0 is required in PostgreSQL database server.
  • Kotva
    pg_trezorfilemulti
    pg_trezorfilemulti
    PG_TrezorFileMulti - parameter is active if also parameter PG_TrezorFilePath is specified. Parameter defines a multiplicator for the parameter CommitCount . Default value of this parameter is 10.

  • Kotva
    pg_trezorfilepath
    pg_trezorfilepath
    PG_TrezorFilePath - parameter can be used for PostgreSQL 9.5 and above. It activates writing to depository databases via files, which is 2 to 3-times faster thatn than the standard batch insert via ODBC interface. After PG_TrezorFileMulti * CommitCount values are accumulated, they are stored into a file named archiv_<TrezorId>_<SegmentId>.txt (e.g. archiv_4_1.txt) in directorey directory PG_TrezorFilePath and an upsert UPSERT into a depository database is performed. A , using a foreign table mapped onto this file (using PostgreSQL extension file_fdw) is used as a source of data. 
    The directory PG_TrezorFilePath must be available both for reading and writing to archive as well as to PostgreSQL database, therefore this parameter can be used if both archiv and database are on the same computer.

  • Kotva
    pg_trezorname0
    pg_trezorname0
    PG_TrezorName0 - mask for a name of created depository databases. If depository database segments are enabled, this mask will be used for segment 0. Default value is appname_TREZOR_#ID#, where appname is the application's name and #ID# is replaced by the depository database number.
    E.g. for application named Test depository databases Test_TREZOR_1, Test_TREZOR_2, Test_TREZOR_3 etc will be created.
    Specified mask must contain text #ID#.
    Note: If default value not acceptable, custom value must be configured before enabling depository databases. Should value of this parameter be changed after some depository databases have been created, it is necessary to rename all existing depository databases according to newly specified mask.
  • Kotva
    pg_trezorname
    pg_trezorname
    PG_TrezorName - mask for a name of created databases - depository database segments 1..N.
    Parameter is used only when TrezorCountSegments > 0. Default value is je appname_TREZOR_#ID#_#SEG#, where appname is the application's name, #ID# is replaced by the depository database number and #SEG# is replaced by the segment number.
    E.g. for application named Test with number of segments equal to 1, databases Test_TREZOR_1, Test_TREZOR_1_1, Test_TREZOR_2, Test_TREZOR_2_2, Test_TREZOR_3, Test_TREZOR_3_1 etc will be created.
    Specified mask must contain text #ID# and #SEG#.
    Note: If default value not acceptable, custom value must be configured before enabling depository databases. Should value of this parameter be changed after some depository databases have been created, it is necessary to rename all existing depository databases according to newly specified mask.
  • Kotva
    trezorperiodpg
    trezorperiodpg
    TrezorPeriod - period of the depository creation. It is specified in format NX, where N is an integer number and X defines a time unit.
    Permitted time units are: H - hour, D - day, W - week, M - month.
    Note: Setting the parameter either to empty value or to 0H disables the functionality of depository databases.
  • Kotva
    trezorcompressofflinepg
    trezorcompressofflinepg
    TrezorCompressOffline - value 1 (default) means that compressed depository database will be put into offline mode. Value 0 means that depository database remains in read-only mode and data will be available for reading
  • Kotva
    trezorcompresstimepg
    trezorcompresstimepg
    TrezorCompressTime - time for releasing depository database. The database is available for writing delayed data during this period. TrezorCompressTime must be less than TrezorPeriod.
  • Kotva
    trezorcountsegmentspg
    trezorcountsegmentspg
    TrezorCountSegments - number of depository database segments (depository databases), that are being created in parallel. Default value is 0 (only segment 0 is being created), maximum value is 99 (segments 0 to 99 are being created). The parameter is of DWORD type !!!.
  • Kotva
    trezorpostcompresscmdpg
    trezorpostcompresscmdpg
    TrezorPostCompressCmd - name of a program to be run after releasing depository database. This program can for example move and compress a disconnected depository database or create a dump of read-only depository database via PostgreSql utility pg_dump .
  • Kotva
    trezorpostcompressparpg
    trezorpostcompressparpg
    TrezorPostCompressPar - optional parameter, used for the program specified by the parameter TrezorPostCompressCmd. It can contain optional text and predefined macros to be replaced before running the program:
    • #ID# - is replaced by depository database Id (e.g. 5).
    • #OID# - is replaced by OID (object identifier) of depository database (OID is related to a name of directory containing respective database inside PostgreSQL tablespace).
    • #OID0#, #OID1#, #OID2# etc - is replaced by OIDs (object identifiers) of databases representing respective depository database segment 0, 1, 2 etc.
    • #TREZOR# - is replaced by the depository database name (e.g. Test_TREZOR_5).
    • #TREZOR0#, #TREZOR1#, #TREZOR2# etc - is replaced by the database name representing respective depository database segment.