...
TrezorPath - path to the directory, the data files of tablespaces are created in. You must also enter the character "\" after the directory name. If the parameter is not given, data files are created in the database directory.Kotva trezorpathora trezorpathora - TrezorCompressPath - path to the directory, the data files of tablespaces released are being moved to. You must also enter the character "\" after the directory name. Once the TrezorCompressPath parameter is defined, you must also define TrezorPath, otherwise, data files are not to be moved.
TrezorPeriod - the period of the depository creation. It is specified in format NX, where N is an integer number and X defines a time unit.Kotva trezorperiodora trezorperiodora
Permitted time units are:- H - hour
- D - day
- W - week
- M - month.
Note: Setting the parameter either to an empty value or to 0H disables the functionality of depository databases.
TrezorCompressOffline - value 1 (default) means that the compressed depository database will be put into offline mode. Value 0 means that the depository database remains in read-only mode and data will be available for reading. Value 2 means that D2000 Archiv will not access the depository database while TrezorPostCompressCmd is running, so this command may perform various maintenance tasks which could otherwise block the archive.Kotva trezorcompressofflineora trezorcompressofflineora
TrezorCompressTime - time for releasing depository tablespace. The tablespace is available for writing delayed data during this period. TrezorCompressTime must be less than TrezorPeriod.Kotva trezorcompresstimeora trezorcompresstimeora
TrezorCountSegments - number of depository database segments (depository database tablespaces), that are being created in parallel. The default value is 0 (only one segment 0 is being created), the maximum value is 99 (segments 0 to 99 are being created). The parameter is of DWORD type !!!.Kotva trezorcountsegments trezorcountsegments
TrezorCountDatafiles - the number of data files in the tablespace, by default, is 1 (the parameter is of DWORD type !!!).Kotva trezorcountdatafiles trezorcountdatafiles
TrezorStartDatafileSize - the size of data file that is to be created (in Oracle syntax, e.g. 500K, 300M). The parameter must be specified.Kotva trezorstartdatafilesize trezorstartdatafilesize
Note: For OpenVMS+Oracle 9.2.0.x platform, there is a problem with data files damaged at the size of 4GB - must be tested prior to using!
TrezorMaxDatafileSize - maximum size of data file (in Oracle syntax, e.g. 500K, 300M or UNLIMITED). If it is not defined, the size of data file is specified at its creation (see the note for the previous parameter).Kotva trezormaxdatafilesize trezormaxdatafilesize
TrezorDatafileSizeStep - the size of data file increment (in Oracle syntax, e.g. 200K, 1M) during the 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 trezordatafilesizestep trezordatafilesizestep
TrezorDatafileSuffix - suffix of data file. The default value of this parameter is ORA.Kotva trezordatafilesuffix trezordatafilesuffix
TrezorPrefix - if this parameter is not set, the prefix of depository tablespaces and datafiles is APPLICATION_TS_TREZOR.Kotva trezorprefix trezorprefix
Setting the value of TrezorPrefix changes this prefix. The parameter can be used together with the DbUsername parameter when doing a migration of the archive database from one application to another (or when renaming an application) and keeping the archive tablespace and existing depositories (i.e. setting the value of TrezorPrefix to OldApp_TS_TREZOR).- TrezorReadOnlyTimeout - specifies the timeout (in seconds) for switching the 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!". The default value is 120 seconds.
TrezorReadSegment0 - Parameter has a meaning only if depository segments are configured (non-zero value of TrezorCountSegments parameter). Activation of a parameter (value 1) instructs the 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 reconfiguring historical values from default depository segment 0 to a different segment while keeping access to data previously stored in depository segment 0.Kotva trezorreadsegment0 trezorreadsegment0
The TrezorReadSegment0 parameter can be changed by the SET_OPTION TELL command.
TrezorReadSinceCreate - value 1 means that depositories that are older than Create Time of historical value will not be read. The TrezorReadSinceCreate parameter can be changed by the SET_OPTION TELL command.Kotva trezorreadsincecreate trezorreadsincecreate
TrezorPostCompressCmd - the name of a program to be run after releasing the depository database and possible moving of data files of the depository database released. The program may be used e.g. to pack data files and copy them within the networkvia network.Kotva trezorpostcompresscmdora trezorpostcompresscmdora
Note: before running the command, the environment variables D2000_DBUSER and D2000_DBPASS are set to the name and password that D2000 Archive uses to access the archive database. These variables can be used in a script to connect to the archive database.
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:Kotva trezorpostcompressparora trezorpostcompressparora - #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 data files of the depository database (i.e. the value of the parameter TrezorCountDatafiles).
- #FILE1#, #FILE2#, etc. - is replaced by the name of the corresponding data file along with the path, if the path is defined by the parameter TrezorPath (e.g. C:\ora920\oradata\D2000\TEST_TS_TREZOR5_1.ORA).
TrezorCountDatafiles 1
TrezorPostCompressCmd C:\utils\zip.exe
TrezorPostCompressPar -m D:\backup\Trezor#ID#.zip #FILE1#
After releasing for example the depository database nr. 5, a program can be run:
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).
...
TrezorReadSegment0 - Parameter has a meaning only if depository segments are configured (non-zero value of TrezorCountSegments parameter). Activation of a parameter (value 1) instructs the 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 reconfiguring historical values from default depository segment 0 to a different segment while keeping access to data previously stored in depository segment 0.Kotva trezorreadsegment0pg trezorreadsegment0pg
The TrezorReadSegment0 parameter can be changed by the SET_OPTION TELL command.
TrezorReadSinceCreate - value 1 means that depositories that are older than Create Time of historical value will not be read. The TrezorReadSinceCreate parameter can be changed by the SET_OPTION TELL command.Kotva trezorreadsincecreatepg trezorreadsincecreatepg
TrezorCompressOffline - value 1 (default) means that the compressed depository database will be put into offline mode. Value 0 means that the depository database remains in read-only mode and data will be available for reading. Value 2 means that D2000 Archiv will not access the depository database while TrezorPostCompressCmd is running, so this command may perform various maintenance tasks which could otherwise block the archive.Kotva trezorcompressofflinepg trezorcompressofflinepg
TrezorCompressTime - time for releasing the depository database. The database is available for writing delayed data during this period. TrezorCompressTime must be less than TrezorPeriod.Kotva trezorcompresstimepg trezorcompresstimepg
TrezorCountSegments - number of depository database segments (depository databases), that are being created in parallel. The default value is 0 (only segment 0 is being created), and the maximum value is 99 (segments 0 to 99 are being created). The parameter is of DWORD type !!!.Kotva trezorcountsegmentspg trezorcountsegmentspg
TrezorPostCompressCmd - the name of a program to be run after releasing the depository database. This program can for example move and compress a disconnected depository database or create a dump of read-only depository database via the PostgreSQL utility utility pg_dump.Kotva trezorpostcompresscmdpg trezorpostcompresscmdpg
Note: before running the command, the environment variables D2000_DBUSER and D2000_DBPASS are set to the name and password that D2000 Archive uses to access the archive database. These variables can be used in a script to connect to the archive database.
TrezorPostCompressPar - optional parameter, used for the program specified by theKotva trezorpostcompressparpg trezorpostcompressparpg 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 the depository database (OID is related to the name of the directory containing the 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 the respective depository database segments.
An example of a batch file used to perform a depository database maintenance and export as well as the export of trezors table located in archive database MyApp.Archiv. The batch file requires as a parameter the name of the depository database, which can be provided by setting the TrezorPostCompressPar parameter to value #TREZOR#.
rem Target directory for exports
set MyDir=D:\Trezors_export\
rem Set PGPASSWORD to password assigned to postgresD2000 user during installation
set PGPASSWORD=MyPostgresPassword%D2000_DBPASS%
rem Set PATH to PostgreSQL installation (version-dependent)
set PATH=%PATH%;c:\Program Files\PostgreSQL\9.513\bin
rem export of table trezors from the archive database
pg_dump -Fc -U postgres%D2000_DBUSER% -f "%MyDir%\MyApp_arc_trezors.dmp" --table \"trezors\" MyApp.Archiv >> %MyDir%\%1.log
rem permit write access to depository database and cluster the data table
echo alter database "%1" set default_transaction_read_only=false | psql -S -U postgres%D2000_DBUSER% MyApp.Archiv >> %MyDir%\%1.log
echo alter table data cluster on ix_data_rc | psql -S -U postgres %1 >> %MyDir%\%1.log
echo cluster data | psql -S -U postgres%D2000_DBUSER% %1 >> %MyDir%\%1.log
rem set access to depository database back to read only
echo alter database "%1" set default_transaction_read_only=true | psql -S -U postgres%D2000_DBUSER% MyApp.Archiv >> %MyDir%\%1.log
pg_dump -Fc -U postgres%D2000_DBUSER% -f "%MyDir%\%1.dmp" %1 >> %MyDir%\%1.logExample of an equivalent batch file for Linux:
#!/usr/bin/env bash
MyDir=/trezorbackup
MyArc=mes_tpd_archive_self
MyLog=$MyDir/$1.log
#path to pg_dump, psql etc
PATH=/usr/pgsql-11/bin:$PATH
#password for dba user
export PGPASSWORD=***$D2000_DBPASS
#export of table trezors from the archive database
pg_dump -Fc -U dba$D2000_DBUSER -f "$MyDir/arc_trezors.dmp" --table \"trezors\" $MyArc >> $MyLog
#permit write access to depository database and cluster the data table
echo alter database \"$1\" set default_transaction_read_only=false | psql -S -U dba$D2000_DBUSER $MyArc >> $MyLog
echo alter table data cluster on ix_data_rc | psql -S -U dba$D2000_DBUSER "$1" >> $MyLog
echo cluster data | psql -S -U dba$D2000_DBUSER "$1" >> $MyLog
#set access to depository database back to read only
echo alter database \"$1\" set default_transaction_read_only=true | psql -S -U dba$D2000_DBUSER $MyArc >> $MyLog
#execute dump of depository database
pg_dump -Fc -U dba$D2000_DBUSER -f "$MyDir/$1.dmp" "$1" >> $MyLog