Professional Documents
Culture Documents
Supported versions
Oracle 10.2 Enterprise Edition
Due to the limits as regards online reorganization, the Oracle Standard Edition is not suitable for a round-theclock operation of a UC4 system and should therefore only be used for smaller UC4 systems.
Scenarios
Both the general settings for operating an Oracle database and the particularities of the database configurations
that are supported by the UC4 platform are described below.
General installation requirements
Hardware/infrastructure
We recommend using an external disk subsystem with a connection via Fibre Channel for the data files.
Under no circumstances should local disks with software RAID be used, as this could negatively affect
the performance of the database and thereby that of the entire UC4 system.
Latency periods are not too long when the UC4 platform Server accesses the database (ping response
with 8 K packet size < 1 ms). The same requirement applies when using RAC or Data Guard for the
communication between database nodes.
The speed of light is the physical limit for the distance between UC4 server and database that is
theoretically possible, because a signal can cover only a maximum of 200 km/ms under optimal
conditions (fibre optic cable without attenuation). This means that for a ping to a remote system with a
response time of 1 ms the distance may only be between 10 and 20 km. Whether such a distance can be
bridged in practice without inserting active components (repeaters) depends on the cable attenuation,
among other things. If the attenuation is too high, additional components must be inserted that may
further increase the signal propagation delay. The signal time may increase further if the electrical signals
have to be converted into light waves.
The database server must have sufficient RAM and a suitable swap area on the local disk.
The database system(s) must be equipped with CPUs appropriate to the load. The run queue length of
the available processors under high load can serve as a guideline in this respect. If the run queue is
frequently longer than 1, you may need to employ more CPUs.
o
The number of active components, such as routers, switches or firewalls on the path between the UC4
server and database should be minimized so as not to slow down access and to avoid single points of
failure.
Parameter REPORT_BLKSIZE=8000
Reconfiguration UC_SYSTEM_SETTINGS
Parameter REPORT_BLKSIZE=8000
Parameter LAST_USE=0
The LAST_USE parameter in the UC4 UC_SYSTEM_SETTINGS variables affects performance in the RAC/Data
Guard environment in particular, but it can also lead to improvements in performance for stand-alone databases.
Database
The database block size should be set to 8192 bytes during installation. This setting should be the default
for Oracle 10g.
The following NLS character sets are available for UC4 operation. The character set must be set during
installation of the database.
1. GERMAN_GERMANY.WE8ISO8859P15
2. GERMAN_GERMANY.WE8ISO8859P1
3. AMERICAN_AMERICA.WE8ISO8859P15
4. AMERICAN_AMERICA.WE8ISO8859P1
After installation, the setting can be checked using the SQL statement
select * from sys.nls_database_parameters;
Sample output:
PARAMETER
-----------------------------NLS_LANGUAGE
NLS_TERRITORY
NLS_CURRENCY
NLS_ISO_CURRENCY
NLS_NUMERIC_CHARACTERS
NLS_CHARACTERSET
...
VALUE
---------------------------------------AMERICAN
AMERICA
$
AMERICA
.,
WE8ISO8859P1
The version of the database client installed should be the same as that of the server.
SQLNET.ORA
TCP_NODELAY = YES (Validation: Database server and client)
Setting the parameter means that an acknowledgement is not required for every packet simultaneously,
so performance improves.
TNSNAMES.ORA
ENABLE=BROKEN (Validation: Database client)
This parameter must be entered at the beginning of the tnsnames entry, as shown
in the following example.
Example:
UC4P =
(DESCRIPTION =
(ENABLE=BROKEN)
(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = UC4P)
)
)
This parameter is necessary to ensure that a connection termination on the side of the database client is
detected if the database server is no longer in the position to end a database session, either in a
controlled way or using Dead Connection Detection. Existing TCP connections are checked in the preset
interval and if the remote station does not respond, the connection is automatically terminated. Thus, the
associated database session is ended and the Oracle client can send an error report to UC4 so that a new
connection can be established.
CPU:
RAM:
min. 16 GB
Gigabit network connection between the UC4 servers and the database with the least possible active
components on the path.
If the data files of the database are stored externally, the speed of the external disk subsystem as well as
its high-performance connection (e.g. Fibre Channel) must be considered.
Database
Tablespaces for UC4 should be created with ASSM (Automatic Segment Space Management).
In addition to several performance advantages when inserting data, ASSM also allows tables to be
transparently reorganized.
Statistics
The access statistics of the database tables should be regularly updated. To do so, a daily update job
(GATHER_STATS_JOB) is scheduled during database installation, as long as this option is not explicitly
deselected. The time of the daily update can be freely selected and should take place in the UC4 system
during times of high load, in order to calculate representative values. Should an automatic update
controlled by Oracle not take place, an update can be scheduled in UC4 with the following statement.
Example:
sqlplus>select TABLE_NAME,NUM_ROWS,LAST_ANALYZED from USER_TABLES;
Exception:
Because it is not necessary to create access statistics for the UC_TEMP* tables (UC_TEMP, UC_TEMP1,
UC_TEMP2, UC_TEMP3,), any available statistics for these tables must be deleted and the tables then
locked so that new statistics can be created.
SQL statements:
exec dbms_stats.delete_table_stats('uc4','UC_TEMP');
exec dbms_stats.lock_table_stats('uc4','UC_TEMP');
exec dbms_stats.delete_table_stats('uc4','UC_TEMP1');
exec dbms_stats.lock_table_stats('uc4','UC_TEMP1');
exec dbms_stats.delete_table_stats('uc4','UC_TEMP2');
exec dbms_stats.lock_table_stats('uc4','UC_TEMP2');
exec dbms_stats.delete_table_stats('uc4','UC_TEMP3');
exec dbms_stats.lock_table_stats('uc4','UC_TEMP3');
Listing 1: Exceptions for automatic creation of statistics
Fragmentation
If the number of entries in the UC4 message queue (MQ* tables) has greatly increased (several 10000
entries), e.g. due to a malfunction, these tables may be very fragmented. This can hinder the
performance of the UC4 system, since it is precisely these tables that are used most. In order to
overcome the fragmentation, the following DB statements can be used when a UC4 system has stopped
(all CP and WP processes). In this case, it is necessary to cold start the UC4 system (StartMode=COLD in
ucsrv.ini or via the Context Menu in the Service Manager dialog).
truncate
truncate
truncate
truncate
truncate
truncate
truncate
truncate
truncate
truncate
truncate
commit;
table
table
table
table
table
table
table
table
table
table
table
MQCP001;
MQCP002;
MQCP003;
MQCP004;
MQCP005;
MQPWP;
MQSRV;
MQLS;
MQMEM;
MQDWP;
MQWP;
The tables can also be reorganized online (while UC4 is running) using:
alter table MQCP001 ENABLE ROW MOVEMENT;
alter table MQCP001 SHRINK SPACE CASCADE;
exec dbms_stats.gather_table_stats('UC4','MQCP001',estimate_percent=>100,
method_opt=>'FOR ALL INDEXED COLUMNS SIZE AUTO',cascade=>FALSE);
Alternatively, defragmentation can also be carried out online using alter table <TABLE> move. However,
all associated indexes must then be newly constructed and the access statistics recreated, as shown
here:
alter table MQCP001 move;
alter index PK_MQCP001 rebuild online;
alter index NK_MQCP001_BACV rebuild online;
alter index NK_MQCP001_PRIO rebuild online;
exec dbms_stats.gather_table_stats('UC4','MQCP001',estimate_percent=>100,
method_opt=>'FOR ALL INDEXED COLUMNS SIZE AUTO',cascade=>FALSE);
The above statements must be repeated for the tables MQCP002 to MQCPxxx.
alter table MQPWP move;
alter index PK_MQPWP rebuild online;
alter index NK_MQPWP_PRIORITY rebuild online;
exec dbms_stats.gather_table_stats('UC4','MQPWP',estimate_percent=>100,
method_opt=>'FOR ALL INDEXED COLUMNS',cascade=>TRUE);
The above statements must be repeated for the tables MQDWP, MQWP and MQQWP.
alter table MQMEM move;
alter index PK_MQMEM rebuild online;
exec dbms_stats.gather_table_stats('UC4','MQMEM',estimate_percent=>100,
method_opt=>'FOR ALL INDEXED COLUMNS',cascade=>TRUE);
The above statements are to be repeated for the tables MQSRV to MQLS.
Listing 3: Defragmenting the MQ* tables (online)
|'||to_char(sm,'999G999G999'));
dbms_output.put_line('sorts (disk)
|'||to_char(sd,'999G999G999'));
dbms_output.put_line('-------------------------------');
dbms_output.put_line('memory hit Rate % |'||
to_char (round(100-(100*sd/sm),2),'999D00'));
end;
/
Listing 5: Determining the memory hit rate
Memory Advisor
The Memory Advisor can also be used for this purpose and PGA_AGREGATE_TARGET should be used.
Similar to scenario 1; it is also recommended to use identical hardware for all cluster nodes.
If the UC4 server is also running on the same cluster, then the database client must be parameterized in
such a way that a reconnect to the new DB instance can be made after pivoting a cluster.
Database
Similar to scenario 1
Scenario 3 (RAC)
The UC4 platform is not fully RAC-enabled, as it only benefits from the increased availability of one RAC system,
but its performance does not improve by using RAC technology. Instead, by setting the following parameters, you
can ensure that only one node of the RAC system is used for communication, in order to minimize data traffic
through the cluster interconnect and thereby the administration overheads. Furthermore, this reduces the
probability of deadlocks in the database through concurrent accesses of several database nodes.
Note:
In general, Oracle works within an RAC node with row-level locking. However, between the RAC nodes, blocklevel transfer and resource locking are used.
To make sure that UC4 is always only connected to one node, we recommend using Cluster Managed Services.
These must be configured so that the service is only running on one node and, if required, is moved by the
cluster software to the second node.
When using an RAC system with UC4, the following database parameters must also be set.
INIT.ORA
active_instance_count = 1
This parameter is only relevant if an RAC system with exactly two nodes is used and ensures
that all database sessions are always only connected at one node. It is not required if Cluster
Managed Services are
being used.
_lm_dd_interval <= 10
This parameter determines the interval for the recognition/removal of deadlocks in the
database.
Filesystemio_options = SETALL
This parameter ensures that the database instance uses both ASYNC I/O and DIRECTIO.
This enables you to achieve the optimal level of performance at a sensible buffer cache
size.
local_listener
This parameter ensures that the database instance registers with the local listener.
remote_listener nur im RAC
This parameter ensures that the database instance registers with the other listener
in the RAC.
TNSNAMES.ORA
(LOAD_BALANCE=ON) (Validation: Database client)
The CONNECT load is thereby equally distributed across all listeners in the RAC.
(FAILOVER=ON) (Validation: Database client)
This parameter ensures that a failover of the database sessions takes place
in so far as the primary RAC node is no longer available.
Example of a corresponding tnsnames.ora entry:
UC4P =
(DESCRIPTION =
(ENABLE=BROKEN)
(ADDRESS = (PROTOCOL = TCP)(HOST = knoten1-VIP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = knoten2-VIP)(PORT = 1521))
(LOAD_BALANCE = on)
(FAILOVER = on)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = UC4P) ### Cluster Managed Service Name
)
)
Listing 7: Example of tnsnames.ora for RAC
Oracle
Figure 1 Oracle Real Application Cluster (RAC)
Hardware/infrastructure
Similar to scenario 1; it is also recommended to use identical hardware for all cluster nodes.
A high-performance connection must be selected (at least Gigabit) for the cluster interconnect. According
to information from Oracle, RAC nodes can be operated smoothly only up to a distance of 3 km! Greater
distances make high demands on the infrastructure and the protocol being used.
Database
Similar to scenario 1
Similar to scenario 1; it is also recommended to use identical hardware for the Data Guard nodes.
Database
Similar to scenario 1
The characteristics of Oracle Data Guard configuration that are relevant for use with UC4 are described below.
Which specifications are used depends on the available infrastructure and the requirements.
Configuration 1 (Maximum Protection - Guaranteed Protection Mode)
Transactions are only registered as committed on the primary database if the transaction was also committed on
at least one standby database. If the transaction cannot be committed to a standby database, the primary
database is not changed.
In this configuration, if the primary database fails, production can continue after a short manual check has been
carried out to see whether the standby database was running at the time of the failure, and after the standby
database has been activated.
Oracle
Figure 2: Data Guard Maximum Protection Mode
10
Oracle
Figure 3: Data Guard Maximum Availability Mode
Oracle
Figure 4: Data Guard Maximum Performance Mode
11
Data Guard
Mode
Workload during
failover
Demands on
infrastructure
UC4 performance
Max. Availability
Low
Start: NORMAL
Very high
Max. Protection
Medium
Start: Possibly
COLD
High
Max.
Performance
High
Start: COLD
High
The graphic below demonstrates the connection between performance and availability of the Data Guard
configurations in comparison to a single instance (without hardware cluster). For a single instance, the availability
is always minimal in comparison to a Data Guard solution. However, performance is barely affected. Conversely,
for Data Guard in the maximum availability mode, the availability is very high but the negative influence on the
performance is also at the maximum level. Therefore, it is recommended when planning to install UC4 Data
Guard to focus on the available infrastructure, so that no performance bottlenecks arise.
Summary
Taking the above configuration options and their parameter settings into account, large UC4 systems can be
operated with Oracle databases at a high level of performance and availability.
The best option differs depending on the situation and is greatly determined by the available infrastructure and
the demands involved.
12