The PL/SQL script Arc2Trezor.sql (located in the installation directory - the Templates\Oracle subdirectory) allows the creation of depository databases of archive databases on Oracle platforms.
This manual assumes at least basic knowledge of Oracle management (creating tablespaces, working with SqlPlus).
Depository databases can be created with an optional period that may differ from the parameter TrezorPeriod. The script Arc2Trezor.sql can be run in the SqlPlus tool on Windows or Linux platforms. It supports creating depository databases in archive databases or different databases (see the configuration parameter TNS_Service_Name_Trezor). The procedure to use the script Arc2Trezor.sql is following:
Parameter | Description |
---|---|
TrezorId | The number of depository database that is to be created. Positive integer (1,2,3,...) - later depository means a higher number. |
AppName | Application name. The names of depository database tablespaces are to be composed of the application name and the number of depository databases. |
TrezorPath | Directory to store datafiles of depository database tablespace (see the configuration parameter TrezorPath). You must also enter the slash at the end. Example:
|
TrezorCountDatafiles | Number of datafiles in tablespace (see the configuration parameter TrezorCountDatafiles). |
TrezorStartDatafileSize | Initial size of datafile (see the configuration parameter TrezorStartDatafileSize). |
TrezorMaxDatafileSize | Maximum size of the data file (see the configuration parameter TrezorMaxDatafileSize). |
TrezorDatafileSizeStep | Size of datafile increment (see the configuration parameter TrezorDatafileSizeStep). |
StartDateUTC, EndDateUTC | Time interval of data exported to the depository database (in UTC time). Note: Values in depository database are saved in UTC time, values in Oracle archive usually in UTC + 2 hrs. |
If the depository database is in a different database, you must also define the following parameters:
Parameters | Description |
---|---|
TrezorsInArchiveDatabase | Its value must be TRUE. |
ArchivDBLogonInfo | Name, password and TNS for logon to archive (aplikacia_archiv/swx@D2000, by default). |
TrezorDBLogonInfo | Name, password and TNS for logon to the database that will contain depository databases. The database must contain the archive tablespace that is available for the user aplikacia_archiv with the password swx. That tablespace must contain at least one empty table Tabver that belongs to the user aplikacia_archiv. |
OSTypeIsWindows | TRUE if SqlPlus will be run on Windows or FALSE if on Linux. The database may be on an optional platform. |
ParallelLoading | The value of TRUE causes the data export from the archive table will be executed in parallel with the import of archive data from a previous archive table. This setting speeds up the export and the import in case the archive and the depository database are on different servers and data export/import is executed on the workstation that is speed enough (mostly yes - the workstation can handle export as well as an import). |
The procedure, described above, must be used for each new depository database. If you first want to reconfigure the archive to create a depository database automatically and then create depository databases according to the method described above, it is necessary for the D2000 Archiv process to start creating depository databases not from the number of 1 but from e.g. 13 (if you want to create depository databases 1...12 manually according to the method above). To do that, insert the line containing the number of the last depository database you want to create manually into the table TREZORS in the database that will contain the depository databases:
INSERT INTO TREZORS(ID,TIME_FROM,TIME_TO,STATUS,DATAFILES) VALUES(12,SYSDATE,SYSDATE,40,1)
After the process D2000 Archiv is started, it begins to create the depository databases numbered from 13.
After you create the depository databases 1...12 manually, you must delete the inserted line to avoid creating lines with duplicate ID.