The PL/SQL script Arc2Trezor.sql (located in the
installation directory - the Templates\Oracle
subdirectory) allows to
create depository databases of archive database on Oracle platforms.
This manual assumes at least basic knowledge on the Oracle management (creating tablespaces,
work with SqlPlus).
Depository databases can be created with 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 database or
different database (see the configuration parameter
TNS_Service_Name_Trezor).
The procedure to use the script Arc2Trezor.sql is following:
Parameter | Description |
---|---|
TrezorId | 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 database. |
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 datafile (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 depository database is in 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 optional platform. |
ParallelLoading | The value of TRUE causes that data export from archive table will be executed in parallel with import of archive data from previous archive table. This setting speeds up the export and the import in case that the archive and the depository database are on different servers and data export/import is executed on workstation that is speed enough (mostly yes - the workstation can handle export as well as import). |
The procedure, described above, must be used for each new depository database.
If you first want to reconfigure the archive to create depository database
automatically and then create depository databases according to the method
described above, it is necessary for the process
D2000 Archiv 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.