Parameters for the Oracle DB Setup

WinCC OA accesses Oracle tables directly. For this access, an application user can be created (this user is automatically created by the setup described below). However, you can also use the user schema for the access.

All setup parameters have to be adapted in the "RDB_config.sql" file before the start of the setup. The rows have the following example form:

define connect_identifier = 'MYDB'

define” - defines the Oracle variable.

"connect_identifier" - name of the Oracle variable.

"'MYDB'" - example value that should be replaced by the real value.

The template file "RDB_config_template.sql" also contains additional comments (characterized by two dashes), which specify a parameter precisely.

The following table describes the setup parameters of the "RDB_config.sql" file. Note that the values must always be written out in full (i.e. "yes" instead of "y"). Remember that Linux are case-sensitive.

The combination of the setup parameters use_occi = 'no' + sys_partitions = 'yes' is not supported.

Note also that paths that are used in the file must be created manually. The standard paths (Oracle default paths) as well as new paths must exist - the file does not create any directory paths. Below you can find an example how the paths could look like:

 define path_dbfile = 'D:\app\oracle\oradata\DBSYNC1\datafile\' 
 define path_tempdbfile = 'D:\app\oracle\oradata\DBSYNC1\datafile\'
 define path_oraclebin = 'D:\app\oracle\product\19.3.0.0\db1\bin\'
 define path_backup = 'C:\WINCCOABackup\' 
 define path_alert = 'D:\app\oracle\oradata\DBSYNC1\datafile\'
 define path_event = 'D:\app\oracle\oradata\DBSYNC1\datafile\'
 define path_asm_bin = 'D:\app\oracle\product\19.3.0.0\db1\bin\' 
Parameter Description
connect_identifier Connect Identifier of the database (name for the connection to the database instance, as for example defined in "tnsnames.ora"), stands for example in sqlplus after the @ ("at sign"). This cane be also detected via the tnsping command.
sysdba_user

Name of the user with system database administrator permissions. This entry can also be left empty if the OS authentication is possible.

This parameter is not required when yesno_newuser is set to 'no'.

yesno_newuser

Query whether a new RDB User shall be created or an existing user shall be used as a RDB schema user.

If RMAN is used yesno_newuser should be 'yes'. Otherwise backup problems may occur.

schema_user

Name of the existing or the new created RDB schema user.

This user name may contain up to 13 characters.

Note: The names for the schema user and the application user must be different.

app_user

Name of the application user (App-User) to be created. This user is used by WinCC OA in order to access the database.

This user name may contain up to 30 characters.

Note: The names for the schema user and the application user must be different.

upgrade_sizeparams_override

Decides in case of an upgrade whether the current configuration shall be overwritten.

"yes" -> data from rdb_config.sql are transferred, i.e. the current configuration will be overwritten.

"no" -> contents from ARC_CONFIG are transferred, i.e. the current configuration is kept.

If in ARC_CONFIG a parameter is not available, the data are taken from "RDB_config.sql" independent of the entry.

This parameter is used only for upgrades. It is not required when installing RDB the first time.

use_rman

Defines whether the backup shall be executed by using Operating System Commands ('os' or 'std' option) or by using RMAN ('rman' default option).

For the Oracle Standard Edition "std" or "rman" should be used.

‘rman’ = backup/recovery via RMAN: "Backup and Recovery Manager" - Oracle command line program for backup and recovery.

In case of a RAC or if the installed database is using ASM, 'rman' has to be set. ASM: (Automated Storage Management) - Oracle administrates the data files by itself on RAW discs. Thus the administration is not made by the operating system.

Note:

If backup is executed via RMAN under Windows, the backup directory must be on the local hard disk of the database server. The backup to a network directory is not supported. The reason is an Oracle rights problem. The user, for who Oracle is running under Windows, has not enough permission rights. If additional rights are granted to the user, it is not possible to login as SYSDBA anymore, what is needed for the backup via RMAN.

‘std’ = "Backup via the Standard Edition" - the archive data are moved on the backup path during the backup. During the recovery they will be re-copied from the backup path. With the std option the Standard Edition backup can be also chosen for the Enterprise Edition.

