Importing archive databases from D2000 V3.65 (OS/2)
For upgrading from the version D2000 V3.65 (OS/2) to a version D2000 V4.XX (Windows NT) with no loss of historical data from archive databases, there were created two methods of data transfer into new databases:
- On-line archive database import - program for on-line data conversion from the archive of OS/2 to NT is able to read the archive database in the format SQL GUPTA and provides data fro the archive process, which on-line stores the data into the current archive. This method allows the complete conversion of archive data between the platforms OS/2 and NT.
- Conversion of depository databases (and then import of depository databases) - the conversion program converts and joins depository databases created in the format SQL GUPTA to the format SQL Sybase, in off-line mode. The process D2000 Archiv is able to import the depository databases into the current archive database in on-line mode.
On-line archive database import
The LoadOS2Arc program reads the archive database created in the format SQL GUPTA, converts data to the format used in the current archive and provides them to the archive process. It requires the installation SQLBase Server 5.2.1 for Windows NT for its work.
Import procedure:
- The system is started after the configuration database conversion. In the empty archive database, the archive generates structures corresponding to the configuration of historical values.
- The TELL command IMPORT_DATA entered from the process D2000 Application Manager activates the process D2000 Archiv for data the receiving.
- The database intended for the import is renamed to "ARCHIVE_NAME".DBS (the name may not contain the underscore - such a name is not admissible for the used SQL version) and is placed to the directory "ARCHIVE_NAME". The directory "ARCHIVE_NAME" must be created in the directory defined by the parameter dbdir in SQL.INI.
- DBNT5SV.EXE will be started (SQLBase Server 5.2.1 for Windows NT). The menu Display/Databases allows to verify the archive database opening.
- The program LoadOS2Arc for the database import will be with using
the following parameters:
- APL = APLICATION_NAME
- ARC = ARCHIVU_NAME - e.g. if just one archive is used in the system, the name is SELF
- SRV = SERVER_GUPTA_NAME - optional parameter (Default value is SERVER1)
- After the export finishing, the Tell command STOP_IMPORT_DATA deactivates an archive process feature - to receive an external data.
Stored external data does not cause any backward evaluation of statistical values in the archive. The attribute LoadData is adjusted in archive attributes of all imported data.
Conversion of depository databases
The conversion program requires to install:
- Sybase Adaptive Server Anywhere Database Engine.
- SQLBase Server 5.2.1 for Windows NT.
The program TrezorCnv is intended to convert depository databases created in the versions D2000 V3.11 and V3.65 ( OS/2, SQL Gupta). It allows to join more depositories into one. The result is a new depository database in the format equal with depository databases used in D2000 V4.xx (Windows NT, SQL Sybase). The program operation is controlled by a script placed in the file CONVERT.TXT in the current directory. The script contains two parts. In the SETTINGS part, there are settings that are valid during the script execution. The WORK part contains the sequence of operations, that controls the depository database creation.
Control script - example:
[SETTINGS] ParalelWork = NO MaxBatchSize = 50000 DriverName = Adaptive Server Anywhere 6.0 TrezorCompressPath =d:\Trezor\Compress TrezorPath = d:\Trezor TemplateDir = d:\D2000\Templates SqlBaseDir = d:\SqlBase TrezorVer = Ver3.11 ; Ver3.65 [WORK] NEW = d:\TREZOR.OLD\A990201d.dbs ADD = d:\TREZOR.OLD\A990206m.DBS ADD = d:\TREZOR.OLD\A990212k.DBS ADD = d:\TREZOR.OLD\A990217v.DBS ADD = d:\TREZOR.OLD\A990224c.DBS CORRECT = d:\TREZOR.OLD\C990201d.DBS CORRECT = d:\TREZOR.OLD\C990206m.DBS CORRECT = d:\TREZOR.OLD\C990212k.DBS CORRECT = d:\TREZOR.OLD\C990217v.DBS CORRECT = d:\TREZOR.OLD\C990224c.DBS PACK END
Parameters in the SETTINGS part:
[SETTINGS] | Required key word that marks the script part. |
ParallelWork | Possible values: YES or NO. If the parameter is enabled, the program reads simultaneously the previous depository and stores data into the current depository. It may offer better performance, if, for example, the depositories are on the different disks. |
MaxBatchSize | Defines the maximum number of items in the queue for storing into the new depository. |
DriverName | Name of the installed ODBC driver for Sybase. It may be detected --> Control Panel\ODBC Data Source Administrator\Drivers. |
TrezorCompressPath | Path for saving the result packed database. |
TrezorPath | Directory, where the new depository is to be created. |
TemplateDir | Directory, where the template of the new depository database is placed in. |
SqlBaseDir | Directory, where the previous depository and correction databases will be copied in. It must contains a directory structure matching the SQL Gupta rules. |
TrezorVer | Defines the version of the previous depository database. Possible values: Ver3.11 or Ver3.65. |
Parameters in the WORK part:
[WORK] | Required key word that marks the script part. |
NEW = path\name.dbs | Command for conversion of given depository into new depository database. |
ADD = path\name.dbs | Command for conversion of given depository into existing depository database. |
CORRECT = path\name.dbs | Command for conversion of given correction database into existing depository database. |
CNV_DIR = path | Command for conversion of given directory. The program converts the directory contents so that the command NEW is used for the first depository (they are processed in the alphabetical order) and the command ADD for the another ones. Then the command CORRECT is used for all the correction databases from the directory. |
PACK | Compression of result depository database. |
END | Program termination. |
Note:
The command:
CNV_DIR = d:\TREZOR.OLD
allows to substitute the following commands:
NEW = d:\TREZOR.OLD\A990201d.dbs
ADD = d:\TREZOR.OLD\A990206m.DBS
ADD = d:\TREZOR.OLD\A990212k.DBS
ADD = d:\TREZOR.OLD\A990217v.DBS
ADD = d:\TREZOR.OLD\A990224c.DBS
CORRECT = d:\TREZOR.OLD\C990201d.DBS
CORRECT = d:\TREZOR.OLD\C990206m.DBS
CORRECT = d:\TREZOR.OLD\C990212k.DBS
CORRECT = d:\TREZOR.OLD\C990217v.DBS
CORRECT = d:\TREZOR.OLD\C990224c.DBS
Pridať komentár