Teamcenter Oracle Database Maintenance 2.0
Teamcenter Oracle Database Maintenance 2.0
White Paper
A Technical White paper describing Teamcenter’s
best practices for use in an Oracle DB environment.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
2
© 2018 Siemens Product Lifecycle Management Software Inc. No part of this document may
be copied, reprinted, or distributed without the written permission of Siemens Product
Lifecycle Management Software Inc. (“Siemens PLM Software”), except that entities with a
Teamcenter® Maintenance Agreement in force may reproduce this document for their
internal use only.
Siemens is a registered trademark of Siemens AG. The Siemens logo is a registered trademark
of Siemens AG. Teamcenter® is a trademark or registered trademark of Siemens Product
Lifecycle Management Software Inc. or its subsidiaries in the United States and in other
countries. Siemens PLM Software Teamcenter® and Transforming the process of innovation are
trademarks or registered trademarks of Siemens PLM Software or its subsidiaries in the US and
in other countries. Adobe and Acrobat are either registered trademarks or trademarks of
Adobe Systems Incorporated in the United States and/or other countries. All other trademarks
or registered trademarks belong to their respective holders.
This software and related documentation are proprietary to Siemens PLM Software.
Note: The pages of this document are numbered consecutively 1…N without the usual
Roman numeral numbering of the front matter. This makes the document’s page
numbers consistent with the numbers displayed by the Adobe® Acrobat® viewer and
simplifies printing of page ranges from Acrobat.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
3
DOCUMENT HISTORY
Version Date Author Description
CONTRIBUTORS
REVIEWERS
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
4
Table of Contents
1 INTRODUCTION 5
2 ASSUMPTIONS 5
3 BEST PRACTICES 5
3.1 USE DEDICATED PHYSICAL SERVER BOX FOR RUNNING THE TEAMCENTER DATABASE 5
3.2 COLLECT TEAMCENTER SCHEMA STATISTICS ON DAILY BASIS 6
3.3 VERIFYING TEAMCENTER INDEXES 7
3.4 SET UP DATABASE PARAMETERS FOR PERFORMANCE EFFICIENCIES 7
3.5 COALESCE INDEXES TO REDUCE SPACE CONSUMPTION AND IMPROVE PERFORMANCE 12
3.6 DROP TEMPORARY TABLES THAT ARE NO LONGER USED 12
3.7 DETECT SLOW RUNNING SQL STATEMENTS FROM APPLICATION SERVER AND TUNE THEM IN
TEAMCENTER DATABASE 13
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
5
1 Introduction
This document provides information on Teamcenter Oracle Database Maintenance Best
Practices. These practices should be followed along with regular maintenance of the Oracle
database such as space and alert log monitoring, to improve and maintain performance of
the Teamcenter database.
2 Assumptions
2.1 INFODBA schema
The Teamcenter schema is assumed to have been named as INFODBA which is the
default setting used by TC schema Installation scripts. It is possible that this name might
have been changed during initial installation and you may have different Teamcenter
schema name. Please make schema name changes in the commands and scripts below
to reflect TC schema name at your site.
3 Best Practices
3.1 Use dedicated Physical server box for running the Teamcenter database
The Teamcenter application consumes server resources e.g. CPU, memory and disk I/O
extensively and thus it is recommended that Teamcenter Oracle database be set up on
its own physical server and that server should not be used to set up or run any other
databases or applications. The Teamcenter Oracle database should not be run on a
virtual machine of any kind as the demands for the resources made by the TC
application on the database cannot be met efficiently due to changing load conditions.
The Teamcenter database should not be used to run or install schemas of other
applications as TC Oracle database needs to be tuned to efficiently run the Teamcenter
application and tuning it to run other applications may conflict with TC applications
operations. The CPU utilization on the database server should be kept below 80%.
Above that level, the response times of the application degrade significantly. The
memory utilization by SGA and PGA combined should not exceed 80% of the total
memory of the server. At least 10% of total memory should be left for consumption by
the Operating system and other Oracle processes such as listeners. In no situation,
should the swapping of memory be allowed on the Oracle database. Check swap space
utilization using vmstat and swap –l commands and set swap usage parameters such as
swapiness on Linux to 10 or lower value for the database server. The huge pages should
be set up for managing memory on Linux platforms for the database SGA and PGA. The
huge pages need to be set up in Kernel and server needs to be rebooted before starting
the database instance on the server so SGA and PGA can grab huge pages from the
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
6
memory map to efficiently use memory pages. The I/O storage subsystem should be set
up to protect the data from disk failures and to provide throughput of less than 5
ms/block for the Oracle read and write operations.
The network factor that most affects database performance for Teamcenter is latency.
For many operations, Teamcenter makes multiple queries to the database server to
make the user experience more interactive with more real-time feedback.
Each query and result must traverse the distance between client and server. If 100
queries are made across a 200ms latency WAN network link, then the overall operation
requires 20 seconds to complete. That same operation on a 1 ms LAN requires only
1/10th of a second, which is imperceptible to the user. The Performance of the TC
application is noticeably slower if the network latency exceeds 5–10 ms between
tcserver process and the database server.
https://access.redhat.com/documentation/en-
us/red_hat_enterprise_linux/6/html/performance_tuning_guide/s-memory-tunables
https://docs.oracle.com/cd/E11882_01/install.112/e41961/memry.htm#CWLIN382
The Teamcenter schema is an active schema and it updates several tables and indexes
continuously during normal operation of the application. This results in significant
amount of data changes caused by DML statements issued by the application. In order
to generate efficient execution plans for queries issued by the application, the Oracle
query optimizer needs the latest and current statistics that are 100% accurate. To
generate accurate statistics, run following command while connected to the database as
sysdba.
This command needs to be set up to run on a daily basis during time when application
activity is known to be minimal in the day (off hours for the users). During this activity,
the data from all tables owned by INFODBA schema is read by the server process that is
running the statistics command and it uses parallel query servers with default degree or
number to run full scan of the data to collect statistics. The time taken for collecting
statistics depends upon size of the INFODBA schema, buffer cache or size of the SGA,
available CPU to run the activity and I/O throughput of the I/O subsystem.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
7
The statistics collection job needs to be set up in either the crontab of oracle user on
UNIX or Linux or in the Windows scheduler or in Oracle database scheduler. This job
needs to be run on a daily basis to generate accurate statistics for the optimizer to
generate efficient execution plans for all queries that are executed by the application.
If missing indexes are found, then add them back using index_verifier utility as given
below
Do not create missing indexes reported by index_verifier using install utility because
they are already Teamcenter POM data dictionary and index_verifier recreates them
using known definition using DO_IT option.
New indexes, if they are deemed necessary can be added to the Teamcenter INFODBA
schema as below.
Do not add any index using sqlplus directly in the INFODBA schema as it will not be
registered in the POM data dictionary and may get dropped during upgrades or
deployments.
Following parameters should be set in Teamcenter Oracle database which are based
on best practices to achieve performance efficiencies of the database in running
queries and DML statements.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
8
3. Compatible: Recommended value – your RDBMS version – set it to your 3 digit RDBMS
version e.g. 11.2.0. This parameter specifies the release with which Oracle must
maintain compatibility. Allows database to fully use features of the new release and to
maintain backward compatibility.
6. Db_block_size: Recommended value – 8192 – standard value for hybrid databases who
have OLTP and long transaction mix which TC has. Also matches standard OS block size
on most UNIX and Linux operating systems making I/O efficient.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
9
10. Dml_locks – Recommended value – 1024 – Since TC database has large number of
transactions happening parallel by many sessions, dml_locks ensures that sufficient DML
locks are available for tables to be locked during transactions.
14. Log_buffer – Recommended value – 1MB – Used by log writer to write committed and
uncommitted transaction data for redo operations. Circular buffer and it is overwritten
as redo data is written to redo logs. If redo logs are set up on fastest available devices
and have I/O rate that does not cause log sync waits then log_buffer is set up right. Per
Oracle no benefit is gained by setting value greater than 1MB. Monitor REDO BUFFER
ALLOCATION RETRIES statistic over a period of time and it should remain 0 or to a small
number if log_buffer is sized correctly.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
10
23. Processes – Recommended value – depends on user activity – Set it high enough to
accommodate all database user process generated by the application. If this limit on
processes is reached then user connection fails to open a session and message is written
in the alert log.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
11
32. Statistics_level – Recommended value – TYPICAL – default value that allows database to
collect required statistics to measure performance metrics of the database.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
12
34. Timed_statistics – Recommended value – TRUE – default value that allows timing
statistics to be collected for various events in the database for waits and performance
metrics.
Ref: Oracle support note - Index Rebuild, the Need vs the Implications (Doc ID 989093.1)
https://asktom.oracle.com/pls/apex/asktom.search?tag=rebuilding-indexes-200202
Run the SQL statement below to find the count of temporary tables in your TC database.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
13
The command below when ran from TC application server, lists all temporary tables in
the TC database
The command below when ran from TC application server, drops temporary tables in
the TC database that are created older than certain date.
Any temporary table that is dropped or purged will get recreated if it is needed for
application use so dropping temporary tables older than a month usually helps to keep
temporary table count low enough to not affect database performance.
3.7 Detect slow running SQL statements from application server and tune
them in Teamcenter database
The TC_SLOW_SQL environment variable can be set in the Teamcenter application server
as given below and then SQL statements running slower in the TC database than set
threshold are reported in the syslog on the application server.
TC_SLOW_SQL=10 --- Reports SQL statements that ran over 10 seconds in syslog
TC_SLOW_SQL=-1 --- Turns off slow SQL reporting. In production database,
The SQL Statements found in syslogs that are considered to be candidate for tuning
need to be found in database AWR reports so their SQL ID could be found and then
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
14
further actions regarding execution plans, SQL profiles and SQL baselines can be taken
after thorough performance analysis of the SQL statements.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted
White Paper | Teamcenter Oracle Database Maintenance Best Practices
15
Step 2: To create the sql script to coalesce all INFODBA indexes copy following commands in a sql script called
bc.sql and run it. It will create script to be run in next step.
set echo off feed off serveroutput off term off head off lines 120 pages 0
spool coalesce_indexes.sql
select 'set echo on feed on time on' from dual;
select 'spool coalesce_indexes.log' from dual;
set serveroutput on
BEGIN
FOR INDEx_RECORD IN (select owner||'.'||object_name as obj
from dba_objects
where object_type = 'INDEX' and
owner =(select owner from dba_segments where segment_name='PPOM_USER')
order by created desc
)
LOOP
dbms_output.put_line ('ALTER INDEX '||INDEx_RECORD.obj||' COALESCE;');
END LOOP;
END;
/
select 'spool off' from dual;
select 'exit' from dual;
spool off
Step 3: Now run coalesce_indexes.sql script created by running above bc.sql script.
Step 4 : Collect full statistics on the INFODBA schema after the indexes are coalesced.
Issued by: Siemens PLM Software. © 2018. Siemens Product Lifecycle Management Software Inc. All rights reserved.
Unrestricted