‘os’ = only for Oracle Enterprise Edition and if backed-up archives shpuld be imported into another database (this may be also a Standard Edition) : backup/recovery by datapump export/import. Each backup set is composed of two files: the datapump dump and the copied data files - in this double-combination the data can be theoretically imported in any compatible database. For Standard Edition: same process as 'std'.

Note:

If use_java and use_rman are used at the same time, path_oraclebin must be specified, too.

os_sys Specification of the operating system - please enter 'win' for Windows or 'unix' for Linux.
zip_backup

Decides whether the exported database files shall be packed. Enter "yes" or "no".

If backup using the operating system (use_rman=’os’ or use_rman = ’std’) was chosen, the Oracle data files are packed using the zip tool after the export and get the extension "zip". Before they are imported, they are extracted automatically again (program unzip).

When using backup via the RMAN (use_rman=’rman’) the RMAN backup option "compress" is used. When the database files are imported, RMAN extracts automatically.

Note:

From the WinCC OA version 3.8 it should be ensured that the outsourced database files that will be compressed do not exceed the size of 4GB. Otherwise, the compression will fail.

sequence_start

Initial value for the archive numbering. The lowest possible number is 0. Every newly created archive increments the sequences current value by 1. If several parallel RDB schemas are existing, the ranges that results from sequence_start and sequence_maxvalue may not overlap. Otherwise it may happen that log files will be overwritten, in case of the same directories.

However, there are no restriction for archiving.

sequence_maxvalue

Maximum value for the archive numbering, The highest possible number is '99999999'.

Note that the range between sequence_start and sequence_maxvalue has to be big enough so that enough numbers are available for the life cycle of an archive group. For average and bigger applications 100 000 (e.g. from 100 000 to 199999) should be big enough.

Note:

The maximum value should not be exceeded! Otherwise the following error message will be returned:

"ORA-08004: sequence SEQ_ARC_ARCHIVE.NEXTVAL exceeds MAXVALUE and cannot be instantiated" is shown if the value is exceeded.

New archives cannot be created anymore.

path_dbfile

