Scripts for creating an Oracle application or archive

The application, which stores data in the Oracle database, does not use standard D2000 processes working with ODBC interface (kernel.exe, archiv.exe, arcsynchro.exe, ...), but their modified versions (kernel_ora.exe, archiv_ora.exe, arcsynchro_ora. exe, ...). These modified versions directly use the Oracle Client Interface (OCI), which is also available on platforms other than Windows (Linux, VMS).

A PL/SQL script template D2OraApp.txt is available for creating an application on the Oracle platform, which allows you to create tablespaces and the necessary tables for the operation of the configuration and log database.
A PL/SQL script template D2OraApp.txt is available for creating an archive on the Oracle platform, which allows you to create tablespaces and the necessary tables for the operation of the archive database.
Both of these scripts are located in the Templates\Oracle subdirectory of the program directory.

The configuration, log and archive tables can either be located in a single Oracle database as three tablespaces, or be in two different databases (configuration and log tablespaces in one, archive in the other). For each tablespace, D2000 uses one user, whose script is D2OraApp.txt or D2OraArc.txt, also creates. Configuration and log database separation is not supported.

Due to the Oracle XE (Express Edition) database, which is a free-to-use database based on Oracle 10g Release 2 limited to 4 GB user tablespaces, a 'compact' configuration is also supported, in which the configuration and monitoring database tables or all three are in a single tablespace (configuration). In this configuration, it is not necessary to plan the size of individual tablespaces in advance. Just set the size of the configuration tablespace to the maximum (4GB) and the available 4GB will be fully utilized by the database that needs them. The 'compact' configuration can be enabled with the LogFileInSyscfg and ArchivInSyscfg parameters.

How to create an Oracle application or Oracle archive

  1. The parameter values are read from the Templates\Oracle subdirectory of the program directory from the template file:
    a / D2OraApp.txt when creating a new Oracle application
    b / D2OraArc.txt when creating a new Oracle archive
  2. Files will be created in the [AppName]\SysCfg subdirectory of the application directory, whose name will start with [Prefix] = [AppName] when creating a new Oracle application.
    Files will be created in the [AppName]\Archive subdirectory of the application directory, whose name will start with [Prefix] = [AppName] _ [ArcName] when creating a new Oracle archive.
  3. When requesting the creation of an Oracle application or Oracle archive (by pressing the OK button), a new script is generated in which the changed parameter values are already applied and saved in the [Prefix] .sql file.
  4. The following scripts are then run one after another:

    [Prefix]_Run1.sql[Prefix]_Run2.sql[Prefix]_Run3.sql
    SPOOL .\[Prefix]_Log1.log;
    connect
    @[Prefix].sql;
    SPOOL OFF
    EXIT;
    connect
    SET SERVEROUTPUT ON
    SET LINE 260
    SPOOL .\[Prefix]_Log2.sql;
    EXEC [ProcName]_[Prefix];
    SPOOL OFF
    EXIT;
    connect
    SPOOL .\[Prefix]_Log3.log;
    @[Prefix]_Log2.sql;
    SPOOL OFF
    EXIT;

    creates an SQL procedure
    result in the first log

    starts the SQL procedure
    result in the second log

    runs the create statement
    result in the third log


    connect represents the command connect [user]/[password]@[TNS] as sysdba
    [ProcName] which is used
    a/ D2OraApplication while creating a new Oracle application 
    b/ D2OraArchive while creating a new Oracle archive 

  5. The logs need to be checked thoroughly [Prefix]_Log1.log, [Prefix]_Log2.sql a [Prefix]_Log3.log.

Note:

For example, after creating an Oracle application named AppN and an Oracle archive named ArcN, the AppN.sql, AppN_Run1.sql, AppN_Run2.sql, AppN_Run3.sql, AppN_Log1.log, AppN_Log2.sql, and AppN_Log3 files are created in the AppN\SysCfg subdirectory of the application directory. log for the new Oracle application and in the AppN\Archive subdirectory of the application directory created files AppN_ArcN.sql, AppN_ArcN_Run1.sql, AppN_ArcN_Run2.sql, AppN_ArcN_Run3.sql, AppN_ArcN_Log1.log, AppN_Arrqq, AppN_Arrqq

When editing an Oracle application or Oracle archive, the parameters will be read from the newly created scripts, i.e. in the above example from AppN.sql and AppN_ArcN.sql. These parameters will be rewrite-protected.

Napíšte komentár