To achieve top performance, Automic recommends keeping the following recommendations in mind when installing and operating Oracle.
It is important that you reorganize the AE database including all clients regularly as an extensive database affects performance negatively (prolonged access times etc.).
Set the OS parameter tcp_keepalive <= 5 minutes (valid for the database client).
This parameter is necessary to ensure that a connection failure on database-client side can be detected when 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 connection partner does not respond, the connection is automatically terminated. The associated database session ends and the Oracle client can send an error report to the AE so that a new connection can be established.
UC4P =
(DESCRIPTION =
(ENABLE=BROKEN)
(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED) (SERVICE_NAME = UC4P)
)
)
Table |
Approximate size in percent |
---|---|
RT |
40% - 60% |
AH |
20% - 30% |
MELD |
10% - 20% |
AJPP |
5% |
RH |
5% |
Other tables |
< 1% |
Regular Oracle Database Maintenance
Hardware/Infrastructure
Database
sqlplus> alter index <index_name> rebuild online;
SQL statement to update the statistics of the database UC4 (1 row):
exec dbms_stats.gather_schema_stats('UC4',options=>'GATHER AUTO', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
You can also use the following statement, it generates more suitable statistics in certain cases.
exec dbms_stats.gather_schema_stats('UC4',options=>'GATHER AUTO', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO', cascade => TRUE);
To check if and when the statistics were last updated, use the 'USER_TABLES’ view. For example:
sqlplus>select TABLE_NAME,NUM_ROWS,LAST_ANALYZED from USER_TABLES;
Exception:
It is not useful to create access statistics for the UC_TEMP* tables (UC_TEMP, UC_TEMP1, UC_TEMP2, UC_TEMP3,). Therefore, you need to delete all statistics that might be available for these tables. Then lock the tables so that new statistics can be created.
SQL statements for automatically creating statistics:
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'); e
xec dbms_stats.lock_table_stats('uc4','UC_TEMP3');
Fragmentation
It might happen that the number of entries in the AE message queue (MQ* tables) has highly increased (several 10000 entries) because of a malfunction and these tables may be very fragmented. This can negatively affect the performance of the AE system because these tables that are used most. To solve the fragmentation problem, you stop the AE system (all CP and WP processes) and use the DB statements shown below. Afterwards, you cold start the AE system (StartMode=COLD in the file ucsrv.ini or via the context menu in the ServiceManager dialog).
SQL statements for defragmenting the MQ* tables (offline)
truncate table MQCP001;
truncate table MQCP002;
truncate table MQCP003;
truncate table MQCP004;
truncate table MQCP005;
truncate table MQPWP;
truncate table MQSRV;
truncate table MQLS;
truncate table MQMEM;
truncate table MQDWP;
truncate table MQWP;
commit;
You can also reorganize the tables online while the AE is running by using the following statements:
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);
Alternately, you can also defragment the tables online using ‘alter table <TABLE> move’. in this case, you must rebuild all associated indexes and recreate the access statistics as shown here:
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
Buffer cache hit rate
Basically, the buffer cache hit rate should be more than 98%. The following script is an example for calculating the current value.
Calculating the buffer cache hit rate:
-- DB_BLOCK_BUFFERS: 'buffer cache hit rate %' should be > 98% execute dbms_output.put_line(chr(9));
execute dbms_output.put_line(chr(9));
execute dbms_output.put_line('>>>>>> DB_BLOCK_BUFFERS: "buffer cache hit rate %" should be > 98%');
execute dbms_output.put_line(chr(9)); declare dbg number;
cg number;
pr number;
begin
select value into dbg from v$sysstat
where name = 'db block gets'; select value into cg
from v$sysstat
where name = 'consistent gets'; select value into pr
from v$sysstat
where name = 'physical reads'; dbms_output.put_line('db block gets
|'||to_char(dbg,'999G999G999G999')); dbms_output.put_line('consistent gets
|'||to_char(cg,'999G999G999G999')); dbms_output.put_line('physical reads
|'||to_char(pr,'999G999G999G999'));
dbms_output.put_line('---------------------------------------- ');
dbms_output.put_line('buffer cache hit rate in % |'|| to_char (round(100*(1-(pr/(dbg+cg))),2),'999D00')); end;
/
Memory hit rate
Basically, the memory hit rate of the sort area should be greater than 99%. The following script is an example for calculating the current value.
-- SORT_AREA_SIZE: memory hit rate % should be > 99%
execute dbms_output.put_line(chr(9));
execute dbms_output.put_line(chr(9));
execute dbms_output.put_line('>>>>>> SORT_AREA_SIZE: "memory hit rate %" should be > 99%');
execute dbms_output.put_line(chr(9));
declare sm number;
sd number;
begin
select value into sm
from v$sysstat
where name = 'sorts (memory)';
select value into sd
from v$sysstat
where name = 'sorts (disk)';
dbms_output.put_line('sorts (memory)
|'||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;
/
Shared pool size
Out of the total number of all accesses, the percentage of unsuccessful accesses to the library cache within the shared pool should, in general, be much smaller than 1%. The following script is an example for calculating the current value.
-- SHARED_POOL_SIZE: 'Misses %' should be << 1%
execute dbms_output.put_line(chr(9));
execute dbms_output.put_line(chr(9));
execute dbms_output.put_line('>>>>>> SHARED_POOL_SIZE:
"Misses %" should be << 1%');
column 'misses %' format a10
select sum(pins) "Executions",
sum(reloads) "Cache Misses while Executing",
to_char(sum(reloads)/(sum(pins)+sum(reloads))*100,'990D0000')
"Misses %"
from v$librarycache
Memory Advisor
You can also use the Memory Advisor for this purpose. PGA_AGREGATE_TARGET should be used.