If a new user has been created, also a new table space will be created (Name = TS_"+Name of the user). Specify where the new table space should be saved. The table space is saved on the Oracle server.

If nothing is specified here, the Oracle default directory is used (normally %ORACLE_HOME%/DATABASE/).

If you manually specify a path here, enter the completing slash or backslash since otherwise the last directory name and the table space are joined into one name.

This directory must have sufficient write/read permissions. This can be checked with the chmod -R 777 <directory> command.

path_tempdbfile

Storage location of the temporary table space.

Consider the notes for path_dbfile. Additionally the name of the table space gets the prefix "_TEMP".

This parameter is only used, if extra_TempTS is set to 'yes'.

extra_TempTS

If this entry is set to 'yes', an own Tablespace is created for the Schema user. If this entry is set to 'no', a general temporary tablespace that is valid for all users is created.

extra_TempTS = 'yes' - a separate temporary table space is used for the schema. It is meaningful when the temporary table space is saved on another disc for burden-sharing reasons.

extra_TempTS = 'no' - no own temporary table space is used for the schema, but the Oracle default.

path_oraclebin Path specification of the ORACLE_HOME/bin directory on the DB server. This path is used for locating external programs.
instance_name Name of the database instance in which the RDB installation is executed.
host_name Host name of the computer on which the database instance runs. In case of cluster systems, specify the cluster host name.
path_backup

Directory on the Oracle server in which exported database data files are saved.

Enclose the path entry always by a slash/backslash! Note that this parameter already has to exist when you execute the setup for the first time.

path_asm_bin

Must be empty when not using ASM!

Path of the ASM binaries (on DB server), used for Oracle executable, especially for the ASM functionalities.

path_alert

Directory on the Oracle server in which the database data files for the historic alarm data are saved.

Enclose the path entry always by a slash/backslash!

This directory must have sufficient write/read permissions. This can be checked with the chmod -R 777 <directory> command. Note that this parameter already has to exist when you execute the setup for the first time.

path_event

Directory on the Oracle server in which the database data files for the historic event data are saved.

Enclose the path entry always by a slash/backslash!

This directory must have sufficient write/read permissions. This can be checked with the chmod -R 777 <directory> command. Note that this parameter already has to exist when you execute the setup for the first time.

mytimezone

Time zones definition. Enter the time zone the database uses, here (corresponds normally to the local time zone: ”systimestamp”). You can find valid strings for the time zones in the Oracle view ”v$timezone_names”.

Use the sqlpus command

SQL> select * from v$timezone_names;

to detect the actual time zone.

asm_instance Connect Identifier for the ASM instance (e.g. +ASM). Value is only necessary if the database data is saved and administered via ASM.
service_name

Database SID or database SERVICE_NAME like it is specified in the tnsnames.ora.

In case of clusters specifies it the common name, e.g. two cluster instances DB1and DB2 have the common service name DB.

number_db_storage

If you are using DataGuard to synchronize two or more DB-storages or having for any reason more than one DB-storage, please enter 2 or more.

"Oracle Data Guard is the management, monitoring, and automation software infrastructure that creates, maintains, and monitors one or more standby databases to protect enterprise data from failures, disasters, errors, and corruptions. "

-Oracle technology network-

Note:

The DataGuard does not create the data file for the temporary table space on the passive node. Thus, this must be done within the setup for all passive nodes. Thereby, proceed as follows:

1. Data Guard switch to the passive side so it will be active.

2. Execute the script RDB_DGextra.sql on each side. This creates the data file for the temporary table space.

upgrade_alertlastval

Defines, whether the alert last value tables will be recreated during an upgrade of the RDB version.

'yes'' = The alert last value tables will be deleted and recreated. It should be noted that this may lead to low data loss.

'no' = The alert last value tables will not be recreated. This could result in differences in the table structure.

upgrade_eventlastval

Defines, whether the event last value tables will be recreated during an upgrade of the RDB version.

'yes' = The event last value tables will be deleted and recreated. It should be noted that this may lead to low data loss.

'no' = The event last value tables will not be recreated. This could result in differences in the table structure.

reset_cs

Defines, whether the CS tables (see Description of the Tables and Views of the RDB compression) will be recreated during an upgrade of the RDB version.

'yes' = The CS tables will be deleted and recreated (reset of the entire RDB compression).

'no' = The event last value tables will not be recreated. This could result in differences in the table structure.

Note:

When updating a schema from version 8.1 to 8.5 this parameter must be set to 'yes' in order to create the CS tables.

public_grants

RDB specifies one individual user with restricted permissions for the database object access - the application user. It is now possible to release these permissions (PUBLIC). This is useful e.g. when only reliable users may log in and everyone would like to log in using the own account, and not as an application user. To release the rights enter 'yes'.

This parameter may be set to 'yes' only then, if it is guaranteed, that in the whole system only one RDB schema exists. Otherwise the whole archiving process will not be worked anymore. By default this parameter is set to 'no'.

compression_init_value

When you set the "compression_init_value" in the "RDB_config.sql" file to "yes":

For a compression interval the last value of the previous interval before the current interval is included into the calculation. When, for example, the lowest value in an interval from 08:00 to 08:05 is the value 2 but the last value in the interval before was 1, the lowest value for the interval from 08:00 to 08:05 is the value 1. The last value of the previous interval is included into the current interval.

longTermStatCalcInt

With this parameter the RDBCompression, with an interval length greater than 24 hours, can be started multiple times a day.

Value -> Description

24 -> The compression will start once a day [default]

12 -> The compression will start twice a day

1 -> The compression will start hourly.

Eventual changes for this parameter can only be done through the RDB Configure Panel (or the ARC_CONFIG table).

define use_extended_oracle_types

Multibyte Strings with more than 4000 bytes could not be saved in the Oracle database.

As of the version 12c Oracle supports the column sizes of more than 4000 bytes (extended data types).

This feature can, for now, only be used for new DP schemas! In order to use the extended data types, three steps are necessary:

1. Configure the Oracle database correctly. In order to use the extended data types, some changes in the Oracle database are necessary - see https://docs.oracle.com/database/121/REFRN/GUID-D424D23B-0933-425F-BC69-9C0E6724693C.htm#REFRN10321.

2. Create a new DB schema.

3. Set the parameter "define use_extended_oracle_types of the RDB_config.sql file to 'yes'. The number of bytes is extended to 12500.

CAUTION!

IOT (index organized tables) and Extended Data types cannot be used simultaneously. A security query is executed when the schema is installed.

The installation also checks if the Extended Data Types are activated in Oracle(max_string_size = EXTENDED).

For the extended data types an error message is shown in the log file during the setup.

define IOT_enabled

Set the define IOT_enabled to 'yes' in order to use IOT (index organized tables).

IOT (index organized tables) and Extended Data types cannot be used simultaneously - see define use_extended_oracle_types above. When Extended Data types are used, set the parameter define IOT_enabled to 'no'.

Config entries for the second site (in case of clusters), leave the entries empty if there is no second site (if there are even more than two sites, please use the Site Config WinCC OA Panel to enter the data).
connect_identifier2 connect_identifier2 = ' '. Connect Identifier for the second site.
instance_name2 instance_name2 = ' '. Instance Name for the second site.
host_name2 host_name2 = ' '. Host Name for the second site.
asm_instance2 asm_instance2 = ' '. Connect Identifier for the ASM Instance for the second site.
service_name2 service_name2 = ' '. Service Name (Oracle SID) for the second site (usually the same as for the first site).
Config entries which are set to useful and recommended defaults:
use_occi (yes/no):

use_occi = 'yes'

Defines whether the OCCI interface should be used.

'yes' = Write data to RDB archives using OCI Oracle Call Interface (OCCI).

OCI bulk writing is per default enabled and improves the performance.

'no' = OCCI will not be used. RDB writes data into the archive using SQL API. Enter the config entry writeWithBulk = 0 to the [ValueArchiveRDB] section of the config file.

Note that User Defined Archive Groups can only be used when the data is written using Oracle Call Interface (OCCI = "yes").

If you choose to use OCCI and update the schema for OCCI, only writeWithBulk = 1 can be used. The database schema and config entry have to match. If you want to use SQL API again also the database schema has to be changed! If the config entry and database schema do not match, the RDB cannot be started and an error message is shown.

Note:

Oracle version 11.2.0.2.0 and above is supported.

Note:

The error message:

ORA-00932: inconsistent data types: expected TESTER.LANGSTRING got CHAR

is shown when a database schema is not updated for the use of OCCI but the config entry writeWithBulk = 1 was set in the config file.

use_java

Export via C-DLL or the Java embedded in Oracle:

use_java = 'yes'- uses the Java source embedded in Oracle. The Java installation as well as the maintenance are easier (you do not have to define an ORACLE library or specify entries in "tnsnames.ora" and "listener.ora" etc.).

use_java = 'no' - uses the C-DLL for the export and import.

During the setup the decision is reached which variant will be used. A subsequent change is only possible during a re-installation or an upgrade.

Note:

If use_java and use_rman are used simultaneously under Linux, the path_oraclebin has to be entered.

Note:

If you use Java for the export under Linux, you can define paths for the used Linux commands using the DB configuration (all entries starting with "prog_*"). You must define the paths since the Oracle DB requires operating system commands for some operations and calls these commands in a Java OS shell. The Java OS shell does not support any paths. Thus, define the paths using the DB configuration.

The same does apply under Windows as of the Oracle version 11g.

sys_partitions

sys_partitions = 'no'

Partitioning can improve the performance and simplify administration tasks. It enhances the manageability, performance, and availability of the database. The tables, indexes and index-organized tables can be subdivided into smaller pieces - partitions. A partitioned object can, however, be accessed normally using SQL commands.

Entries for Oracle experts. No need to change these values - they are set to useful defaults

Parameter Description
type_float

define type_float = 'NUMBER'

Type by which float values are presented e.g. NUMBER or BINARY_DOUBLE.

initial_size

Initial size of the files for the table spaces: one schema table space, max. one temporary table space, several table archive table spaces.

The size specification has the following form: <value>+<sizeID>. Valid size IDs are 'K' (kilobytes), 'M' (megabytes), 'G' (gigabytes) or 'T' (terabytes).

Example:

define initial_size= '50M'

-> the initial size of the file for the newly created table space is 50 MB.

During the setup the given value is written into the table ARC_CONFIG as the default value. For single archive groups this can be over-configured afterwards (ARC_GROUP table).

next_size

Extent size of the files for the table spaces.

If the given size of the file, where the table space is saved, is getting to small, the file will be enlarged by next_size. If nor value has been specified (empty), Oracle calculates the value by itself (the bigger the file, the more it will be enlarged). Otherwise the enlarge size is fixed.

The size specification has the following form: <value>+<sizeID>. Valid size IDs are 'K' (kilobytes), 'M' (megabytes), 'G' (gigabytes) or 'T' (terabytes).

Examples:

define next_size = ''

-> Oracle defines the auto-extension of the TS file.

define next_size = '10M’

-> the file will be extended by 10 MB, if needed.

During the setup the given value is written into the table ARC_CONFIG as the default value. For single archive groups this can be over-configured afterwards (ARC_GROUP table).

uniform_size

Default uniform size in megabytes for the normal and temporary tablespace. NOTE that the value of this entry has to be smaller than the value of next_size (see above).

Size of the extents that will be newly allocated in the table space.

If the table space is getting to small, a new extent will be allocated. Thereby uniform_size specifies the type of the extension: If no value is defined (''), the extents will be calculated by Oracle automatically (the larger the table space already is, the larger the new allocated extent will be). Otherwise just one extent with the specified size will be load.

The size specification has the following form: <value>+<sizeID>. Valid size IDs are 'K' (kilobytes), 'M' (megabytes), 'G' (gigabytes) or 'T' (terabytes).

Examples:

define uniform_size = '5M'

-> Table space will be extended by one extent with the size of 5 MB constantly.

define uniform_size = ''

-> Oracle decides about the size of the allocated extents.

During the setup the entered value will be written into the ARC_CONFIG table as the default value. For single archive groups this value can be over-configured afterwards (ARC_GROUP table).

Notes:

  1. If the expected size of the archives is big, the usage of uniform_size is meaningful since the raising of the table space can be better controlled.

  2. Relation to next_size: If the allocated extent is to big for the current table space file, then the file will be extended by the value of next_size.

physical_attributes

Physical memory parameters for the archive tables.

The entered value equates 1:1 to the Oracle <physical_attributes_clause>, but can be also empty. The syntax is described in detail in the Oracle SQL reference under „Common SQL DDL Clauses / physical_attributes_clause“. In most of cases this value should be empty ('').

The following three parameters amongst others can be specified in physical_attributes (if single parameters are missed, Oracle uses the default values or determines the values dynamically):

STORAGE_CLAUSE: Storage options for table creations. Thereby the minimum initial size of the object ("INITIAL") and the number allocated extents at the beginning ("MINEXTENTS") are important - the higher value of them both decides about the initial size of the table. The extent size is the same as specified in next_size.

PCTFREE: Percentage. A block is then full, when less than the specified percentage is free. The knowingly free space is used for updates. The often updates are made, the higher must be the specified value - the Oracle default is 10 percent.

INITRANS: number of the at the beginning available transaction slots in a data block. Oracle default is 1 or 2 - depending on the application. If in one table a lot of updated are executed simultaneously, the value can be increased. Oracle may to increase the number of slots dynamically, if required, but the processes would wait for free slots for a time. Normally, this value does not have to be specified.

Note:

AUTO SEGMENT SPACE MANAGEMENT is used. Thus other parameters like i.e. PCTUSED make here no sense. For continuative information or the detailed syntax see the Oracle reference under „Common SQL DDL Clauses / storage_clause“.

Examples:

define physical_attributes = ''

-> Oracle defines the behavior and the space of the table (recommended).

define physical_attributes = 'PCTFREE 20 INITRANS 10 STORAGE (INITIAL 10M MINEXTENTS 2)'

-> Example including all options: blocks are detected as "full", when more than 80% are occupied. The initial size of a table is 10M and there are minimum two extents allocated - if the size of the both extents is bigger than 10MB, they would decide about the initial size of the table.

Important notes for users of prior RDB versions:

The parameters "physical_attributes" and "physical_attrib_idx" replace the parameters "storage_clause" and "storage_clause_idx“.

If you have already defined a "storage_clause" and you want to keep it, insert the keyword STORAGE before the clause. For example change '(INITIAL 10M MINEXTENTS 1 MAXEXTENTS UNLIMITED)' to 'STORAGE (INITIAL 10M MINEXTENTS 1 MAXEXTENTS UNLIMITED)'.

Since the new clause is more general, the STORAGE keyword is required.

Note that these changes have an effect on templates of archive groups in the tables ARC_STATEMENT and ARC_TEMPLATE and thus the contents have to be actualized accordingly. Therefore an update script for the RDB version is available.

physical_attrib_idx

Physical storage parameter for archive indices.

For settings and notes of this parameter see the table parameter physical_attributes. Especially allow for the notes for users of prior versions.

threshold_append

Parameter for inserting control of archive data into the Oracle database. The size defines the number of data sets per block.

In blocks, which content this specified number of archive data sets or more, the append hint /* +APPEND */ is used for the inserting of archive data into the Oracle database. If the value is 0, append hint will not be used.

Append hint accelerates the inserting process at the expense of the space consumption. It arranges that Oracle does not check whether there is space left in a given block, but it creates a new block, where all lines of the block are written in.

The recommended value is 100. According to experience the given capacity is utilized well and the writing process is fast enough.

use_arc_idx_ts

define use_arc_idx_ts = 'yes'

Activate or deactivate this index of the time stamp. Normally, this index is activated. The use of indexes make the queries basically faster.

>Entries for Disaster Recovery System (DRS) and/or Historical Synchronization

Parameter Description
whatpackage

Specification of the package to be installed.

define whatpackage = '2x2' -> the entries will be set for DRS.

define whatpackage = 'fwd' -> the entries will be set for the historical synchronization.

connect_first

First Connect Identifier of the local database (name for the connection to the database instance, as for example defined in "tnsnames.ora"), stands for example in sqlplus after the @ ("at sign"). This cane be also determined via the tnsping command.

define connect_first = '&connect_identifier' -> the Connect Identifier is adapted from the connect_identifier entry.

connect_second Second Connect Identifier of the distant database.
whatinstall

Defines, where the package should be installed:

1 -> on the first site

2 -> on the second site

3 -> on both sites

syncjob_intval Interval in minutes between the starts of the synchronization jobs (new changes will be synchronized and previously failed synchronization processes will be retried to be synchronized).
maxintval_len

Only for DRS:

Maximal synchronization interval length (in seconds, default = 60) for splitting up a synchronization into small packages. Thus a synchronization, for example, over a slow data cable or link also becomes possible.

Example:

Synchronization should take place over a 3 hour period of time and the interval length is set to 600. This means that the 3 hours are split into 18 packages.

system_first

Only for DRS:

System ID of the first or local system (PSS) to match the system ID of the second or remote system. The system ID of the second system is system_second (see below).

system_second

Only for DRS:

System ID of the second or remote system to match the system ID of the first or local system. The ID of the first system is system_first (see above).

system_first2

Optional and only for DRS. If there is a second DRS system, the options system_first2 and system_second2 are used. These are options for the first (PSS) and second (SSS) system of the second DRS system.

System ID of the first or local system to match the system ID of the second or remote system. The system ID of the second system is system_second2 (see below).

system_second2

Optional and only for DRS. If there is a second DRS system, the options system_first2 and system_second2 are used. These are options for the first (PSS) and second (SSS) system of the second DRS system.

System ID of the second or remote system to match the system ID of the first or local system. The system ID of the first system is system_first2 (see above).

IOT_enabled

Defines if Index Organized Tables (IOTs) can be used inside the Oracle database.

Following parameter can be used:

  • "yes" = IOTs enabled

  • "no" = IOTs not enabled