Vous êtes sur la page 1sur 144

IT Auxiliary

V100R001C00
Oracle 11G R1 Preventive
Maintenance Guide

Issue 01

Date 2013-06-30

HUAWEI TECHNOLOGIES CO., LTD.


Copyright © Huawei Technologies Co., Ltd. 2013. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior
written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions


and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.

All other trademarks and trade names mentioned in this document are the property of their respective
holders.

Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Technologies Co., Ltd.


Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China

Website: http://www.huawei.com

Email: support@huawei.com

Huawei Proprietary and Confidential


Issue 01 (2013-06-30) Copyright © Huawei i
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide About This Document

About This Document

Intended Audience
This document describes preventive maintenance standards, methods, and troubleshooting for
the Oracle database 11g Release 1.
This document is intended for:
 Customer maintenance engineers
 Huawei maintenance engineers

Change History
Updates between document issues are cumulative. Therefore, the latest document issue
contains all updates made in previous issues.

Issue 01 (2013-06-30)
First official release.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential ii


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide Contents

Contents

About This Document....................................................................................................................ii


1 PMI Description............................................................................................................................1
1.1 Preventive Maintenance Classification..........................................................................................................................1
1.2 Codes of Preventive Maintenance Items........................................................................................................................2

2 Automatic Preventive Maintenance...........................................................................................4


2.1 Preventive Maintenance Items for HP-UX Configuration.............................................................................................4
2.1.1 SSTAA001A-Checking Kernel Parameters.................................................................................................................4
2.1.2 SSTAA002A-Checking Shared Memory Configurations...........................................................................................7
2.1.3 SSTAA003A-Checking Asynchronous I/O Configurations........................................................................................8
2.1.4 SSTAA004A-Checking Patch Packages....................................................................................................................11
2.1.5 SSTAA005C-Checking Host Names.........................................................................................................................12
2.1.6 SSTAA006A-Checking the Swap Partition...............................................................................................................13
2.2 Preventive Maintenance Items for AIX Configuration................................................................................................15
2.2.1 SSTAB001A-Checking Kernel Parameters...............................................................................................................15
2.2.2 SSTAB002A-Checking I/O Configurations..............................................................................................................16
2.2.3 SSTAB003A-Checking the Operating System Version and Packages......................................................................17
2.2.4 SSTAB004A-Checking Whether the pvid Feature Is Disabled.................................................................................20
2.2.5 SSTAB005A-Checking the fc_err_recov Attribute Value for FSCSI Devices..........................................................21
2.2.6 SSTAB006A-Checking the Swap Partition...............................................................................................................23
2.2.7 SSTAB007A-Checking the Virtual Memory and File Cache....................................................................................24
2.3 Preventive Maintenance Items for SuSE Linux Configuration....................................................................................26
2.3.1 SSTAC001A-Checking Kernel Parameters...............................................................................................................26
2.3.2 SSTAC002A-Checking the limits.conf File..............................................................................................................28
2.3.3 SSTAC003A-Checking Shell Environment Configurations for Oracle Database Users..........................................29
2.3.4 SSTAC004A-Checking System Users' Environment Parameters.............................................................................31
2.3.5 SSTAC005A-Checking the Operating System Version and Packages......................................................................32
2.3.6 SSTAC006A-Checking the Swap Partition...............................................................................................................34
2.3.7 SSTAC007A-Checking Asynchronous I/O Configurations......................................................................................35
2.3.8 SSTAC008A-Checking Shared Memory Configurations..........................................................................................37
2.4 Preventive Maintenance Items for Database Configuration.........................................................................................38
2.4.1 SSTAD001A-Checking the Database Version..........................................................................................................38

Issue 01 (2013-06-30) Huawei Proprietary and Confidential iii


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide Contents

2.4.2 SSTAD002A-Checking Database Patches................................................................................................................39


2.4.3 SSTAD036A-Checking Database Patches and CRS Patches....................................................................................40
2.4.4 SSTAD003B-Checking Character Sets.....................................................................................................................41
2.4.5 SSTAD004A-Checking Database Parameters...........................................................................................................43
2.4.6 SSTAD005B-Checking the spfile..............................................................................................................................47
2.4.7 SSTAD006B-Checking the Database Recycle Bin...................................................................................................48
2.4.8 SSTAD007A-Checking Status of Automatic Maintenance Tasks.............................................................................50
2.4.9 SSTAD008A-Checking Whether Resource Plans Are Disabled...............................................................................51
2.4.10 SSTAD009A-Checking Whether the Password Validity Period Is Unrestricted.....................................................53
2.4.11 SSTAD010C-Checking Whether User Login Triggers Are Disabled.....................................................................54
2.4.12 SSTAD011A-Checking Whether the Number of Consecutive Incorrect Password Inputs Is Unrestricted............55
2.4.13 SSTAD012A-Checking Whether the Listener Log Recording Function Is Disabled.............................................56
2.4.14 SSTAD013A-Checking Whether the Listener Trace Log Recording Function Is Disabled...................................57
2.4.15 SSTAD014A-Checking Whether the Exclusive Connection Mode Is Configured for Database Clients...............58
2.4.16 SSTAD015B-Checking Whether SQLNET.OUTBOUND_CONNECT_TIMEOUT Is Disabled.........................59
2.4.17 SSTAD016A-Checking Database Availability........................................................................................................60
2.4.18 SSTAD017B-Checking the Number of Oracle Processes.......................................................................................62
2.4.19 SSTAD018A-Checking OCR Integrity...................................................................................................................63
2.4.20 SSTAD019A-Checking the Number of Voting Disks.............................................................................................64
2.4.21 SSTAD020A-Checking the Cluster Status..............................................................................................................65
2.4.22 SSTAD021A-Checking CACHE_SIZE for SYS.IDGEN1$ and SYS.AUDSES$.................................................66
2.4.23 SSTAD022C-Checking Whether the Flashback Path Is Closed.............................................................................67
2.4.24 SSTAD035A-Checking the diagwait Parameter.....................................................................................................68
2.4.25 SSTAD023A-Checking Index Validity...................................................................................................................69
2.4.26 SSTAD024A-Checking Whether the Partition Table Contains Global Indexes......................................................70
2.4.27 SSTAD025B-Checking the Parallelism Degrees of Service Objects......................................................................71
2.4.28 SSTAD026B-Checking for Invalid Objects............................................................................................................72
2.4.29 SSTAD027A-Checking crs/oracle Space................................................................................................................73
2.4.30 SSTAD032A-Checking the Interval for Collecting AWR Snapshots......................................................................74
2.4.31 SSTAD033A-Checking RAC Cluster Component Integrity...................................................................................75
2.4.32 SSTAD034A-Checking Status of Database Scheduled Tasks.................................................................................77
2.4.33 SSTAD037A-Checking the Dependency Relationship Between a Database Instance and an ASM Instance........77
2.4.34 SSTAD028A-Checking Whether the Listener Is Configured with a Floating IP Address......................................79
2.4.35 SSTAD029A-Checking the Database Listener Status.............................................................................................80
2.4.36 SSTAD030A-Checking Whether the Listener Uses the Static Registration Mode.................................................82
2.4.37 SSTAD031B-Checking Cluster Network Adapter Configurations.........................................................................83
2.4.38 SSTAD038A-Checking the Number of Audit Files................................................................................................84
2.5 Preventive Maintenance Items for Space Management...............................................................................................85
2.5.1 SSTAE001B-Checking Redo Log Configurations....................................................................................................85
2.5.2 SSTAE002A-Checking the Switching Frequency of Redo Log Files.......................................................................87
2.5.3 SSTAE003A-Checking Data File Status...................................................................................................................88
2.5.4 SSTAE004A-Checking the Number of Control Files...............................................................................................89

Issue 01 (2013-06-30) Huawei Proprietary and Confidential iv


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide Contents

2.5.5 SSTAE005A-Checking Archive Log Configurations................................................................................................91


2.5.6 SSTAE006C-Checking the SYSTEM Tablespace Size.............................................................................................93
2.5.7 SSTAE007C-Checking the SYSAUX Tablespace Size............................................................................................94
2.5.8 SSTAE008C-Checking the UNDO Tablespace Size.................................................................................................95
2.5.9 SSTAE009C-Checking the TEMP Tablespace Size and Properties..........................................................................96
2.5.10 SSTAE010A-Checking Tablespace Usage..............................................................................................................97
2.5.11 SSTAE011A-Checking the Ratio of the Active Extent in the UNDO Tablespace..................................................98
2.5.12 SSTAE012A-Checking Whether the SYSTEM Tablespace Contains Service Objects..........................................99
2.5.13 SSTAE013A-Checking Tablespace Attributes......................................................................................................100
2.5.14 SSTAE014A-Checking for Segments That Require Restructuring.......................................................................101
2.5.15 SSTAE015A-Checking ASM Disk Status.............................................................................................................102
2.5.16 SSTAE016A-Checking ASM Disk Space.............................................................................................................103
2.6 Preventive Maintenance Items for Performance Monitoring.....................................................................................104
2.6.1 SSTAF001A-Checking Wait Events........................................................................................................................104
2.6.2 SSTAF002A-Checking the Database SCN..............................................................................................................105
2.6.3 SSTAF003B-Checking for Lock Wait Events and Library Latch Wait Events.......................................................106
2.6.4 SSTAF004B-Checking the Row Cache Hit Ratio...................................................................................................107
2.6.5 SSTAF005B-Checking the Library Cache Hit Ratio..............................................................................................108
2.6.6 SSTAF006B-Checking the Soft Parse Ratio...........................................................................................................109
2.6.7 SSTAF007B-Checking the Ratio of Available Space in the Shared Pool...............................................................110
2.6.8 SSTAF008B-Checking the Global Cache Performance..........................................................................................111
2.6.9 SSTAF009B-Checking the Global Cache Lock Performance.................................................................................112
2.6.10 SSTAF010B-Checking Whether SQL Statements Are Bound to Variables..........................................................113
2.6.11 SSTAF011A-Checking CPU Usage.......................................................................................................................113
2.6.12 SSTAF012A-Checking I/O Distribution and Performance of Data Files.............................................................115
2.6.13 SSTAF013A-Checking the Database Memory Sorting Ratio...............................................................................116
2.7 Preventive Maintenance Items for Backup and Disaster Recovery...........................................................................117
2.7.1 SSTAG001A-Checking Whether the Real Time Apply Function Is Enabled in the RM Database........................117
2.7.2 SSTAG002A-Checking the Status of the LNS Process in the PM Database..........................................................119
2.7.3 SSTAG003A-Checking the Status of the MRP0 Process in the RM Database.......................................................120
2.7.4 SSTAG004A-Checking the RLink Status...............................................................................................................121

3 Manual Preventive Maintenance...........................................................................................123


3.1 Preventive Maintenance Items for Performance Monitoring.....................................................................................123
3.1.1 SSTAF014A-Checking Whether Service User Statistics Are Correctly Collected.................................................123
3.2 Preventive Maintenance Items for Log Management................................................................................................126
3.2.1 SSTAH001A-Checking Alarm Logs for Oracle Database Instances......................................................................126
3.2.2 SSTAH002B-Checking Connection Logs for Oracle Database Instances..............................................................126
3.2.3 SSTAH003B-Checking Cluster Synchronization Service Logs for Oracle Database Instances.............................127
3.2.4 SSTAH004B-Checking CRS Alarm Logs...............................................................................................................128
3.2.5 SSTAH005B-Checking CRS Directories racg, crsd, and evmd..............................................................................129
3.2.6 SSTAH006A-Checking ASM Background Logs....................................................................................................129

Issue 01 (2013-06-30) Huawei Proprietary and Confidential v


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide Contents

3.3 Preventive Maintenance Items for Backup and Disaster Recovery...........................................................................130


3.3.1 SSTAG005A-Checking Database Backup Sets.......................................................................................................130
3.3.2 SSTAG006A-Checking RM Alarm Logs in the DataGuard Environment..............................................................131
3.3.3 SSTAG007A-Checking PM Archive Log Transmission in the DataGuard Environment.......................................132
3.3.4 SSTAG008A-Checking RM Log Application on the DataGuard Network............................................................133

Issue 01 (2013-06-30) Huawei Proprietary and Confidential vi


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide Figures

Figures

Figure 1-1 Code format...........................................................................................................................................2

Issue 01 (2013-06-30) Huawei Proprietary and Confidential vii


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide Tables

Tables

Table 1-1 Preventive maintenance classification....................................................................................................1

Table 1-2 PMI product types...................................................................................................................................2

Table 1-3 Problem types..........................................................................................................................................2

Table 1-4 Description of problem features..............................................................................................................3

Table 2-1 Expected values of kernel parameters.....................................................................................................4

Table 2-2 Patch packages for HP-UX...................................................................................................................11

Table 2-3 Expected values of database parameters...............................................................................................43

Issue 01 (2013-06-30) Huawei Proprietary and Confidential viii


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide PMI DescriptionPMI Description

1 PMI Description

About This Chapter


The preventive maintenance inspection (PMI) provides a set of preventive maintenance
measures for maintenance personnel to promptly discover and eliminate hidden device defects
or troubles when the device is stable and reliable or before the device goes online.
1.1 Preventive Maintenance Classification
Preventive maintenance operations are classified into automatic preventive maintenance and
manual preventive maintenance.
1.2 Codes of Preventive Maintenance Items
This topic describes the functions and naming rules of codes of preventive maintenance items.

1.1 Preventive Maintenance Classification


Preventive maintenance operations are classified into automatic preventive maintenance and
manual preventive maintenance.
Maintenance items are divided into two types according to maintenance implementation
scenarios, as shown in Table 1-1.

Table 1.1 Preventive maintenance classification


Classification Description

Automatic Maintenance engineers use inspection packages to check the device


preventive environment.
maintenance
Manual preventive Maintenance engineers check the device environment onsite.
maintenance

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 1


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide PMI DescriptionPMI Description

1.2 Codes of Preventive Maintenance Items


This topic describes the functions and naming rules of codes of preventive maintenance items.
A code uniquely identifies a preventive maintenance item.
Figure 1-1 shows the code format of a preventive maintenance item.

Figure 1.2 Code format

The following describes the code format of a preventive maintenance item.


 The first three characters SST indicate the code in the standards. The first S stands for
the Application and Software product line, the second S stands for a software quality
standard, and T stands for the sequence number of IT auxiliary quality standards.
 The fourth character indicates the PMI product type. The types are labeled by letters in
alphabetical order, such as A, B, and C. Table 1-2 describes the PMI product types.

Table 2.1 PMI product types


Type Description

A Oracle 11G R1
B Oracle 11G R2
C DB2
D IBM server
E HP server
F SUN 3510 storage device
G IBM DS4700 storage device
H Fujitsu Dx80 storage device

 The fifth character indicates the problem type. The types are labeled by letters in
alphabetical order, such as A, B, and C. Table 1-3 describes problem types.

Table 2.2 Problem types


Type Description

A Preventive maintenance items for HP-UX configuration


B Preventive maintenance items for AIX configuration
C Preventive maintenance items for SUSE Linux configuration

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 2


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary
Oracle 11G R1 Preventive Maintenance Guide PMI DescriptionPMI Description

Type Description

D Preventive maintenance items for database configuration


E Preventive maintenance items for space management
F Preventive maintenance items for performance monitoring
G Preventive maintenance items for backup and disaster recovery
H Preventive maintenance items for log management

 The sixth, seventh, and eighth digits stand for the number of a preventive maintenance
item. Item numbers start from 000 and continue from A00 at the end of the number 999.
 The ninth digit indicates a problem feature. Problem features are classified into three
categories: A, B, and C, as shown in Table 1-4.

Table 2.3 Description of problem features


Type Description

A A indicates severe problems, including problems in parameter


settings and data configuration. The problems cause severe or
fatal troubles to the running of devices. They must be rectified as
soon as possible. If the problems are caused by the customer,
keep the engineering memo and state the specific situation in the
quality check or self-check reports. For the problems of the
category, the weight of score deduction is greater than or equal to
3.
B B indicates minor problems. Minor problems affect the running
of devices but do not cause severe troubles. They must be
rectified; otherwise, reasons must be stated in the quality check
or self-check reports. For the problems of the category, the
weight of score deduction is greater than or equal to 1.
C C indicates other problems. Other problems have few or no
impact on the running of devices. You are advised to resolve the
problem. For the problems of the category, the weight of score
deduction is greater than or equal to 0.5.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 3


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2 Automatic Preventive Maintenance

About This Chapter


2.1 Preventive Maintenance Items for HP-UX Configuration
2.2 Preventive Maintenance Items for AIX Configuration
2.3 Preventive Maintenance Items for SuSE Linux Configuration
2.4 Preventive Maintenance Items for Database Configuration
2.5 Preventive Maintenance Items for Space Management
2.6 Preventive Maintenance Items for Performance Monitoring
2.7 Preventive Maintenance Items for Backup and Disaster Recovery

2.1 Preventive Maintenance Items for HP-UX


Configuration
2.1.1 SSTAA001A-Checking Kernel Parameters
Check and modify kernel parameters so that the Oracle database runs with high performance
in a proper environment.

Reference Standard
Table 2-1 describes the expected values of kernel parameters.

Table 1.1 Expected values of kernel parameters


Parameter Expected HP-UX Version Oracle Database
Value Networking Mode

ksi_alloc_max 32768 11.23/11.31 HA/RAC


executable_stack 0

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 4


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Parameter Expected HP-UX Version Oracle Database


Value Networking Mode

max_thread_proc 1024
maxdsiz 1073741824
maxdsiz_64bit 2147483648
maxtsiz_64bit 1073741824
maxssiz 134217728
maxssiz_64bit 1073741824
maxuprc 3687
msgmni 4096
msgtql 4096
maxfiles 65536
maxfiles_lim 65536
msgmap 4098 11.23
msgseg 32767
nfile 655360
ncsize 35840 11.23/11.31
nflocks 4096
ninode 34816
nkthread 7184
nproc 4096
semmni 4096
semmns 8192
semmnu 4092
semvmx 32767
shmmni 4096
shmseg 512
vps_ceiling 64
streams_sqmax 50000 11.23 RAC
filecache_min The parameter 11.31 HA/RAC
value is 2% of
the physical
memory.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 5


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Parameter Expected HP-UX Version Oracle Database


Value Networking Mode

filecache_max The parameter


value is 4% of
the physical
memory.
tcp_smallest_anon_port 9000
tcp_largest_anon_port 65500
udp_smallest_anon_port 9000
udp_largest_anon_port 65500

The streams_sqmax parameter exists only in the Oracle RAC environment.

Precaution
The expected values in Table 2-1 meet the lowest requirements of the Oracle database. Set
kernel parameters based on actual requirements.
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check kernel parameters.
# kctune |grep Kernel parameter name
If the obtained value of a kernel parameter is greater than or equal to the expected value in
Table 2-1, you do not need to change the obtained value.
Step 3 Check TCP or UDP network parameters.
For example, to check tcp_smallest_anon_port and udp_smallest_anon_port, run the
following commands:
# ndd -get /dev/tcp tcp_smallest_anon_port
# ndd -get /dev/udp udp_smallest_anon_port
If the obtained value of a kernel parameter is greater than or equal to the expected value in
Table 2-1, you do not need to change the obtained value.
----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 6


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Modifying kernel parameters may require restarting the operating system.


If kernel parameter values are different from expected values, contact Huawei engineers to
determine whether to restart the operating system and modify kernel parameters under their
guidance.

If the current parameter value is less than the expected value in Table 2-1, perform the
following steps:
Step 1 Log in to the operating system as the root user.
Step 2 Modify kernel parameters.
# kctune Kernel parameter name=Expected value
Step 3 Modify TCP or UDP network parameters.
 Modify TCP network parameters.
# ndd -set /dev/tcp TCP network parameter Expected value
 Modify UDP network parameters.
# ndd -set /dev/udp UDP network parameter Expected value
----End

2.1.2 SSTAA002A-Checking Shared Memory Configurations


Check and modify shared memory configurations so that the Oracle database can run
properly.

Reference Standard
The size specified by shmmax equals the physical memory size.

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check shared memory configurations.
1. Obtain physical memory information.
# machinfo|grep Memory
Memory: 130970 MB (127.9 GB)

The command output indicates that the physical memory size is 130970 MB.
2. Obtain the value of shmmax.
# kctune |grep shmmax | awk -F' ' '{print $2}'
137331998720

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 7


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

The command output indicates that the size specified by shmmax is 137331998720
bytes, namely, 130970 MB.
----End

Exception Handling

If shared memory configurations do not comply with the reference standard, modify shmmax.
You must back up the value of shmmax before modification.

Step 1 Log in to the operating system as the root user.


Step 2 Modify shmmax.
# kctune shmmax=Physical memory size
Example:
# kctune shmmax=130970MB
==> Update the automatic 'backup' configuration first? yes //Enter yes and press
Enter to back up the value of shmmax.
* The automatic 'backup' configuration has been updated.
* Future operations will update the backup without prompting.
* The requested changes have been applied to the currently
running configuration.
Tunable Value Expression Changes
shmmax (before) 1073741824 Default Immed
(now) 137331998720 130970MB

----End

2.1.3 SSTAA003A-Checking Asynchronous I/O Configurations


Check and modify asynchronous I/O configurations when necessary to ensure that the Oracle
database does not encounter I/O bottlenecks.

Reference Standard
 The /etc/privgroup file contains dba RTPRIO RTSCHED MLOCK.
 The /dev/async file exists and the permission on it is 660.
 The value of max_async_ports is greater than or equal to 100 plus the value of
processes.
 The dba user is assigned DBA rights, which can be verified by running the
/usr/bin/getprivgrp dba command.
 The value of sga_max_size indicating the maximum SGA size is less than or equal to the
value of lockable memory.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 8


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the /etc/privgroup file.
$ cat /etc/privgroup | grep "dba RTPRIO RTSCHED MLOCK"
dba RTPRIO RTSCHED MLOCK

The command output indicates that the /etc/privgroup file contains dba RTPRIO
RTSCHED MLOCK.
Step 3 Check the /dev/async file.
$ ls -ltr /dev/async
crw-rw---- 1 bin bin 101 0x000000 Jul 25 12:08 /dev/async

The command output indicates that the /dev/async file exists and the permission on it is 660.
Step 4 Check max_async_ports.
1. Obtain the value of max_async_ports.
$ kctune |grep max_async_ | awk -F' ' '{print $2}'
4096

2. Obtain the value of processes.


$ sqlplus '/ as sysdba'
SQL> select value from v$parameter where name='processes';
1000

The command outputs in the preceding substeps indicate that the value of max_async_ports
is greater than 100 plus the value of processes.
Step 5 Check database permission.
1. Exit the database and return to the operating system.
SQL> exit;
2. Check database permission.
$ /usr/bin/getprivgrp dba
dba:

The command output indicates that the dba user is assigned DBA rights.
Step 6 Check sga_max_size.
1. Obtain the value of sga_max_size.
SQL> select value from v$parameter p where p.name = 'sga_max_size';
VALUE
---------------------------
105111552

2. Obtain the value of lockable memory.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 9


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SQL> exit;
$ dmesg|grep -i lockable|awk -F',' '{print $2}' | awk -F':' '{print $2}'
117658624 Kbytes

The command outputs in the preceding substeps indicate that the value of sga_max_size is
less than or equal to the value of lockable memory.
----End

Exception Handling

If asynchronous I/O configurations do not comply with the reference standard, modify the
configurations.
Modifying sga_max_size may require restarting the database. You must obtain customer
approval before modification.

 If the /etc/privgroup file does not exist or the file does not contain dba RTPRIO
RTSCHED MLOCK, perform the following steps:
1. Log in to the operating system as the root user.
2. Configure database permission.
# /usr/sbin/setprivgrp dba MLOCK
3. Run the following command to add dba RTPRIO RTSCHED MLOCK to the
/etc/privgroup file (if the file does not exist, this command automatically creates the
file):
# echo "dba RTPRIO RTSCHED MLOCK" >> /etc/privgroup
 If the permission on the /dev/async file is not 660, perform the following steps:
1. Log in to the operating system as the root user.
2. Change the permission on the /dev/async file to 660.
# chmod 660 /dev/async
 The value of max_async_ports is less than 100 plus the value of processes, perform the
following steps:
1. Log in to the operating system as the root user.
2. Change the value of max_async_ports.
# kctune max_async_ports=<Value of reference standard>
 If the value of sga_max_size is greater than the value of lockable memory, perform the
following steps:
1. Log in to the operating system as the oracle user.
2. Connect to the database and set sga_max_size to the value of lockable memory.
$ sqlplus '/ as sysdba'
SQL> alter system set sga_max_size=Value of lockable memory scope = spfile;
3. Restart the database.
SQL> shutdown immediate;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 10


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SQL> startup

2.1.4 SSTAA004A-Checking Patch Packages


Ensure that patch packages for the operating system exist so that the Oracle database can be
installed and run properly.

Reference Standard
The HP-UX version number is 11.23 or 11.31. Table 2-2 lists patch packages for HP-UX
11.23 and HP-UX 11.31.

Table 1.1 Patch packages for HP-UX


HP-UX Version Patch Package Oracle Database
Networking Mode

11.23 PHSS_35979 s/b PHSS_37201 s/b HA/RAC


PHSS_37492 s/b PHSS_38134
PHSS_35978 s/b PHSS_36343 s/b
PHSS_38140
PHCO_35524 s/b PHCO_36744
PHKL_35478 s/b PHKL_36319
PHCO_36673 s/b PHCO_37228
PHKL_35029 s/b PHKL_37121
PHKL_37809
PHKL_40208 RAC
PHKL_40372
11.31 PHKL_35900 HA/RAC
PHKL_36248
PHKL_36249
PHKL_35936 s/b PHKL_36242 s/b
PHKL_37185 s/b PHKL_38038
PHKL_38397
PHKL_40208 RAC
PHKL_40372

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 11


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the operating system version.
# uname -a
 For HP-UX 11.23, the command output is as follows:
HP-UX rx3600-2 B.11.23 U ia64 3562577597 unlimited-user license

 For HP-UX 11.31, the command output is as follows:


HP-UX r86i157 B.11.31 U ia64 2678633807 unlimited-user license

Step 3 Check patch packages.


# swlist -l patch |grep Patch package name
----End

Exception Handling

The latest patch packages for the operating system may contain the patch packages listed in
Table 2-2.

Contact Huawei engineers to install required patch packages and create corresponding links.

2.1.5 SSTAA005C-Checking Host Names


Ensure that the host names of midrange computers comply with standards. If the host names
do not comply with standards, the Oracle database in RAC networking mode cannot be
installed on the midrange computers.

Reference Standard
The host name of each midrange computer contains a maximum of eight characters that do
not include uppercase letters, hyphens (-), and underscores (_).

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the host name of the current midrange computer.
# hostname
hpnode2

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 12


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

----End

Exception Handling

You must obtain customer approval before changing the host name of a midrange computer
and restart the midrange computer after changing the host name.
If you find that the host names of midrange computers do not comply with the reference
standard after installing the Oracle database on the midrange computers, do not change the
host names because changing the host names may lead to midrange computer startup failures.
If you must change the host names, contact Huawei engineers for guidance.

If you find that the host names of midrange computers do not comply with the reference
standard when installing operating systems on the midrange computers, perform the following
steps:
Step 1 Log in to the operating system as the root user.
Step 2 Change the host name of the local midrange computer.
# set_parms hostname
Enter the system name, then press [Enter] or just press [Enter]
to retain the current host name (q)://Enter a host name that complies with the
reference standard.
You have chosen hpv3 as the name for this system.
Is this correct?
Press [y] for yes or [n] for no, then press [Enter]//Enter y and press Enter.

----End

2.1.6 SSTAA006A-Checking the Swap Partition


Ensure that the swap partition size is proper so that Oracle database instances can be started
and run properly.

Reference Standard
 The SWAP usage is less than 50%.
 When the physical memory is less than 16 GB, the values in the total Kb AVAIL column
are greater than or equal to 1.5 times the physical memory size.
 When the physical memory greater than or equal to 16 GB, the values in the total Kb
AVAIL column are greater than or equal to physical memory size.

Precaution
The swap partition size described in the reference standard meets the lowest requirements.
You can extend the swap partition based on service requirements.
Perform this check on both the active and standby node for the Oracle HA environment.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 13


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the SWAP status.
# swapinfo -t
Information similar to the following is displayed:
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
dev 8388608 0 8388608 0% 0 - 1 /dev/vg00/lvswap1
dev 21528576 0 21528576 0% 0 - 0 /dev/vg00/lvswap_1
reserve - 10589284 -10589284
memory 33523832 3429664 30094168 10%
total 67635320 14018948 53616372 21% - 0 -

The total row shows that the SWAP usage is 21%.


Step 3 Check the physical memory size.
# machinfo|grep -i Memory
Information similar to the following is displayed:
Memory = 16315 MB (15.932617 GB)

In the information, Memory = 16315 MB indicates that the physical memory size is 16315
MB.
----End

Exception Handling

If the swap partition size does not comply with the reference standard, extend the swap
partition after obtaining customer approval.
Before extending the swap partition, verify that available disk space is sufficient to extend the
swap partition.

Perform the following steps:


Step 1 Log in to the operating system as the root user.
Step 2 Check the available space in the vg00 VG and the names of LVs in the VG.
# vgdisplay -v vg00 | egrep "VG Name|Free PE|LV Name"
VG Name /dev/vg00
Free PE 1987
LV Name /dev/vg00/lvol1
LV Name /dev/vg00/lvol2
LV Name /dev/vg00/lvol3

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 14


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

LV Name /dev/vg00/lvol4
LV Name /dev/vg00/lvol5
LV Name /dev/vg00/lvol6
LV Name /dev/vg00/lvol7
LV Name /dev/vg00/lvol8
Free PE 1987

Step 3 Create an LV for the swap partition.


# lvcreate -L LV size (in MB) that meets standards -m 1 -n LV name /dev/vg00
Step 4 Add the following startup item to the /etc/fstab file:
/dev/vg00/ Name of the new LV swap defaults 0 0
----End

2.2 Preventive Maintenance Items for AIX Configuration


2.2.1 SSTAB001A-Checking Kernel Parameters
Check and modify kernel parameters so that the Oracle database can be installed and run
properly.

Reference Standard
 The value of maxuproc is greater than or equal to 16384.
 The value of the Oracle database environment variable AIXTHREAD_SCOPE is S.

Precaution
If the operating system is not AIX5.3L, skip Step 3 and Step 4.
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the value of maxuproc.
$ lsattr -E -l sys0 -a maxuproc | awk -F' ' '{print $2}'
16384

The command output indicates that the value of maxuproc is 16384.


Step 3 Check the operating system version.
$ oslevel -r
For AIX5.3L, the command output is as follows:
5300-08

Step 4 Check the value of AIXTHERAD_SCOPE.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 15


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

$ env |grep -i "AIXTHREAD_SCOPE"


AIXTHREAD_SCOPE=S

The command output indicates that the value of AIXTHERAD_SCOPE is S.


----End

Exception Handling

If kernel parameter values are different from expected values, modify the kernel parameters.

 If the value of maxuprocis less than 16384,


perform the following steps:
1. Log in to the operating system as the root user.
2. Change the value of maxuproc.
# chdev -l sys0 -a maxuproc=16384
 If the operating system is AIX5.3L and the .profile file of the oracle user does not
contain AIXTHREAD_SCOPE, perform the following steps:
1. Log in to the operating system as the oracle user.
2. Add AIXTHREAD_SCOPE to the .profile file and set AIXTHREAD_SCOPE to S.
$ echo "export AIXTHREAD_SCOPE=S" >> .profile
3. Run the following command for AIXTHREAD_SCOPE to take effect:
$ . .profile

2.2.2 SSTAB002A-Checking I/O Configurations


Check and modify I/O configurations to ensure that the Oracle database does not encounter
I/O bottlenecks.

Reference Standard
 For AIX5.3L, the minimum value of minpout is 8 and the minimum value of maxpout
is 12.
 For AIX6.1L, the default values 4096 and 8193 are retained for minpout and maxpout
respectively.

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check I/O configurations.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 16


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

# lsattr -El sys0 -a maxpout -a minpout


maxpout 8193 HIGH water mark for pending write I/Os per file True
minpout 4096 LOW water mark for pending write I/Os per file True

----End

Exception Handling

If I/O configurations do not comply with the reference standard, modify related
configurations.

The procedure is as follows:


Step 1 Log in to the operating system as the root user.
Step 2 Modify I/O configurations.
 For AIX5.3L, run the following command:
# chdev -l sys0 -a minpout=8 -a maxpout=12
 For AIX6.1L, run the following command:
# chdev -l sys0 -a minpout=4096 -a maxpout=8193
----End

2.2.3 SSTAB003A-Checking the Operating System Version and


Packages
Ensure that the operating system version is correct and required software packages exist so
that the Oracle database can be installed and run properly.

Reference Standard
 The operating system version is either of the following:
− AIX 5L version 5.3, TL 05, Service Pack 06 or later
− AIX 6L version 6.1, TL 00, Service Pack 04 or later
 The following software packages exist:
− bos.adt.base
− bos.adt.lib
− bos.adt.libm
− bos.perf.perfstat
− bos.perf.libperfstat
− bos.perf.proctools
− xlC.aix50.rte:8.0.0.7 or later (AIX5.3L)
− xlC.rte:8.0.0.7 or later (AIX5.3L)

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 17


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

− xlC.aix61.rte:9.0.0.1 or later (AIX6.1L)


− xlC.rte:9.0.0.1 or later (AIX6.1L)
− rsct.basic.rte (RAC)
− rsct.compat.clients.rte (RAC)
 For AIX5.3L, the following patches exist:
− IY89080
− IY92037
− IY94343
− IZ01060
− IZ03260 or IZ03475 (IZ03260 is required by ML6 and IZ03475 is required by ML7.
The two patches are used to resolve the ORA-27061 error.)
− IY84780
− IY68989

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the operating system version.
# oslevel -s
6100-06-01-1043

In the command output, 06 indicates TL, 01 indicates SP, and 1043 indicates that the
operating system is released in the forty-third week in 2010.
Step 3 Check whether required software packages exist.
# lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat
bos.perf.proctools
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.adt.base 6.1.6.1 COMMITTED Base Application Development
Toolkit
bos.adt.lib 6.1.2.0 COMMITTED Base Application Development
Libraries
bos.adt.libm 6.1.6.0 COMMITTED Base Application Development
Math Library
bos.perf.libperfstat 6.1.6.15 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
Interface
bos.perf.proctools 6.1.6.0 COMMITTED Proc Filesystem Tools

Path: /etc/objrepos
bos.adt.base 6.1.6.1 COMMITTED Base Application Development

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 18


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Toolkit
bos.perf.libperfstat 6.1.6.15 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
Interface

# lslpp -l |grep xlC


xlC.aix61.rte 11.1.0.1 COMMITTED XL C/C++ Runtime for AIX 6.1
xlC.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor
xlC.msg.en_US.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor
xlC.msg.en_US.rte 11.1.0.1 COMMITTED XL C/C++ Runtime
xlC.rte 11.1.0.1 COMMITTED XL C/C++ Runtime
xlC.sup.aix50.rte 9.0.0.1 COMMITTED XL C/C++ Runtime for AIX 5.2

# lslpp -l |grep rsct


rsct.basic.hacmp 3.1.0.0 COMMITTED RSCT Basic Function (HACMP/ES
rsct.basic.rte 3.1.0.1 COMMITTED RSCT Basic Function
rsct.basic.sp 3.1.0.0 COMMITTED RSCT Basic Function (PSSP
rsct.compat.basic.hacmp 3.1.0.1 COMMITTED RSCT Event Management Basic
rsct.compat.basic.rte 3.1.0.0 COMMITTED RSCT Event Management Basic
rsct.compat.basic.sp 3.1.0.0 COMMITTED RSCT Event Management Basic
rsct.compat.clients.hacmp 3.1.0.0 COMMITTED RSCT Event Management Client
rsct.compat.clients.rte 3.1.0.0 COMMITTED RSCT Event Management Client
rsct.compat.clients.sp 3.1.0.0 COMMITTED RSCT Event Management Client
¡¡

Step 4 If the operating system is AIX5.3L, check whether required patches exist.
# /usr/sbin/instfix -i -k "IY89080 IY92037 IY94343 IZ01060 IZ03260 IY84780 IY68989"
All filesets for IY89080 were found.
All filesets for IY92037 were found.
All filesets for IY94343 were found.
All filesets for IZ01060 were found.
All filesets for IZ03260 were found.
All filesets for IY84780 were found.
All filesets for IY68989 were found.

----End

Exception Handling

Before installing required software packages or patches, confirm that the customer requires
these packages or patches.

If some required software packages or patches do not exist, install them. The following
describes how to install patch IY89080:
Step 1 Use SFTP to upload patch IY89080 to /tmp on the active node in binary mode.
Step 2 Log in to the operating system as the root user.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 19


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 3 Access /tmp/IY89080 for storing the uploaded patch.


Step 4 Run the following command:
# smit update_all
Step 5 Enter . for the Input device / directory for software option and press Enter.
Step 6 On the user interface that appears, set the following options to yes:
COMMIT software updates? yes
ACCEPT new license agreements? yes

Step 7 Press Esc+0 to exit.


Step 8 Install the patch on the standby node by referring to the preceding steps.
----End

2.2.4 SSTAB004A-Checking Whether the pvid Feature Is Disabled


When the Oracle database uses the ASM to store data files, disks managed by the ASM may
be damaged if the Oracle database allocates pvid to the disks.

Reference Standard
The pvid feature is disabled. That is, none is returned when you check the pvid of disks.

Precaution
Perform this check only when the ASM is enabled.
If the Oracle database uses the ASM to store data files, do not enable the pvid feature.
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check whether the ASM is enabled.
# ps -eaf|grep asm
For example, the following information is displayed:
oracle 10183 1 0 Sep13 ? 00:00:02 asm_pmon_+ASM2

If the command output contains a process name similar to asm_xxx_ASM, the ASM is
enabled.
Step 3 Switch to the oracle user.
# su - oracle
Step 4 Obtain the list of disks managed by the ASM.
$ export ORACLE_SID=+ASM2
$ sqlplus '/ as sysdba'

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 20


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SQL> select path from v$asm_disk;


PATH
-------------------------
/dev/hdisk1
/dev/hdisk2
/dev/hdisk3
/dev/hdisk4
/dev/hdisk5
/dev/hdisk6

Step 5 Check the pvid of disks obtained in Step 4.


For example, to check the pvid of hdisk6, run the following command:
# lsattr -El hdisk6 -a pvid| awk -F' ' '{print $2}'
For example, the following information is displayed:
none

The command output is none, indicating that the pvid feature is disabled.
----End

Exception Handling

If the ASM is enabled and pvid are allocated to disks managed by the ASM, you must rectify
the fault.

Contact Huawei engineers and perform the following steps under their guidance:
Step 1 Log in to the operating system as the root user.
Step 2 Delete the pvid of disks managed by the ASM.
# chdev -l hdisk* -a pv=clear
----End

2.2.5 SSTAB005A-Checking the fc_err_recov Attribute Value for


FSCSI Devices
Ensure that the fc_err_recov attribute value for FSCSI devices is correct to prevent voting
disk faults and ASM faults. These faults can cause RAC nodes to restart.

Reference Standard
The fc_err_recov attribute value for FSCSI devices is fast_fail.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 21


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check customized database information in the ODM library.
# lsdev -C | grep fscsi
Information similar to the following is displayed:
fscsi0 Available 05-00-02 FC SCSI I/O Controller Protocol Device
fscsi1 Available 04-00-02 FC SCSI I/O Controller Protocol Device

Step 3 Check the fc_err_recov attribute value for FSCSI devices.


# lsattr -El fscsi0 | grep fc_err_recov
In the preceding command, fscsi0 is an FSCSI device name obtained in Step 2.
For example, the following information is displayed:
fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True

The command output indicates that the value of fc_err_recov is fast_fail.

Check the fc_err_recov attribute value for all FSCSI devices fscsiN (N is an integer equal to or greater
than zero).

----End

Exception Handling

If the fc_err_recov attribute value is not fast_fail, change the value to fast_fail.
Obtain customer approval before changing the fc_err_recov attribute value because all
FSCSI devices must be deactivated during the change.

Step 1 Log in to the operating system as the root user.


Step 2 Change the value of fc_err_recov to fast_fail.
# rmdev -l fscsi0 -R
# chdev -l fscsi0 -a fc_err_recov=fast_fail -P
# cfgmgr
Step 3 Restart the operating system.
# shutdown -Fr

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 22


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

----End

2.2.6 SSTAB006A-Checking the Swap Partition


Ensure that the swap partition size is proper so that Oracle database instances can be started
and run properly.

Reference Standard
 The SWAP usage is less than 30% (the value varies according to conditions).
 When the physical memory is less than or equal to 64 GB, the SWAP size is equal to the
size of the physical memory. When the physical memory exceeds 64 GB, the SWAP size
is 64 GB.
 The size difference between the SWAP and the physical memory is less than or equal to
5%.

Precaution
The swap partition size described in the reference standard meets the lowest requirements.
You can extend the swap partition based on service requirements.
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the SWAP size.
# lsps -s
Information similar to the following is displayed:
Total Paging Space Percent Used
28672MB 1%

The preceding information shows that the SWAP usage is 1%.


Step 3 Check the physical memory size.
# lsattr -El sys0 -a realmem
Information similar to the following is displayed:
realmem 16777216 Amount of usable physical memory in Kbytes False

The physical memory size is 16777216KB.


----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 23


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If the swap partition size does not comply with the reference standard, extend the swap
partition after obtaining customer approval.
Before extending the swap partition, verify that available disk space is sufficient to extend the
swap partition.

Contact Huawei engineers and perform the following steps under their guidance:
Step 1 Log in to the operating system as the root user.
Step 2 Obtain the name of a disk for extending the swap partition.
Assume that hd6 is used to extend the swap partition.
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
Chksum
hd6 hdisk0 rootvg 15872MB 1 yes yes lv
0
hd6 hdisk2 rootvg 512MB 1 yes yes lv
0

Step 3 Extend the swap partition.


1. Check the PP size.
# lsvg rootvg | grep "PP SIZE" | awk -F' ' '{print $6}'
256

The command output indicates that the size of each PP is 256 MB.
2. Extend the swap partition.
For example, to extend the swap partition by 1 GB (total sizes of four PPs), run the
following command:
# chps -s' 4' hd6
----End

2.2.7 SSTAB007A-Checking the Virtual Memory and File Cache


Check the virtual memory and file cache to ensure that the Oracle database can run properly.

Reference Standard
 The value of minperm% is 10.
 The value of maxperm% is 20.
 The value of maxclient% is 20.
 The value of lru_file_repage is 0.
 The value of strict_maxperm is 0.
 The value of strict_maxclient is 1.
 The value of page_steal_method is 1.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 24


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the virtual memory and file cache.
 If the operating system is AIX5.3, run the following command.
# vmo -a | egrep "minperm%|maxperm%|maxclient%|lru_file_repage|
strict_maxperm|strict_maxclient|page_steal_method"
minperm% = 10
lru_file_repage = 0
maxperm% = 20
maxclient% = 20
page_steal_method = 1
strict_maxclient = 1
strict_maxperm = 0

 If the operating system is AIX6.1, run the following command.


# vmo -aF | egrep "minperm%|maxperm%|maxclient%|lru_file_repage|
strict_maxperm|strict_maxclient|page_steal_method"
minperm% = 10
lru_file_repage = 0
maxperm% = 20
maxclient% = 20
page_steal_method = 1
strict_maxclient = 1
strict_maxperm = 0

----End

Exception Handling

If the virtual memory and file cache do not comply with the reference standard, modify
related parameters.

Contact Huawei engineers and perform the following steps under their guidance:
Step 1 Log in to the operating system as the root user.
Step 2 Modify parameters whose values do not comply with the reference standard.
# vmo -p -o item=value

In the preceding command, item indicates the parameter name and value indicates the parameter value.

For example, to change the value of minperm% to 10, run the following command:

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 25


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

# vmo -p -o minperm%=10
----End

2.3 Preventive Maintenance Items for SuSE Linux


Configuration
2.3.1 SSTAC001A-Checking Kernel Parameters
Check and modify kernel parameters so that the Oracle database can be installed and run
properly.

Reference Standard
 The value of kernel.sem is 250 32000 100 128.
 The value of kernel.shmmax is 0.5 times the random access memory (RAM) size.

 250 32000 100 128 is a value recommended by Oracle. Change the value based on the site
requirements.
 The official Oracle document Note 567506.1 specifies that the maximum size of a single shared
memory segment is half of the physical memory size.
 The RAM is the physical memory.
 For details about how to query the RAM size, see 2.3.6 SSTAC006A-Checking the Swap Partition.
 The value of kernel.shmmni is 4096.
 The value of kernel.shmall is the value of kernel.shmmax divided by the page size.

The official Oracle document Note:301830.1 specifies that the getconf PAGE_SIZE command is used
to check the page size.
 The value of fs.file-max is 6815744.
 The value of fs.aio-max-nr is 1048576.
 The value of net.ipv4.ip_local_port_range is 9000 65500.
 The value of net.core.rmem_default is 262144.
 The value of net.core.rmem_max is 4194304.
 The value of net.core.wmem_default is 262144.
 The value of net.core.wmem_max is 1048576.

Precaution
The parameter values described in the reference standard are recommended by Oracle.
Change the values based on the site requirements.
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check kernel parameters.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 26


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

# sysctl -a|grep -i Parameter name


For example, to check the net.core.wmem_default parameter, run the following command:
# sysctl -a|grep -i net.core.wmem_default
The following information is displayed:
net.core.wmem_default = 262144

----End

Exception Handling
If kernel parameter values are different from expected values, modify them using either of the
following methods:

 The settings of kernel parameters that are set using the immediate effective method expire
after the operating system restarts.
 The settings of kernel parameters that are set using the system restart effective method do
not expire after the operating system restarts.

 Use the system restart effective method to modify kernel parameters.


1. Log in to the operating system as the root user.
2. Modify kernel parameters in the /etc/sysctl.conf file.
# vi /etc/sysctl.conf
For example, change the value of kernel.shmmni to 4096:
kernel.shmmni=4096
3. Configure the sysctl service to start with the operating system.
# chkconfig -a boot.sysctl
4. Restart the operating system.
# reboot
After restarting the operating system, check the values of the kernel parameters.
− If the kernel parameter values comply with the reference standard, these kernel
parameters are successfully modified.
− If the kernel parameter values do not comply with the reference standard,
modification fails. In this case, contact Huawei engineers.
 Use the immediate effective method to modify kernel parameters.
1. Log in to the operating system as the root user.
2. Modify kernel parameters.
# sysctl -w Parameter name=Parameter value
For example, to change the value of kernel.shmmni to 4096, run the following
command:
# sysctl -w kernel.shmmni=4096

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 27


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If a kernel parameter involves multiple values, enclose these values in double quotation marks.
For example, to change the value of kernel.sem to 250 32000 100 128, run the following command:
# sysctl -w kernel.sem="250 32000 100 128"
After restarting the operating system, check the values of the kernel parameters.
− If the kernel parameter values comply with the reference standard, these kernel
parameters are successfully modified.
− If the kernel parameter values do not comply with the reference standard,
modification fails. In this case, contact Huawei engineers.

2.3.2 SSTAC002A-Checking the limits.conf File


Check the limits.conf file to ensure that the maximum number of concurrent processes and
the maximum number of open files meet service requirements.

Reference Standard
 The limits.conf file contains the following content:
 oracle soft nproc 2047
 oracle hard nproc 16384
 oracle soft nofile 1024
 oracle hard nofile 65536

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the limits.conf file.
# cat /etc/security/limits.conf
For example, the following information is displayed:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 28


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Modification to the /etc/security/limits.conf file takes effect immediately in the operating


system. Application processes of related products, however, can read this file only after the
related application restarts.

If the /etc/security/limits.conf file does not comply with the reference standard, perform the
following steps:
Step 1 Log in to the operating system as the root user.
Step 2 Modify the /etc/security/limits.conf file.
# vi /etc/security/limits.conf
Ensure that the file contains the following content:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
----End

2.3.3 SSTAC003A-Checking Shell Environment Configurations


for Oracle Database Users
Check shell environment configurations for Oracle database users to prevent the ORA-4030
error.

Reference Standard
 When Oracle database users use the Bourne shell, Bash shell, or Korn shell, the
/etc/profile.local file contains the following content:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

 When Oracle database users use the C shell, the /etc/csh.login.local file contains the
following content:
if ( $USER == oracle ) then
limit maxproc 16384
limit descriptors 65536
endif

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 29


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the shell used by Oracle database users.
$ echo $SHELL | awk -F'/' '{print $NF}'
bash

 If the command output is bash, Oracle database users use the Bash shell.
 If the command output is ksh, Oracle database users use the Korn shell.
 If the command output is sh, Oracle database users use the Bourne shell.
 If the command output is csh, Oracle database users use the C shell.
Step 3 Check the /etc/profile.local or /etc/csh.login.local file.
 If the command output in Step 2 is bash, ksh, or sh, check the /etc/profile.local file.
$ more /etc/profile.local
The file must contain the following content:
if [ $USER = oracle ]; then
if [ $SHELL = /bin/ksh ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

 If the command output in Step 2 is csh, check the /etc/csh.login.local file.


$ more /etc/csh.login.local
The file must contain the following content:
if ( $USER == oracle ) then
limit maxproc 16384
limit descriptors 65536
endif

----End

Exception Handling

If shell environment configurations for Oracle database users do not comply with the
reference standard, modify these configurations.
Obtain customer approval before modification and restart the database instance after
modification.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 30


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Perform the following steps:


Step 1 Log in to the operating system as the root user.
Step 2 Modify shell environment configurations.
 If Oracle database users use the Bourne shell, Bash shell, or Korn shell, modify the
/etc/profile.local file.
# vi /etc/profile.local
Add the following content to the file:
if [ $USER ="oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

 If Oracle database users use the C shell, modify the /etc/csh.login.local file.
# vi /etc/csh.login.local
Add the following content to the file:
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif

Step 3 Restart the database instance for the modification to take effect.
$ sqlplus '/ as sysdba'
SQL> shutdown immediate
SQL> startup
----End

2.3.4 SSTAC004A-Checking System Users' Environment


Parameters
Ensure that the /etc/pam.d/login file contains session required pam_limits.so to prevent the
operating system from reporting the too many open files error during Oracle database
running.

Reference Standard
The /etc/pam.d/login file contains session required pam_limits.so.

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 31


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check whether the /etc/pam.d/login file contains session required pam_limits.so.
# cat /etc/pam.d/login | grep "pam_limits.so"
session required pam_limits.so

----End

Exception Handling

If the /etc/pam.d/login file does not contain session required pam_limits.so, modify the file.

Perform the following steps:


Step 1 Log in to the operating system as the root user.
Step 2 Modify the /etc/pam.d/login file.
# vi /etc/pam.d/login
Add session required pam_limits.so to the file. Then save and close the file.
----End

2.3.5 SSTAC005A-Checking the Operating System Version and


Packages
Ensure that the operating system version is correct and required software packages exist so
that the Oracle database can be installed and run properly.

Reference Standard
 The operating system version is as follows:
SUSE Linux Enterprise Server 10 or later, kernel version 2.6.16.21 or later.
 The following software packages exist:
− binutils-2.16.91.0.5 or later
− compat-libstdc++-5.0.7-22.2 or later
− gcc-4.1.0 or later
− gcc-c++-4.1.0 or later
− glibc-2.4-31.63 or later
− glibc-32bit-2.4-31.63 or later
− glibc-devel-2.4-31.63 or later
− glibc-devel-32bit-2.4-31.63 or later

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 32


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

− libaio-0.3.104 or later
− libaio-32bit-0.3.104 or later
− libaio-devel-0.3.104 or later
− libelf-0.8.5(Perform this check only in the SUSE Linux 10 version)
− libgcc-4.1.0 or later
− libstdc++-4.1.0 or later
− libstdc++-devel-4.1.0 or later
− make-3.80 or later
− sysstat-6.0.2 or later

Precaution
Versions earlier than glibc-2.4-31.63 have limitations in memory allocation and may cause
severe problems such as Oracle RAC restart.
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the operating system version.
# cat /etc/SuSE-release
For example, the following information is displayed:
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 1

# uname -a
For example, the following information is displayed:
Linux linux1104 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 x86_64
x86_64 x86_64 GNU/Linux

Step 3 Check whether required software packages exist.


# rpm -qa|grep Software package name
For example, to check whether the glibc packages comply with the reference standard, run the
following command:
# rpm -qa|grep glibc
For example, the following information is displayed:
glibc-locale-32bit-2.4-31.63.7
glibc-devel-2.4-31.63.7
glibc-i18ndata-2.4-31.63.7
glibc-info-2.4-31.63.7
glibc-2.4-31.63.7
glibc-32bit-2.4-31.63.7
glibc-devel-32bit-2.4-31.63.7
glibc-locale-2.4-31.63.7

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 33


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If the command output lists software packages described in the reference standard, required
software packages exist in the system.
----End

Exception Handling

If required software packages do not exist or existing software packages are not required
packages, obtain customer approval and install required software packages.

Contact Huawei engineers and install required software packages under their guidance.

2.3.6 SSTAC006A-Checking the Swap Partition


Ensure that the swap partition size is proper so that the Oracle database instances can be
started and run properly.

Reference Standard
 When the RAM size ranges from 1 GB to 2 GB, the swap partition size is 1.5 times the
RAM size.
 When the RAM size is greater than 2 GB but less than or equal to 16 GB, the swap
partition size equals the RAM size.
 If the RAM size is greater than 16 GB, the swap partition size is 16 GB.

Precaution
The swap partition size described in the reference standard meets the lowest requirements.
You can extend the swap partition based on service requirements.
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check the RAM size and the swap partition size.
 Check the RAM size.
# grep MemTotal /proc/meminfo
For example, the following information is displayed:
MemTotal: 16327896 kB

 Check the swap partition size.


# grep SwapTotal /proc/meminfo
For example, the following information is displayed:
SwapTotal: 16779852 kB

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 34


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

----End

Exception Handling

If the swap partition size does not comply with the reference standard, extend the swap
partition.
Before extending the swap partition, obtain customer approval, verify that available disk
space is sufficient to extend the swap partition, and determine whether restarting the operating
system is required.

Contact Huawei engineers and perform the following steps under their guidance:
Step 1 Log in to the operating system as the root user.
Step 2 Check whether available disk space is sufficient to extend the swap partition.
# df -k
/dev/sda2 15735128 2132652 13602476 14% /
tmpfs 4 0 4 0% /dev/vx
udev 16451456 320 16451136 1% /dev
/dev/sda7 1052184 88440 963744 9% /boot

Step 3 Create a partition file in /home.


For example, create a 1 GB partition file, run the following command:
# dd if=/dev/zero of=/home/swap bs=1024 count=1024000
Step 4 Add the partition file to the swap partition and make the file take effect.
# /sbin/mkswap /home/swap
# /sbin/swapon /home/swap
----End

2.3.7 SSTAC007A-Checking Asynchronous I/O Configurations


Check and modify I/O configurations to ensure that the Oracle database does not encounter
I/O bottlenecks.

Reference Standard
 The values in the active_objs and num_objs columns are not 0 for the kioctx and kiocb
attributes of the /proc/slabinfo file system.
 The values of disk_asynch_io and filesystemio_options are TRUE and asynch
respectively.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 35


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the root user.
Step 2 Check whether asynchronous I/O is enabled.
# cat /proc/slabinfo | grep kio | awk -F' ' '{print $1 "active_objs=" $2 "num_objs=" $3}'
kioctx active_objs=100 num_objs=150
kiocb active_objs=5 num_objs=15

If the values in the active_objs and num_objs columns are not 0 for kioctx and kiocb,
asynchronous I/O is enabled.
Step 3 Switch to the oracle user.
# su - oracle
$ sqlplus '/ as sysdba'
Step 4 Check whether the values of disk_asynch_io and filesystemio_options are TRUE and
asynch respectively.
 SQL> show parameter disk_asynch_io;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------

disk_asynch_io boolean TRUE

 SQL> show parameter filesystemio_options;


NAME TYPE VALUE
---------------------------- ----------- ------------------------------
filesystemio_options string asynch

----End

Exception Handling

If asynchronous I/O configurations do not comply with the reference standard, modify the
configurations.
Obtain customer approval before modification and restart the database instance after
modification.

If the values of disk_asynch_io and filesystemio_options do not comply with the reference
standard, perform the following steps:
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 36


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

$ sqlplus '/ as sysdba'


Step 3 Change the value of disk_asynch_io to TRUE.
SQL> alter system set disk_asynch_io =TRUE scope= spfile;
Step 4 Change the value of filesystemio_options to asynch.
SQL> alter system set filesystemio_options = asynch scope= spfile;
Step 5 Restart the database instance.
$ shutdown immediate
$ startup
----End

2.3.8 SSTAC008A-Checking Shared Memory Configurations


Perform preventive maintenance inspection (PMI) on shared memory configurations of SUSE
Linux so that the Oracle database can run properly.

Reference Standard
The size of the /dev/shm file system is equal to the physical memory.

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the physical memory of the operating system.
$ grep MemTotal /proc/meminfo
Information similar to the following is displayed:
MemTotal: 16327896 kB

The command output indicates that the physical memory is 16327896 KB.
Step 3 Check the size of the /dev/shm file system.
$ df -k| grep shm
Information similar to the following is displayed:
shm 16777216 1131136 15646080 7% /dev/shm

The value in the second column indicates that the size of the /dev/shm file system is
16777216 KB.
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 37


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Exception Handling

If the check result is different from the expected result, you must resolve this problem.
You must uninstall the file system or restart the database during rectification. As a result, the
service database cannot be read or written. Estimate service impacts and then resolve the
problem.

If the shared memory size is less than the physical memory size, contact Huawei engineers to
estimate rectification risks and perform the following steps:
Step 1 Log in to the operating system as the root user.
Step 2 Unmount the /dev/shm file system.
# umount /dev/shm

If device is busy is displayed, stop the database and then unmount the file system.

Step 3 Expand and mount the /dev/shm file system.


# mount -t tmpfs shmfs -o size=Xg /dev/shm
In the command, X indicates the file system space after expansion. For example, if X is set to
16, the /dev/shm file system after expansion is 16 GB.
Step 4 Add the shared memory configurations in the /etc/fstab file.
# vi /etc/fstab
Add the following information to the configuration file:
shm /dev/shm tmpfs size=Xg 0 0

In the command, X indicates the file system space after expansion.


----End

2.4 Preventive Maintenance Items for Database


Configuration
2.4.1 SSTAD001A-Checking the Database Version
Ensure that the Oracle database is of the required version. When the Oracle database is of the
required version, related patches can prevent known bugs that may be triggered during
database running.

Reference Standard
Database version: Enterprise Edition Release 11.1.0.7.0

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 38


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the database version.
$ strings $ORACLE_HOME/bin/oracle | grep 'NLSRTL Version'
NLSRTL Version 11.1.0.7.0 - Production

The command output shows that the database version is 11.1.0.7.0.


----End

Exception Handling

If the database version does not comply with the reference standard, upgrade the database.
Services and the database must be stopped during upgrade.

 If the database version is earlier than 11.1.0.7.0, for example, 11.1.0.6.0, contact Huawei
engineers to obtain and install the 11.1.0.7.0 installation package.
 If the Oracle database on the site has been launched for commercial use, obtain customer
approval, create an upgrade plan, and upgrade the database based on the plan.

2.4.2 SSTAD002A-Checking Database Patches


Check database patches to ensure that required database patches have been installed to resolve
known bugs.

Reference Standard
The patches of the Oracle database software contain one group of the following patches:
 Patches 14739378 and 7715339
 Patches 14275623 and 7715339
 Patches 13923474 and 7715339
 Patches 13621679 and 7715339
 Patches 13343461 and 7715339
 Patches 12827740 and 7715339
 Patches 12419384 and 7715339

Precaution
Perform this check only in the Oracle HA environment.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 39


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the database patch versions.
Run the opatch lsinventory -all command to check database patch versions.
If the preceding command does not exist, run the $ORACLE_HOME/OPatch/opatch
lsinventory -all command.
----End

Exception Handling

If required patches are not installed, install them.


You must stop services and the database before installing patches.

Install the latest Oracle database patches by referring to the A&S066-20111121-Notice on


Prewarning for Oracle11gR1 Defects.
You can obtain this document from Application and Software Product Line > Service and
Software Public > IT Outsourcing > Precautions Rectification and Bulletins.

2.4.3 SSTAD036A-Checking Database Patches and CRS Patches


Check database patches and CRS patches to ensure that required patches have been installed
to resolve known bugs.

Reference Standard
 The Oracle CRS version is 11.1.0.7.0.
 The one-off patch 11724953 has been installed for the Oracle CRS.
 The one-off patch package of the Oracle database software contains one group of the
following patches:
− Patches 11724953, 14739378, and 7715339
− Patches 11724953, 14275623, and 7715339
− Patches 11724953, 13923474, and 7715339
− Patches 11724953, 13621679, and 7715339
− Patches 11724953, 13343461, 7715339, and 9549042
− Patches 11724953, 12827740, 7715339, and 9549042
− Patches 11724953, 12419384, 7715339, and 9549042

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 40


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the Oracle CRS version.
$ crsctl query crs softwareversion
Oracle Clusterware version on node [linux1102] is [11.1.0.7.0]

The command output indicates that the Oracle CRS version is 11.1.0.7.0.
Step 3 Check t one-off patches of the Oracle database software.
Run the opatch lsinventory -all command to check one-off patches of the database.
If the opatch lsinventory -all command does not exist, run the
$ORACLE_HOME/OPatch/opatch lsinventory -all command.
Step 4 Check whether the one-off patch 11724953 has been installed for the Oracle CRS.
Run the opatch lsinventory -all -oh $ORA_CRS_HOME | egrep "Patch 11724953"
command to check the versions of one-off patches of the Oracle CRS.
If the preceding command does not exist, run the $ORACLE_HOME/OPatch/opatch
lsinventory -all -oh $ORA_CRS_HOME | egrep "Patch 11724953" command.
Patch 11724953 : applied on Wed Nov 30 10:52:07 CST 2011

The command output indicates that the one-off patch 11724953 has been installed for the
Oracle CRS.
----End

Exception Handling

If required patches are not installed, install them.


You must stop services and the database before installing patches.

Install the latest Oracle database patches. For details, see the A&S066-20111121-Notice on
Prewarning for Oracle11gR1 Defects.
You can obtain this document from Application and Software Product Line > Service and
Software Public > IT Outsourcing > Precautions Rectification and Bulletins.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 41


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.4 SSTAD003B-Checking Character Sets


Ensure that the operating system character set used on database clients is consistent with the
database character set. If the two character sets are inconsistent, character set conversion
occurs during data insertion into the database, causing data encoding exceptions.

Reference Standard
The operating system character set used on database clients is consistent with the database
character set.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the operating system character set.
$ echo $NLS_LANG
AMERICAN_AMERICA.AL32UTF8

Step 3 Connect to the database.


$ sqlplus '/ as sysdba'
Step 4 Check the database character set.
SQL> select property_value from database_properties where property_name =
'NLS_CHARACTERSET';
AL32UTF8

----End

Exception Handling

 If the database character set meets deployment plan requirements but is inconsistent with
the operating system character set used on database clients, modify Oracle database
environment variables. The modification does not affect services.
 If the database character set does not meet deployment plan requirements and affects
services, change the database character set or recreate the database instance.

 If the database character set is inconsistent with the operating system character set,
perform the following steps:
1. Log in to the operating system as the oracle user.
2. Modify the environment variable file of the Oracle database.
− If the operating system is SuSE Linux, modify the .bash_profile.
$ cd ~
$ vi .bash_profile

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 42


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Add the following content to the file:


export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

− If the operating system is HP-UX or AIX, modify the .profile file.


$ vi .profile
Add the following content to the file:
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

3. Make the modification take effect.


− If the operating system is SuSE Linux, run the . .bash_profile.
− If the operating system is HP-UX or AIX, run the . .profile command.
 If the database character set does not meet deployment plan requirements and affects
services, change the database character set or recreate the database instance. Contact
Huawei engineers for guidance.

2.4.5 SSTAD004A-Checking Database Parameters


Change and modify database parameters to prevent problems, such as crash and slow
response, that occur due to insufficient memory and processes.

Reference Standard

Table 1.1 Expected values of database parameters


Parameter Expected Value Description

memory_max_target 60% of the physical memory Maximum memory provided


NOTE for the Oracle database.
This value is only a
recommended value. You can
determine the value based on
application features.

memory_target 50% of the physical memory Target memory provided for


NOTE the Oracle database.
This value is only a
recommended value. You can
determine the value based on
application features.

sga_target 40% of the physical memory Target shared memory


NOTE NOTE provided for the Oracle
It is recommended that the This value is only a database.
value of sga_target do not recommended value. You can
exceed the lockable memory determine the value based on
size; otherwise, the application features.
asynchronous mode is
unavailable.

pga_aggregate_target 10% of the physical memory PGA target value.


NOTE
This value is only a
recommended value. You can
determine the value based on
application features.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 43


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Parameter Expected Value Description

shared_pool_size 5% of the physical memory Size of the shared pool.


NOTE
This value is only a
recommended value. You can
determine the value based on
application features.

lock_sga FALSE Indicates whether the space


that the system global area
(SGA) occupies in the
memory is locked.
pre_page_sga FALSE Indicates whether to control
SGA preallocation.
spfile This parameter cannot be Parameter file
blank after the Oracle configurations.
database starts.
db_block_size 8192 Default size of a data block.
NOTE
This value is only a
recommended value. You can
determine the value based on
application features.

undo_management auto Mode for managing undo


segments.
undo_retention 5400 Duration for reserving undo
NOTE segments.
This value is only a
recommended value. You can
determine the value based on
application features.

undo_tablespace UNDOTBS1 (default value) Undo tablespace.


cursor_sharing force Indicates whether to share
NOTE cursors.
This value is only a
recommended value. You can
determine the value based on
application features.

session_cached_cursors 50 Number of cursors in the


NOTE session cache.
This value is only a
recommended value. You can
determine the value based on
application features.

processes  For the physical memory Maximum number of


with a size less than 8 processes.
GB: 500
 For the physical memory

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 44


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Parameter Expected Value Description

with a size greater than


or equal to 8 GB: 1000
NOTE
You can adjust the expected
value based on the actual
system load.

job_queue_processes 20 Maximum number of job


NOTE processes.
You can adjust the expected
value based on the actual
system load.

db_file_multiblock_read_co 16 Number of blocks that are


unt NOTE read at a time.
You can adjust the expected
value based on the actual
system load.

open_cursors 1000 Number of cursors that are


NOTE open by a session.
This value is only a
recommended value. You can
determine the value based on
application features.

log_checkpoint_interval 0 Checkpoint interval.


Checkpoints are controlled
by setting the size of redo
logs that are written.
log_checkpoint_timeout 1800 Checkpoint timeout
NOTE duration.
This value is only a
recommended value. You can
determine the value based on
application features.

remote_login_passwordfile exclusive Indicates whether a


password is required during
remote login.
timed_statistics TRUE Indicates whether to collect
statistics on time.
disk_asynch_io TRUE Indicates whether to enable
asynchronous I/O.
filesystemio_options asynch File system type.
statistics_level typical Level of statistics
information.
audit_trail none Indicates whether to execute
auditing.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 45


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Parameter Expected Value Description

sec_case_sensitive_logon FALSE Indicates whether database


passwords are case-
sensitive.
_optim_peek_user_binds FALSE Indicates whether to peek at
variables.
_b_tree_bitmap_plans FALSE Indicates whether to convert
bitmaps.
_undo_autotune FALSE Indicates whether to enable
the undo autotune function.
control_management_pack_ DIAGNOSTIC+TUNING Controls the Oracle
access automatic diagnosis feature.
parallel_execution_message 4096 Configures parallel
_size NOTE performance.
You can adjust the expected
value based on the actual
system load.

optimizer_dynamic_samplin 2 Configures dynamic


g NOTE sampling.
You can adjust the expected
value based on the actual
system load.

_gc_policy_time 0 Disables the DRM feature in


the RAC environment.
_gc_undo_affinity FALSE Disables the DRM feature in
the RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check database parameters.
SQL> select y.ksppstvl value from sys.x$ksppi x, sys.x$ksppcv y where x.inst_id =
userenv('Instance') and y.inst_id = userenv('Instance') and x.indx = y.indx and
x.ksppinm like lower('Parameter name');
The returned parameter values must be the expected values provided in Table 2-3.
For example, check the value of log_checkpoint_timeout.
SQL> select y.ksppstvl value from sys.x$ksppi x, sys.x$ksppcv y where x.inst_id =
userenv('Instance') and y.inst_id = userenv('Instance') and x.indx = y.indx and
x.ksppinm like lower('log_checkpoint_timeout');

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 46


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

VALUE
--------------------------------------------------------------------------------
1800

----End

Exception Handling

If the check result is different from the expected result, modify them based on service
requirements.
Restart the database after modifying some database parameters, which affects services.
Therefore, obtain customer approval before modifying these database parameters.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Back up the spfile.
SQL> create pfile='/home/oracle/init.ora' from spfile;
Step 4 Change the values of database parameters to expected ones.
SQL> alter system set <Parameter name>=<Expected value> scope=spfile;
To set hidden parameters, run the following command:
SQL> alter system set "<Parameter name>=<Expected value>" scope=spfile;
Example: SQL>ALTER SYSTEM SET "_undo_autotune" = false;
Step 5 Shut down the database.
SQL> shutdown immediate;
Step 6 Restart the database.
SQL> startup;
----End

2.4.6 SSTAD005B-Checking the spfile


Ensure that the spfile exists so that parameter modifications during database running can be
saved permanently.

Reference Standard
The spfile has been configured for the Oracle database.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 47


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the spfile exists.
SQL> select value from v$parameter p where name = 'spfile';
VALUE
--------------------
/oracle/app/product/11g/db/dbs/spfiletest.ora

The command output indicates that the spfile exists.


----End

Exception Handling

If the spfile does not exist, create it.


Creating the spfile requires restarting the database. Therefore, obtain customer approval
before creating the spfile.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Create the spfile from the memory.
SQL> create spfile='/dev/vg_ora/rlv_spfile' from memory;

In the preceding command, /dev/vg_ora/rlv_spfile indicates the spfile name and path and is a raw device
on a disk array. Change the spfile name and path based on the site requirements.
If the site uses local disks to store database files, run the create spfile from memory; command. This
command will generate the spfile spfile$ORACLE_SID.ora in $ORACLE_HOME/dbs/. If the value of
$ORACLE_HOME is orcl, the spfile name is spfileorcl.ora.

Step 4 If the spfile is not stored in the default path $ORACLE_HOME/dbs/, perform the following
steps:
Open the init$ORACLE_SID.ora file. If this file does not exist, create it first.
For example, if the value of $ORACLE_HOME is orcl, run the following command to open
the file:
$ vi $ORACLE_HOME/dbs/initorcl.ora
Add the following content to the file:

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 48


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SPFILE='/dev/vg_ora/rlv_spfile'
In the preceding content, /dev/vg_ora/rlv_spfile indicates the spfile name and path. Change
the spfile name and path based on the site requirements.
Step 5 Shut down the database.
SQL> shutdown immediate;
Step 6 Restart the database.
SQL> startup
----End

2.4.7 SSTAD006B-Checking the Database Recycle Bin


Check database recycle bin status. Ensure that the recycle bin is disabled to prevent service
performance problems caused by insufficient recycle bin space.

Reference Standard
The database recycle bin is OFF.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check recycle bin configurations.
SQL> select y.ksppstvl value from sys.x$ksppi x, sys.x$ksppcv y where x.inst_id =
userenv('Instance') and y.inst_id = userenv('Instance') and x.indx = y.indx and
x.ksppinm like lower('recyclebin');
VALUE
--------------------------------------------------------------------------------
OFF

If the command output is OFF, the recycle bin is disabled.


----End

Exception Handling

If the database recycle bin contains data that was added a specified number of days earlier,
clear the recycle bin.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 49


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Delete all data from the recycle bin.
SQL> purge recyclebin;
SQL> purge dba_recyclebin;
Step 4 Disable the recycle bin.
SQL> alter system set recyclebin=off scope=spfile;
Step 5 Shut down the database.
SQL> shutdown immediate;
Step 6 Restart the database.
SQL> startup;
----End

2.4.8 SSTAD007A-Checking Status of Automatic Maintenance


Tasks
Check and modify automatic maintenance tasks to reduce service running impacts.

Reference Standard
The status of auto optimizer stats collection is ENABLED and the status of auto space
advisor and sql tuning advisor is DISABLED.

Precaution
After automatic maintenance tasks are disabled, the database does not collect statistics.
Data is unevenly distributed when services run or a large amount of data is imported into the
database. You are advised to manually collect statistics.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether automatic maintenance tasks are disabled.
SQL> select t.client_name, t.status from dba_autotask_client t;
CLIENT_NAME STATUS
---------------------------------------------------------------- --------
auto optimizer stats collection ENABLED

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 50


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

auto space advisor DISABLED


sql tuning advisor DISABLED

----End

Exception Handling

If the check result is different from the expected result, you must resolve this problem.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Change the configuration of automatic maintenance tasks.
SQL> begin
DBMS_AUTO_TASK_ADMIN.enable(
client_name => 'auto optimizer stats collection',
operation => NULL,window_name => NULL);
DBMS_AUTO_TASK_ADMIN.disable(
client_name => 'auto space advisor',
operation => NULL,window_name => NULL);
DBMS_AUTO_TASK_ADMIN.disable(
client_name => 'sql tuning advisor',
operation => NULL,window_name => NULL);
end;
/
----End

2.4.9 SSTAD008A-Checking Whether Resource Plans Are


Disabled
Ensure that resource plans are disabled to prevent resource management bugs that affect
services.

Reference Standard
Resource plans are disabled.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 51


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether resource plans are disabled.
1. Check whether the system resource plan is disabled.
SQL> select a.value from v$parameter a where a.name = 'resource_manager_plan';
If no information is displayed, the system resource plan is disabled.
2. Check whether window resource plans are disabled.
SQL> select window_name, resource_plan from dba_scheduler_windows where
resource_plan is not null;
If no information is displayed, the window resource plans are disabled.
----End

Exception Handling

Currently, most sites where the Oracle database 11g Release 1 is in commercial use do not use
resource plans. Disable resource plans for these sites to prevent bugs.
If resource plans are enabled, obtain customer approval and disable them based on service
requirements.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Disable resource plans.
1. Disable the system resource plan.
Disable the system resource plan in either of the following modes:
 Immediately disable the system resource plan.
SQL> alter system set resource_manager_plan='' scope=both;
 Disable the system resource plan after the database restarts.
SQL> alter system set resource_manager_plan ='' scope=spfile;
2. Disable window resource plans.
Disable the MONDAY_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('MONDAY_WINDOW','RESOURCE_PLAN','');
Disable the TUESDAY_WINDOW plan.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 52


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SQL> execute
dbms_scheduler.set_attribute('TUESDAY_WINDOW','RESOURCE_PLAN','');
Disable the WEDNESDAY_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('WEDNESDAY_WINDOW','RESOURCE_PLAN','')
;
Disable the THURSDAY_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('THURSDAY_WINDOW','RESOURCE_PLAN','');
Disable the FRIDAY_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('FRIDAY_WINDOW','RESOURCE_PLAN','');
Disable the SATURDAY_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('SATURDAY_WINDOW','RESOURCE_PLAN','');
Disable the SUNDAY_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('SUNDAY_WINDOW','RESOURCE_PLAN','');
Disable the WEEKNIGHT_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','')
;
Disable the WEEKEND_WINDOW plan.
SQL> execute
dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
Step 4 Verify that resource plans are disabled.
1. Verify that the system resource plan is disabled.
SQL> select a.value from v$parameter a where a.name = 'resource_manager_plan';
No information is displayed.
2. Verify that window resource plans are disabled.
SQL> select window_name, resource_plan from dba_scheduler_windows where
resource_plan is not null;
No information is displayed.
----End

2.4.10 SSTAD009A-Checking Whether the Password Validity


Period Is Unrestricted
Ensure that the password validity period is unrestricted so that service applications can gain
access to the database even after passwords expire.

Reference Standard
The password validity period for Oracle database users is unrestricted.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 53


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the password validity period is unrestricted.
SQL> select distinct a.username, b.profile, b.resource_name, b.limit from dba_users a,
dba_profiles b where a.profile = b.profile and a.profile is not null and b.resource_type =
'PASSWORD' and b.resource_name = 'PASSWORD_LIFE_TIME' and b.limit <>
'UNLIMITED' and a.username not in (select c.username from dba_users_with_defpwd
c) and a.username not in ('SYS','SYSTEM','SYSMAN','MGMT_VIEW',
'ANONYMOUS', 'FLOWS_FILES', 'WKPROXY', 'WKSYS', 'FLOWS_030000',
'OLAPSYS', 'APEX_PUBLIC_USER' , 'DBSNMP');
If no information is displayed, the password validity period is unrestricted; otherwise, the
password validity period is restricted.
----End

Exception Handling

If the password validity period is restricted, determine whether to remove the restriction with
the customer.
After the restriction is removed, services must gain access to the database again.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the security of Oracle database users is hardened.
Step 4 Configure the password validity period to be unrestricted.
SQL> alter profile profile_name limit password_life_time unlimited;

Obtain the value of profile_name from the profile field in the following SQL statement.
SQL> select username,profile from dba_users where username='username';

----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 54


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.11 SSTAD010C-Checking Whether User Login Triggers Are


Disabled
Ensure that user login triggers are disabled to shorten the time for users to log in to the
database.

Reference Standard
User login triggers are disabled.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether user login triggers are disabled.
SQL> select owner, trigger_name from dba_triggers a where trim(a.triggering_event) =
'LOGON' and status ='ENABLED';
If no information is displayed, user login triggers are disabled.
----End

Exception Handling

Before disabling user login triggers, obtain customer approval.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Disable user login triggers.
SQL> alter trigger <owner>.<trigger_name> disable;
----End

2.4.12 SSTAD011A-Checking Whether the Number of


Consecutive Incorrect Password Inputs Is Unrestricted
Ensure that the number of consecutive incorrect password inputs is unrestricted for Oracle
database users. If the number of consecutive incorrect password inputs is restricted, a user's
account is locked after the user consecutively enters an incorrect password for a specified
number of times and as a result services fail to gain access to the database.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 55


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
The number of consecutive incorrect password inputs is unrestricted for Oracle database
users.

Precaution
If the number of consecutive incorrect password inputs is unrestricted, the database does not
lock an account after a user consecutively enters an incorrect password for times.
Skip this check if the customer must comply with special security requirements.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the number of consecutive incorrect password inputs is unrestricted.
SQL> select distinct a.username, b.profile, b.resource_name, b.limit from dba_users a,
dba_profiles b where a.profile = b.profile and a.profile is not null and b.resource_type =
'PASSWORD' and b.resource_name = 'FAILED_LOGIN_ATTEMPTS' and b.limit <>
'UNLIMITED' and a.username not in (select c.username from dba_users_with_defpwd
c) and a.username not in ('SYS','SYSTEM','SYSMAN','MGMT_VIEW',
'ANONYMOUS', 'FLOWS_FILES', 'WKPROXY', 'WKSYS', 'FLOWS_030000',
'OLAPSYS', 'APEX_PUBLIC_USER');
If no information is displayed, the number of consecutive incorrect password inputs is
unrestricted; otherwise, the number is restricted.
----End

Exception Handling

If the number of consecutive incorrect password inputs is restricted, remove the restriction.
Obtain customer approval before removing the restriction. After the restriction is removed,
services must gain access to the database again.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the security of Oracle database users is hardened.
Step 4 Configure the number of consecutive incorrect password inputs to be unrestricted.
SQL> alter profile profile_name limit failed_login_attempts unlimited;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 56


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Obtain the value of profile_name from the profile field in the following SQL statement.
SQL> select username,profile from dba_users where username='username';

----End

2.4.13 SSTAD012A-Checking Whether the Listener Log Recording


Function Is Disabled
Ensure that the listener log recording function is disabled to prevent listener logs from filling
up disks. If listener logs fill up disks, services cannot properly gain access to the database.

Reference Standard
The listener log recording function is disabled.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check whether the listener log recording function is disabled.
$ lsnrctl show log_status | grep "log_status"
LISTENER parameter "log_status" set to OFF

If the command output contains LISTENER parameter "log_status" set to OFF, the
listener log recording function is disabled.
----End

Exception Handling

If the command output contains LISTENER parameter "log_status" set to ON, the listener
log recording function is enabled. You must disable this function.
The database does not record listener logs after the listener log recording function is disabled,
which may fail to meet security or service requirements of the customer. Therefore, obtain
customer approval before disabling the listener log recording function.

Step 1 Log in to the operating system as the oracle user.


Step 2 Disable the listener log recording function.
1. Run the following command:
$ lsnrctl set log_status off
2. Add LOGGING_LISTENER=OFF to the end of the
$ORACLE_HOME/network/admin/listener.ora file on each database server node.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 57


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

$ echo "LOGGING_LISTENER=OFF" >>


$ORACLE_HOME/network/admin/listener.ora
----End

2.4.14 SSTAD013A-Checking Whether the Listener Trace Log


Recording Function Is Disabled
Ensure that the listener trace log recording function is disabled to prevent listener trace logs
from filling up disks. If listener trace logs fill up disks, services cannot properly gain access to
the database.

Reference Standard
The listener trace log recording function is disabled.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check whether the listener trace log recording function is disabled.
$ lsnrctl show trc_level
LISTENER parameter "trc_level" set to OFF

If the command output contains LISTENER parameter "trc_level" set to OFF, the listener
trace log recording function is disabled.
----End

Exception Handling

If the command output does not contain LISTENER parameter "trc_level" set to OFF, the
listener trace log recording function is enabled. In this case, you must disable this function.
The database does not record listener trace logs after the listener trace log recording function
is disabled, which may fail to meet security or service requirements of the customer.
Therefore, obtain customer approval before disabling the listener trace log recording function.

Step 1 Log in to the operating system as the oracle user.


Step 2 Disable the listener trace log recording function.
$ lsnrctl set trc_level off
Delete TRACE_LEVEL_LISTENER from the
$ORACLE_HOME/network/admin/listener.ora file on each database server node.
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 58


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.15 SSTAD014A-Checking Whether the Exclusive Connection


Mode Is Configured for Database Clients
Ensure that the exclusive connection mode instead of the shared connection mode is
configured for database clients to reduce memory occupied by the SGA.

Reference Standard
The exclusive connection mode is configured for database clients. That is, DEDICATED is
returned after the command for querying the database connection mode is executed.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the exclusive connection mode is configured for database clients.
SQL> select distinct server "mode" from v$session;
mode
-----------------
DEDICATED

----End

Exception Handling

If the shared connection mode is configured for database clients, disable this mode unless
special service requirements.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Stop shared service processes and scheduling applications.
SQL> alter system set shared_servers=0;
SQL> alter system set dispatchers='';
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 59


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.16 SSTAD015B-Checking Whether


SQLNET.OUTBOUND_CONNECT_TIMEOUT Is Disabled
Ensure that SQLNET.OUTBOUND_CONNECT_TIMEOUT is disabled so that service
applications respond quickly.

Reference Standard
The SQLNET.OUTBOUND_CONNECT_TIMEOUT parameter is disabled.

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the sqlnet.ora configuration file.
 If the TNS_ADMIN environment variable is configured for the database, run the
following command:
$ egrep "OUTBOUND_CONNECT_TIMEOUT" $TNS_ADMIN/sqlnet.ora
 If the TNS_ADMIN environment variable is not configured for the database, run the
following command:
$ egrep "OUTBOUND_CONNECT_TIMEOUT"
$ORACLE_HOME/network/admin/sqlnet.ora
If no information is displayed, SQLNET.OUTBOUND_CONNECT_TIMEOUT is
disabled. If SQLNET.OUTBOUND_CONNECT_TIMEOUT is enabled, information
similar to the following is displayed:
SQLNET.OUTBOUND_CONNECT_TIMEOUT=60

----End

Exception Handling

If SQLNET.OUTBOUND_CONNECT_TIMEOUT is enabled, disable it.


Disabling SQLNET.OUTBOUND_CONNECT_TIMEOUT requires restarting the listener.
Therefore, you must obtain customer approval before disabling this parameter.

Step 1 Log in to the operating system as the oracle user.


Step 2 Modify the configuration file.
 If the TNS_ADMIN environment variable is configured for the database, modify the
$TNS_ADMIN/sqlnet.ora file.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 60


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

$ vi $TNS_ADMIN/sqlnet.ora
 If the TNS_ADMIN environment variable is not configured for the database, modify the
$ORACLE_HOME/network/admin/sqlnet.ora file.
$ vi $ORACLE_HOME/network/admin/sqlnet.ora
Delete the following content from the file, or use a comment character (#) to comment out the
following content:
SQLNET.OUTBOUND_CONNECT_TIMEOUT=60

Step 3 Restart the listener.


$ lsnrctl stop
$ lsnrctl start

If multiple listeners exist, run the following commands for each listener:
$ lsnrctl start Listener name
$ lsnrctl stop Listener name

----End

2.4.17 SSTAD016A-Checking Database Availability


Ensure that the database is available so that services run properly.

Reference Standard
 The database instance is in the OPEN state.
 The database is in READ WRITE open mode. If the database is used for disaster
recovery, this item does not apply.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the database instance status.
SQL> select status from v$instance;
STATUS
------------
OPEN

The command output indicates that the database instance is in the OPEN state.
Step 4 Check the database open mode.
SQL> select open_mode,database_role from v$database;
OPEN_MODE DATABASE_ROLE
-------------------- ----------------
READ WRITE PRIMARY

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 61


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

 If the value of DATABASE_ROLE is PRIMARY, the value of OPEN_MODE must be


READ WRITE.
 If the value of DATABASE_ROLE is STANDBY, the value of OPEN_MODE is not
restricted.
----End

Exception Handling

Changing the database open mode requires restarting the database, which affects services.
Therefore, change the database open mode when service traffic is stopped or light.

If the database is in READ ONLY open mode, change this mode to READ WRITE as
follows:
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Restart the database.
SQL> shutdown immediate;
SQL> startup mount;
Step 4 Change the database open mode to READ WRITE.
SQL> alter database open read write;
----End

2.4.18 SSTAD017B-Checking the Number of Oracle Processes


Check the number of Oracle processes and ensure that processes is properly set so that
services can gain access to the database.

Reference Standard
The number of Oracle processes is less than or equal to 80% of the processes value.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the number of Oracle processes.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 62


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

1. Obtain the number of Oracle processes.


SQL> select count(*) total from v$process;
TOTAL
100

2. Obtain the value of processes.


SQL> select value from v$parameter p where p.name = 'processes';
value
--------------
1000

----End

Exception Handling

If the number of Oracle processes is greater than 80% of the processes value, increase the
processes value.
If services are busy or encounter network attacks, or zombie database processes run on the
database server, contact Huawei engineers.

Perform the following steps:


Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Increase the processes value.
For example, to increase the value to 1000, run the following command:
SQL> alter system set processes=1000 scope=spfile;
Step 4 Shut down the database.
SQL> shutdown immediate;
Step 5 Start the database.
SQL> startup;
----End

2.4.19 SSTAD018A-Checking OCR Integrity


Ensure Oracle Cluster Registry (OCR) integrity to prevent database running exceptions.

Reference Standard
The OCR is complete and is not physically or logically damaged.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 63


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access the bin directory in the CRS installation directory.
$ cd $CRS_HOME/bin
Step 3 Check OCR integrity.
$ ./ocrcheck
For example, the following information is displayed:
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 497744
Used space (kbytes) : 4692
Available space (kbytes) : 493052
ID : 1574958640
Device/File Name : /dev/diskgroup/dg_ocr
Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

If the command output contains Device/File integrity check succeeded, the check succeeds
and the OCR is complete.
----End

Exception Handling

If the OCR is incomplete, resolve this problem.

If checking OCR integrity fails, report related information to Huawei engineers and restore
the OCR.

2.4.20 SSTAD019A-Checking the Number of Voting Disks


Ensure that the number of voting disks is an odd number to prevent node communication
exceptions.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 64


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
The number of voting disks is an odd number. That is, the number in Located 1 voting disk(s)
is odd.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access the bin directory in the CRS installation directory.
$ cd $ORA_CRS_HOME/bin
Step 3 Check the number of voting disks.
$ ./crsctl query css votedisk
For example, the following information is displayed:
0. 0 /dev/diskgroup/dg_lock
Located 1 voting disk(s).

The command output indicates that one voting disk exists.


----End

Exception Handling

If the number of voting disks is an even number, delete voting disks until the number of
voting disks becomes odd.
After deleting voting disks, you must restart the database, which may interrupt services.
Therefore, obtain customer approval before deleting voting disks.

Contact Huawei engineers and delete voting disks under their guidance.

2.4.21 SSTAD020A-Checking the Cluster Status


Ensure that the cluster status is normal so that services can gain access to the database.

Reference Standard
All resources in the cluster are in the ONLINE state.

Precaution
Perform this check only in the Oracle RAC environment.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 65


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the cluster status.
$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....CKUP.dg ora....up.type 0/5 0/ ONLINE ONLINE p570...ent8
ora.DG_DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE p570...ent8
ora....NDEX.dg ora....up.type 0/5 0/ ONLINE ONLINE p570...ent8
ora.DG_OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE p570...ent8
ora.DG_ORA.dg ora....up.type 0/5 0/ ONLINE ONLINE p570...ent8
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE p570...ent8
ora....RA.lsnr ora....er.type 0/5 0/ ONLINE ONLINE p570...ent8
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE p570...ent9

If the command output shows that all resources in the cluster are in the ONLINE state, the
cluster status is normal; otherwise, the cluster status is abnormal.
----End

Exception Handling

If some resources are in the OFFLINE state, these resources are not enabled. In this case,
bring these resources online.

Contact Huawei engineers for guidance.

2.4.22 SSTAD021A-Checking CACHE_SIZE for SYS.IDGEN1$


and SYS.AUDSES$
Ensure that CACHE_SIZE for the sequences SYS.IDGEN1$ and SYS.AUDSES$ is proper
to prevent congestion in peak hours. Congestion in peak hours slows down responding.

Reference Standard
 The value of CACHE_SIZE forSYS.IDGEN1$ is equal to or greater than 1000.
 The value of CACHE_SIZE forSYS.AUDSES$ is equal to or greater than 10000.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 66


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 2 Connect to the database.


$ sqlplus '/ as sysdba'
Step 3 Check CACHE_SIZE for SYS.IDGEN1$ and SYS.AUDSES$.
SQL> select a.sequence_owner, a.sequence_name, a.cache_size from dba_sequences a
where a.sequence_owner = 'SYS' and a.sequence_name in('IDGEN1$', 'AUDSES$');
SEQUENCE_OWNER SEQUENCE_NAME CACHE_SIZE
------------------------------ ------------------------------ ----------
SYS AUDSES$ 10000
SYS IDGEN1$ 1000

In the command output, the value of CACHE_SIZE corresponding to IDGEN1$ is equal to


or greater than 1000, and that of CACHE_SIZE corresponding to AUDSES$ is equal to or
greater than 10000.
----End

Exception Handling

If the value of CACHE_SIZE for SYS.IDGEN1$ and SYS.AUDSES$ is less than 1000,
modify CACHE_SIZE.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Set CACHE SIZE of SYS.IDGEN1$ to 1000.
SQL> alter sequence sys.IDGEN1$ cache 1000;
Step 4 Set CACHE SIZE of SYS.AUDSES$ to 10000.
SQL> alter sequence sys.AUDSES$ cache 10000;
----End

2.4.23 SSTAD022C-Checking Whether the Flashback Path Is


Closed
Ensure that the flashback path is closed to prevent extra consumption of the database.

Reference Standard
The flashback path is closed. That is, the value is empty in the VALUE column for
db_recovery_file_dest.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 67


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the flashback path is closed.
SQL> show parameter DB_RECOVERY_FILE_DEST;
NAME TYPE VALUE
--------------------------- ----------- ------------------------------
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0

If the value is empty in the VALUE column for db_recovery_file_dest, the flashback path is
closed.
----End

Exception Handling

If the flashback path is not closed, close it.


Before closing the flashback path, obtain customer approval.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Set db_recovery_file_dest to *.
SQL> alter system reset db_recovery_file_dest sid='*';
----End

2.4.24 SSTAD035A-Checking the diagwait Parameter


Ensure that diagwait is set to a proper value so that more helpful logs can be recorded. If the
value of diagwait is less than 13 (in seconds), the period between the time when a node
crashes and the time when the node restarts is insufficient for moving logs from the cache to a
disk.

Reference Standard
The value of diagwait is equal to 13.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 68


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the value of diagwait.
$ crsctl get css diagwait
13

If the returned value is 13 (seconds), diagwait complies with the expected result; otherwise,
you must reset diagwait.
----End

Exception Handling

If the value of diagwait is not 13, reset diagwait.


To reset diagwait, you must stop the cluster, which affects services. Therefore, obtain
customer approval before resetting diagwait.

Step 1 Log in to the operating system as the root user.


Step 2 Stop the CRS cluster.
Run the following commands on all CRS cluster nodes:
# $CRS_HOME/bin/crsctl stop crs
# $CRS_HOME/bin/oprocd stop
Step 3 Check whether CRS processes exist.
# ps -ef |egrep "crsd.bin|ocssd.bin|evmd.bin|oprocd" | grep -v grep
If no information is displayed, all CRS processes are stopped. Otherwise, CRS processes still
exist and you must repeat Step 2.
Step 4 On a CRS cluster node, set diagwait to 13.
# $CRS_HOME/bin/crsctl set css diagwait 13 -force
Step 5 Check whether diagwait is successfully set.
# $CRS_HOME/bin/crsctl get css diagwait get css diagwait
If the returned value is 13, diagwait is successfully set. If the message "Configuration
parameter diagwait is not defined" is displayed, diagwait is not set and you must repeat Step
4.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 69


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 6 Start the CRS cluster.


Run the following commands on all CRS cluster nodes:
# $CRS_HOME/bin/crsctl start crs
----End

2.4.25 SSTAD023A-Checking Index Validity


Ensure that indexes are valid to prevent SQL statements from scanning entire tables. Scanning
entire tables slows down responding.

Reference Standard
Indexes are valid. That is, indexes are not in the UNUSABLE state.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether indexes are valid.
SQL> select a.owner, a.index_name, a.status from dba_indexes a where a.status =
'UNUSABLE' union all select a.index_owner, a.index_name, a.status from
dba_ind_partitions a where a.status = 'UNUSABLE';
For example, the following information is displayed:
no rows selected

----End

Exception Handling

If indexes are invalid, resolve the problem.

If indexes are in the UNUSABLE state, recreate them by using either of the following
methods:
 Recreate indexes online by running the following command:
SQL> alter index Index name rebuild online nologging;
 Recreate indexes locally by running the following commands:
SQL> drop index Index_name;
SQL> create index Index_name on Table_name(Field 1, Field 2,…) tablespace
Tablespace_name local;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 70


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.26 SSTAD024A-Checking Whether the Partition Table


Contains Global Indexes
Ensure that the partition table does not contain global indexes. Using global indexes slows
down SQL queries.

Reference Standard
The partition table does not contain global indexes.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the partition table contains global indexes.
SQL> select a.owner, a.table_name, a.index_name, a.partitioned, a.status from
dba_indexes a, dba_part_tables b where a.table_name = b.table_name and
a.owner=b.owner and a.owner not in
('SYS','SYSTEM','MDSYS','SYSMAN','MGMT_VIEW', 'ANONYMOUS',
'FLOWS_FILES', 'WKPROXY', 'WKSYS', 'FLOWS_030000', 'OLAPSYS',
'APEX_PUBLIC_USER') and a.partitioned <> 'YES';
For example, the following information is displayed:
no rows selected

----End

Exception Handling

If the partition table contains global indexes, delete these global indexes.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Delete global indexes.
SQL> drop index Index name;
Step 4 Create local indexes.
SQL> create index Index name on Table name(Field 1, Field 2,…) tablespace Tablespace
name local;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 71


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

----End

2.4.27 SSTAD025B-Checking the Parallelism Degrees of Service


Objects
Ensure that the parallelism degrees of service objects are 1 to prevent use of inappropriate
execution plans that affect database performance.

Reference Standard
The parallelism degrees of service objects are 1.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the parallelism degrees of service objects.
SQL> select owner, object_name, degree from (select a.owner, a.table_name
object_name, a.degree from dba_tables a where trim(a.degree) > '1' union all select
a.owner, a.index_name object_name, a.degree from dba_indexes a where trim(a.degree)
> '1' ) b where b.owner not in ('SYS', 'SYSTEM', 'SYSMAN', 'MGMT_VIEW') and
b.owner not in (select c.username from dba_users_with_defpwd c);
If the following information is displayed, service objects whose parallelism degree is 1 do not
exist:
no rows selected

----End

Exception Handling

If the parallelism degrees of service objects are not 1, change the degrees.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Change the parallelism degrees of service objects to 1.
SQL> alter table Table name parallel(degree 1);
SQL> alter table Index name parallel(degree 1);

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 72


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

----End

2.4.28 SSTAD026B-Checking for Invalid Objects


Ensure that the database does not contain invalid objects.

Reference Standard
The database does not contain invalid objects.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check for invalid objects.
SQL> select t.owner, t.object_type, t.object_name, t.status from dba_objects t where
t.status = 'INVALID';
If the following information is displayed, no invalid object exists:
no rows selected

----End

Exception Handling

If the database contains invalid objects, resolve this problem.

Contact Huawei engineers to delete invalid objects and perform the following steps:
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Recompile invalid objects.
SQL> alter Value in the object_type column Value in the owner column.Value in the
object_name column compile;
Example: alter procedure test.p_rundata compile;
If objects are still invalid after recompilation, contact Huawei engineers to resolve this
problem.
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 73


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.29 SSTAD027A-Checking crs/oracle Space


Ensure that the disk where the database software is installed has sufficient available space to
prevent logs and trace files from filling up the disk. If logs and trace files fill up the disk,
services cannot gain access to the database or the operating system crashes.

Reference Standard
The space usage of the disk where $ORACLE_HOME is located is less than or equal to 80%.
The space usage of the disk where $ORA_CRS_HOME in the RAC network mode is located
is less than or equal to 80%.

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check the space usage of the disk where $ORACLE_HOME is located.
$ df -k $ORACLE_HOME
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/lvoracle 41943040 34491340 18% 43194 1% /opt/oracle

Step 3 Check the space usage of the disk where $ORA_CRS_HOME is located.
$ df -k $ORA_CRS_HOME
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 10490104 4133284 6356820 40% /

----End

Exception Handling

If the disk usage is greater than 80%, delete unnecessary files from the disk.

 Delete files from $ORACLE_BASE/diag/rdbms/$ORACLE_SID/


$ORACLE_SID/trace.
 Delete unnecessary backup files.

2.4.30 SSTAD032A-Checking the Interval for Collecting AWR


Snapshots
Check the interval for collecting Automatic Workload Repository (AWR) snapshots to ensure
that the collected AWR reports are helpful for analyzing database performance problems.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 74


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
The interval for collecting AWR snapshots is 30 minutes, and the database retains the
snapshots for eight days by default.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the interval for collecting AWR snapshots.
SQL> select snap_interval,retention from dba_hist_wr_control;
SNAP_INTERVAL RETENTION
--------------- -----------------
+00000 00:30:00.0 +00008 00:00:00.0

In the example, the value of SNAP_INTERVAL is 00:30:00.0, which indicates that the
collection interval is 30 minutes, and the value of RETENTION is 00008, which indicates
that the reservation duration is eight days.
----End

Exception Handling

If the check results are not the expected results, you must rectify the fault.
Before rectification, expand the SYSAUX tablespace. Ensure that the SYSAUX tablespace
has sufficient space for storing AWR information after frequency is adjusted. Contact Huawei
engineers for guidance to expand the SYSAUX tablespace.
For example, if the interval is 1 hour, the database retains the snapshots for eight days, and the
the size of the SYSAUX tablespace is 5 GB, expand the SYSAUX tablespace by at least 5
GB. If you have any questions, contact Huawei technical support engineers.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Set the interval to 30 minutes and snapshot retention to eight days.
SQL> exec
dbms_workload_repository.modify_snapshot_settings(interval=>30,retention=>8*24*60
);
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 75


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.31 SSTAD033A-Checking RAC Cluster Component Integrity


Check cluster component integrity to prevent cluster crashes and startup failures caused by
incomplete components.

Reference Standard
The cluster component integrity verification tool displays the message successful.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access /bin for CRS installation.
$ cd $ORA_CRS_HOME/bin
Step 3 Use the Cluster Verification Utility (CVU) to check RAC cluster component integrity.
$ ./cluvfy comp sys -n all -p crs -verbose
$ ./cluvfy comp sys -n all -p database -verbose
$ ./cluvfy comp nodecon -n all -verbose
$ ./cluvfy comp admprv -n all -o user_equiv -verbose
$ ./cluvfy comp peer -n all -verbose
$ ./cluvfy comp clu -n all -verbose
$ ./cluvfy comp crs -n all -verbose
$ ./cluvfy comp ocr -n all -verbose
If the command output contains information similar to Verification of X was successful, the
RAC cluster component is complete. In the message, X indicates the name of the component
to be checked.

If a message indicating that the system package does not exist is displayed when you run the cluvfy
comp sys -n all -p crs –verbose or cluvfy comp sys -n all -p database -verbose command for the AIX
operating system, skip the message.
vacpp.cmp.core:8.0.0.13
vac.C:8.0.0.13
freeware.gcc.rte:3.4.5.0
mqm.server.rte:6.0
mqm.client.rte:6.0
gdb-6.3
xlfrte:10.1
make-3.81
freeware.gnu.tar.rte:1.15.0.0
sna.rte:6.3

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 76


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

python-2.3
freeware.zip.rte:2.31

----End

Exception Handling

If the check result is different from the expected result, you must resolve this problem.

If the command output contains information similar to Verification of X was unsuccessful on


all the specified nodes, the RAC cluster component is incomplete or the configuration is
incorrect. Collect displayed messages after verification and contact Huawei engineers for
troubleshooting.

2.4.32 SSTAD034A-Checking Status of Database Scheduled Tasks


Check status of scheduled tasks to ensure that the scheduled tasks can be properly performed
and services are properly running.

Reference Standard
The database does not contain invalid, failed, or interrupted scheduled tasks. That is, the
displayed result of Step 3 is blank.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Log in to the database.
$ sqlplus '/ as sysdba'
Step 3 Check status of database scheduled tasks.
SQL> select to_char(job) job_name,decode(broken, 'Y', 'DISABLED', 'ENABLE') state
from dba_jobs where broken='Y' union all select job_name, state from
dba_scheduler_jobs where state='DISABLED' and system='FALSE';
If the message no rows selected is displayed, the scheduled tasks are normal.
----End

Exception Handling

If the check result is different from the expected result, you must resolve this problem.

If the returned result is blank, the scheduled tasks are abnormal. Collect returned results and
contact Huawei engineers for troubleshooting.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 77


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.4.33 SSTAD037A-Checking the Dependency Relationship


Between a Database Instance and an ASM Instance
Check the dependency relationship between a database instance and an ASM instance so that
the database instance can properly start after the ASM instance is completely started.

Reference Standard
The REQUIRED_RESOURCES attribute of the database instance is the ASM resource of
the corresponding node.

Precaution
Perform this check only when the Oracle RAC is used and the ASM is enabled.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Obtain the CRS resource of the corresponding database instance.
$ crs_stat | grep inst | grep $ORACLE_SID
NAME=ora.ora11g.ora11g1.inst

Step 3 Check the node name.


$ olsnodes -l
cbp1a

Step 4 Check the ASM resource of the node.


$ crs_stat | grep asm | grep cbp1a
NAME=ora.cbp1a.ASM1.asm

Step 5 Check the REQUIRED_RESOURCES attribute of the database instance.


The database instance name is ora11g1, and the ASM instance name is ASM1.
$ crs_stat -p ora.ora11g.ora11g1.inst
NAME=ora.ora11g.ora11g1.inst
TYPE=application
ACTION_SCRIPT=/oracle/app/product/11g/db/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=300
DESCRIPTION=CRS application for Instance
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=cbp1a
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.cbp1a.ASM1.asm
RESTART_ATTEMPTS=5

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 78


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

The command output shows that the REQUIRED_RESOURCES attribute is


ora.cbp1a.ASM1.asm. This indicates that the database instance ora11g1 depends on the
ASM1.

The CRS resource corresponding to the database instance ora11g1 is ora.ora11g.ora11g1.inst, and the
CRS resource corresponding to the ASM1 is ora.cbp1a.ASM1.asm.

----End

Exception Handling

If the check result is different from the expected result, you must resolve this problem.
Before rectify the fault, confirm the rectification with Huawei engineers.

Step 1 Log in to the operating system as the oracle user.


Step 2 Add the dependency relationships between the database instance and ASM instance.
$ srvctl modify instance -d <db_unique_name> -i <inst_name> -s <asm_instance_name>
For example, add the database instance named ora11g1 and the ASM instance named ASM1.
$ srvctl modify instance -d ora11g -i ora11g1 -s +ASM1
----End

2.4.34 SSTAD028A-Checking Whether the Listener Is Configured


with a Floating IP Address
Ensure that the listener is configured with a floating IP address so that services can gain
access to the database after two-node cluster switchovers.

Reference Standard
The listener is configured with a floating IP address. That is, the command output in is
consistent with the floating IP address or host name in the /etc/hosts file.

Precaution
Perform this check only in the Oracle HA environment and skip this check for other database
environment.
Perform this check on both the active and standby node for the Oracle HA environment

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check whether the listener is configured with a floating IP address.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 79


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

 If the TNS_ADMIN environment variable is configured for the Oracle database, run the
following command:
$ cat $TNS_ADMIN/listener.ora | grep HOST
 If the TNS_ADMIN environment variable is not configured for the Oracle database, run
the following command:
$ cat $ORACLE_HOME/network/admin/listener.ora | grep HOST
If the command output is consistent with the floating IP address or host name in the /etc/hosts
file, the listener is configured with a floating IP address.
----End

Exception Handling

If the listener is not configured with a floating IP address, resolve this problem.
Resolving this problem requires restarting the database, modifying service configurations, and
restarting services.

Step 1 Log in to the operating system as the oracle user.


Step 2 Configure the floating IP address for the listener.
If the TNS_ADMIN environment variable is configured for the Oracle database, modify the
$TNS_ADMIN/listener.ora file; otherwise, change the listening host address to the floating
IP address in the $ORACLE_HOME/network/admin/listener.ora file.
For example, set HOST to 10.10.1.1.
LISTENER_ORA =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.1)(PORT = 1526))
)
)
)

Step 3 Restart the listener service process.


$ lsnrctl stop <listener_name>
$ lsnrctl start<listener_name>
----End

2.4.35 SSTAD029A-Checking the Database Listener Status


Ensure that the database listener status is normal so that services can gain access to the
database.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 80


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
Listening processes are displayed under the oracle user, and the listening status is normal.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check whether the listener service process exists.
$ ps -ef | grep lsnr | grep -v grep
oracle 1311 1 0 Sep 18 - 00:00:01
/oracle/app/product/11g/db/bin/tnslsnr LISTENER -inherit

The command output indicates that the listener service process exists.
Step 3 Check listening status.
$ lsnrctl STATUS <listener_name>
For example, check status of LISTENER.
$ lsnrctl status LISTENER
LSNRCTL for IBM/AIX RISC System/6000: Version 11.1.0.6.0 - Production on 01-MAR-
2013 16:56:46

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.71.166.109)
(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 11.1.0.6.0
- Production
Start Date 27-FEB-2013 14:35:30
Uptime 2 days 2 hr. 21 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File
/opt/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File
/opt/oracle/diag/tnslsnr/P570dvclient1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.71.166.109)(PORT=1521)))
Services Summary...
Service "ora11g1" has 1 instance(s).
Instance "ora11g1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

If instance status is UNKNOWN or READY, database listening status is normal; if instance


status is BLOCKED, listening status is abnormal.
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 81


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Exception Handling

If the listener service process does not exist, resolve this problem.

Step 1 Log in to the operating system as the oracle user.


Step 2 Start the database listener.
$ lsnrctl start <listener_name>
Step 3 Check listening status again.
$ ps -ef | grep lsnr | grep -v grep
$ lsnrctl STATUS <listener_name>
Step 4 If the database listener status is still abnormal, perform the following steps:
1. Collect error information and the log files in $ORACLE_HOME/network/log.
2. Submit collected information to Huawei engineers.
----End

2.4.36 SSTAD030A-Checking Whether the Listener Uses the Static


Registration Mode
Ensure that the database listener uses the static registration mode. If the database listener uses
the dynamic registration mode, the PMON cannot release listening task connections as soon
as possible and the listener enters the Block state when the number of listening task
connections reaches an upper limit. As a result, services cannot gain access to the database.

Reference Standard
The database listener uses the static registration mode. That is, the database listener is in the
UNKNOWN state.

Precaution
Perform this check only in the Oracle HA or single-cluster environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Obtain the listener run as the oracle user.
$ ps -ef | grep lsnr | grep -v grep
oracle 1311 1 0 Sep 18 - 00:00:01
/oracle/app/product/11g/db/bin/tnslsnr LISTENER -inherit

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 82


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 3 Check whether the database listener is in UNKNOWN state.


$ lsnrctl status <listener_name> | grep "UNKNOWN"
Instance "suseora2", status UNKNOWN, has 1 handler(s) for this service... The
command completed successfully

The command output indicates that the listener is in the UNKNOWN state.
----End

Exception Handling

If the database listener is not in the UNKNOWN state, reconfigure the


$TNS_NAMES/listener.ora file and restart the listener.
Configure the listener.ora file again and restart the listener.

Step 1 Log in to the operating system as the oracle user.


Step 2 Modify the listener configuration file.
If the Oracle database is configured with the TNS_ADMIN environment variable, modify the
$TNS_ADMIN/listener.ora file; otherwise, modify the
$ORACLE_HOME/network/admin/listener.ora file.
Add the following content to the file:
SID_LIST_<Local_node_listener_name>=
(SID_LIST=
(SID_DESC=
(SID_NAME=<sid_name>)
(GLOBAL_DBNAME=<service_name>)
(ORACLE_HOME=<ORACLE_HOME>)
)
)

 Local_node_listener_name: indicates the listener name. The default listener name is LISTENER.
 sid_name: indicates the database instance name.
 GLOBAL_DBNAME: indicates the global database instance name. You can set this parameter to
the value of sid_name.
 ORACLE_HOME: indicates the database home directory.
An example of the file content after modification is as follows:
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=ora11g)
(GLOBAL_DBNAME=ora11g)
(ORACLE_HOME=/opt/oracle/oracle/product/11.1/)

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 83


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

)
)

Step 3 Restart the listener.


$ lsnrctl stop <listener_name>
$ lsnrctl start <listener_name>
----End

2.4.37 SSTAD031B-Checking Cluster Network Adapter


Configurations
Ensure that cluster network adapter configurations are correct to prevent service interruption
due to single network adapter faults.

Reference Standard
The public and private network adapters in the CRS are virtual network adapters. That is, the
network adapter names are in the bondN format in the command output in .

Precaution
Perform this check only on SUSE Linux in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access the bin directory in the CRS installation directory.
$ cd $CRS_HOME/bin
Step 3 Check cluster network adapter configurations.
$ ./oifcfg getif
For example, the following information is displayed:
bond0 10.71.111.128 global public
bond1 192.168.10.0 global cluster_interconnect

The command output indicates that the public and private network adapters in the CRS are
virtual network adapters.
----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 84


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If the public and private network adapters in the CRS are not virtual network adapters,
reconfigure the network adapters.
Obtain customer approval before reconfiguring the network adapters and reconfigure the
network adapters when impact on services is minimal.

Contact Huawei engineers and reconfigure network adapters under their guidance.

2.4.38 SSTAD038A-Checking the Number of Audit Files


Check the number of audit files. If the audit directory has many audit files, system space is
occupied and audit file writing performance deteriorates.

Reference Standard
The number of audit files is less than or equal to 3000.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Log in to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the audit directory.
SQL> show parameter audit_file_dest;
NAME TYPE VALUE
-----------------------------------------------------------------------------
audit_file_dest string /opt/oracle/admin/ora11g1/adump

Step 4 Check the number of audit files in the audit directory.


$ find /opt/oracle/admin/ora11g1/adump -name "*.aud" | wc -l
4225

If the audit directory is blank or does not exist according to the returned result of Step 3, run
the find $ORACLE_BASE/admin/<DB_NAME>/adump -name "*.aud" | wc -l command.
You can run the following command to query <DB_NAME>:
SQL> show parameter db_name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string ora11g

----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 85


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If the check result is different from the expected result, you must resolve this problem.

If the check result is different from the expected result, manually delete expired audit files in
ORACLE_BASE/admin/<DB_NAME>/adump and reserve only the latest audit logs.

2.5 Preventive Maintenance Items for Space Management


2.5.1 SSTAE001B-Checking Redo Log Configurations
Ensure that a proper number of redo log groups are configured to prevent frequent database
switchovers and ensure that the redo log files in each group are mutually redundant for data
restoration.

Reference Standard
Each instance is configured with at least five redo log groups, and each redo log group
contains two redo log files that are mutually redundant.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check log groups configured by instances.
SQL> select thread#,count(group#) groups from v$log group by thread#;
THREAD# GROUPS
---------- ----------
1 5
2 5

The command output shows that five groups of redo logs are configured for instance 1 and
instance 2 respectively.
Step 4 Check whether two redo files are configured for each group of redo logs.
SQL> select thread#,group#,members from v$log;
THREAD# GROUP# MEMBERS
---------- ---------- ----------
1 1 2
1 2 2
1 3 2
1 4 2
1 5 2
2 6 2
2 7 2
2 8 2

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 86


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2 9 2
2 10 2

The command output shows that each group of logs contain two logs backed up each other.
----End

Exception Handling

If less than five redo log groups are configured, add redo log groups based on service
requirements.
Add a redo log file to redo log groups whose MEMBERS is 1.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 If the number of redo log groups is insufficient, add redo log groups.
For example, to add redo log group 5, run the following command:
 For the Oracle in HA or singe-node cluster mode, run the following command:
SQL> alter database add logfile group 5 ('/dev/vg_ora/roar_redo051',
'/dev/vg_ora/roar_redo052) size 500m;
 For Oracle RAC, run the following command:
SQL> alter database add logfile instance 'instance_name' group 5
('/dev/vg_ora/roar_redo051', '/dev/vg_ora/roar_redo052') size 500m;
In the preceding command, /dev/vg_ora/roar_redo051 and /dev/vg_ora/roar_redo052
indicate the redo log files in the group, and 500 indicates the size of each redo log file.
Change instance_name to the redo log file names and the file size based on the site
requirements.
Step 4 Add a redo log file to redo log groups whose MEMBERS is 1.
For example, to add a redo log file to redo log group 4, run the following command:
SQL> alter database add logfile member '/dev/vg_ora/roar_redo042' to group 4;
In the preceding command, /dev/vg_ora/roar_redo042 indicates the redo log file to be added.
Change the file name based on the site requirements.
----End

2.5.2 SSTAE002A-Checking the Switching Frequency of Redo Log


Files
Ensure that redo log files are switched at a proper frequency to prevent small redo log file
sizes from slowing down service responding.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 87


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
The value of MINUTES is equal to or greater than 20.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the switching frequency of redo log files.
SQL> select a.thread#,row_number() over (partition by a.thread# order by a.thread#)
num,to_char(b.first_time, 'yyyy-mm-dd hh24:mi:ss') start_time,to_char(a.first_time,
'yyyy-mm-dd hh24:mi:ss') end_time,round(((a.first_time - b.first_time) * 24) * 60, 2)
minutes from v$log_history a, v$log_history b where a.first_change# = b.next_change#
and a.thread# = b.thread# and a.first_time > sysdate - 3 order by a.thread#, a.stamp asc;
THREAD# NUM START_TIME END_TIME MINUTES
-------- --- ------------------ ------------------ ------
1 2012-01-17 16:58:57 2012-09-24 09:39:49 361001
2 2012-09-24 09:39:49 2012-09-24 14:00:02 260
3 2012-09-24 14:00:02 2012-09-24 22:00:59 481

----End

Exception Handling

If the value of MINUTES is less than 20, increase the sizes of redo log files.

For details, contact Huawei engineers.

2.5.3 SSTAE003A-Checking Data File Status


Ensure that data files are available so that services and the database run properly.

Reference Standard
Data files are in the SYSTEM, ONLINE, or AVAILABLE state.
Data files cannot be automatically extended. That is, the value of autoextensible for data files
is NO.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 88


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

$ sqlplus '/ as sysdba'


Step 3 Check data file status.
SQL> col tablespace_name for a20;
SQL> col file_name for a55;
SQL> col autoextensible for a20;
SQL> set linesize 140;
SQL> select tablespace_name, file_id, file_name, status, autoextensible from ( select
tablespace_name, file_id, file_name, bytes/(1024*1024) size_mb, a.blocks,
a.online_status status, autoextensible, 1 rn from dba_data_files a union all select
tablespace_name, file_id, file_name, bytes/(1024*1024) size_mb, b.blocks, b.status,
b.autoextensible, 2 rn from dba_temp_files b where b.tablespace_name=(select
property_value from database_properties where
property_name='DEFAULT_TEMP_TABLESPACE')) order by rn, file_id;
TABLESPACE_NAM FILE_ID FILE_NAME STATUS AUTOEXTENSIBLE

-------------- ---------- ------------------------------ ----------


----------------
SYSTEM 1 +DG_ORA/ora11g/ora_system SYSTEM NO
SYSAUX 2 +DG_INDEX/ora11g/ora_sysaux01 ONLINE NO
UNDOTBS1 3 +DG_BACKUP/ora11g/ora_rbs01 ONLINE NO
UNDOTBS2 4 +DG_BACKUP/ora11g/ora_rbs02 ONLINE NO
USERS 5 +DG_ORA/ora11g/ora_user ONLINE NO
TEMP 1 +DG_INDEX/ora11g/ora_temp01 ONLINE NO

6 rows selected.

----End

Exception Handling

If the value in the STATUS column is not SYSTEM, ONLINE, or AVAILABLE, resolve
this problem.

For details, contact Huawei engineers.

2.5.4 SSTAE004A-Checking the Number of Control Files


Ensure that at least three control files are configured. If less than three control files are
configured, the database becomes unavailable when a control file is damaged.

Reference Standard
At least three control files are configured.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 89


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the number of control files.
SQL> select value control_files from v$parameter where name = 'control_files';
CONROL_FILES
------------------------------------------
/oracle/app/oradata/test/control01.ctl, /oracle/app/oradata/test/control02.ctl,
/oracle/app/oradata/test/control03.ctl

----End

Exception Handling

If less than three control files are configured, add control files. Adding control files requires
restarting the database. Therefore, obtain customer approval before adding control files.

Contact Huawei engineers and perform the following steps under their guidance:
Step 1 If the ASM is not used, perform the following steps to add control files:
1. Modify initialization parameters.
$ sqlplus '/ as sysdba'
SQL> alter system set
control_files='/dev/vg_ora/rcontrol01.ctl','/dev/vg_ora/rcontrol02.ctl',
'/dev/vg_ora/rcontrol03.ctl' scope=spfile;

Change the control file name and path based on the site requirements.
2. Shut down the database.
SQL> shutdown immediate;
3. Copy the content of an existing control file to the new control file.
$ dd if=/dev/vg_ora/rcontrol01.ctl of=/dev/vg_ora/rcontrol03.ctl

Change the control file name and path based on the site requirements.
4. Start the database.
SQL> startup
5. Check the new control file.
SQL> select name from v$controlfile;
Step 2 If the ASM is used, perform the following steps to add control files:

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 90


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

1. Check control file configurations.


$ sqlplus '/ as sysdba'
SQL> select name from v$controlfile;
NAME
-------------------------------------------------------------------------------
-
+DG_ORA/test/control01.ctl
+DG_ORA/test/control02.ctl
+DG_ORA/test/control03.ctl

2. Modify initialization parameters.


SQL> alter system set
control_files='+DG_ORA/test/control01.ctl','+DG_ORA/test/control02.ctl','+DG_O
RA/test/control03.ctl','+DG_ORA/test/control04.ctl' scope=spfile;
System altered.

3. Shut down the database. For the Oracle RAC, shut down all the instances.
SQL> shutdown immediate;
4. Start instances in nomount mode. Start only one instance in RAC mode.
SQL> startup nomount;
SQL> exit
5. Use the RMAN to recover control files from the existing control files.
$ rman target / nocatalog
RMAN> restore controlfile to '+DG_ORA/test/control04.ctl' from
'+DG_ORA/test/control01.ctl';
Starting restore at 01-FEB-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=144 device type=DISK

channel ORA_DISK_1: copied control file copy


Finished restore at 01-FEB-13

RMAN> exit
6. Restart the database and check control file configuration. Start all database instances for
the Oracle RAC.
$ sqlplus '/ as sysdba'
SQL> shutdown immediate;
SQL> startup
SQL> select name from v$controlfile;
NAME
-------------------------------------------------------------------------------
-
+DG_ORA/test/control01.ctl
+DG_ORA/test/control02.ctl
+DG_ORA/test/control03.ctl
+DG_ORA/test/control04.ctl

----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 91


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.5.5 SSTAE005A-Checking Archive Log Configurations


Ensure that archive log configurations are correct so that the database can properly archive
logs.

Reference Standard
 The database is in archive mode. That is, the value of LOG_MODE obtained in Step 3
is ARCHIVELOG.
 An archive log path has been specified. That is, an archive log path is found in Step 4 or
Step 5.
 The usage of disk where the archive log path is located is less than 70%. That is, the
value of Use% is less than 70% in the command output in Step 6.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the database is in archive mode.
SQL> select log_mode from v$database;
LOG_MODE
-----------
ARCHIVELOG

The command output indicates that the database is in archive mode.


Step 4 If the database is in archive mode, obtain the archive log path.
SQL> select name, value from v$parameter p where p.name like 'log_archive_dest%'
and lower(value) like 'location%';
NAME VALUE
------------------- ---------------
log_archive_dest_1 LOCATION=/ora_arch

The command output indicates that the archive log path is /ora_arch.
Perform Step 5 only when the value in the VALUE column is
LOCATION=USE_DB_RECOVERY_FILE_DEST indicating that the archive log path is
located in the flash recovery area.
Step 5 (Optional) Obtain the archive log path.
SQL> select value from v$parameter p where name = 'db_recovery_file_dest'
VALUE
------------------------------------------
1 /opt/oracle/oradb/flash_recovery_area

The command output indicates that the archive log path is


/opt/oracle/oradb/flash_recovery_area.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 92


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 6 Based on the archive log path obtained in Step 4 or Step 5, check the usage of the disk where
the path is located.
 If the ASM is not used, run the following command:
$ df -k /ora_arch
Filesystem 1K-blocks Used Available Use% Mounted on
/ora_arch 4200824 2479248 1721576 60% /ora_arch

The command output indicates that the space availability ratio of the disk where the
archive path is located is 40%.
 If the ASM is used, run the following command:
1. Log in to the operating system as the oracle user.
2. Configure the ASM instance name and log in to the ASM instance.
$ export ORACLE_SID=+ASM1
In the preceding command, +ASM1 indicates the ASM instance name. Change the name
based on the site requirements.
3. Check ASM disk space.
SQL> select name,total_mb,(total_mb - free_mb) used_mb,round((1-
free_mb/total_mb)*100,2) "use%" from v$asm_diskgroup where
name=‘DG_ARCH’;
NAME TOTAL_MB USED_MB use%
--------------- ---------- ---------- ----------
DG_ARCH 102400 37095 36.23

The command output indicates that the space availability ratio of the disk where the
archive path is located is 64%.
----End

Exception Handling

Whether the database runs in archive mode depends on product requirements.


If the database must run in archive mode, obtain customer approval and verify that available
disk space is sufficient before configuring the database to run in archive mode.

Before configuring the database to run in archive mode, setting an archive log path, and
extending disk space, contact Huawei engineers to create a feasible plan.

2.5.6 SSTAE006C-Checking the SYSTEM Tablespace Size


Ensure that the SYSTEM tablespace has sufficient space to prevent database running
exceptions or the ORA-600 error.

Reference Standard
The SYSTEM tablespace size is equal to or greater than 2 GB.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 93


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the SYSTEM tablespace size.
SQL> select tablespace_name,sum(bytes/1024/1024/1024) "GB" from dba_data_files
where tablespace_name='SYSTEM' group by tablespace_name;
TABLESPACE_NAME GB
--------------- -------------
SYSTEM 8

----End

Exception Handling

If the SYSTEM tablespace size is less than 2 GB, extend the tablespace.
Before extending the tablespace, ensure that the operating system has sufficient available
space.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Add a data file to the SYSTEM tablespace.
SQL> alter tablespace SYSTEM add datafile ‘Path/File name’ size File sizeM;
For example, to add the 8 GB data file /dev/vg_data/rlv_test10 to the system tablespace, run
the following command:
SQL> alter tablespace system add datafile '/dev/vg_data/rlv_test10' size 8192M;
----End

2.5.7 SSTAE007C-Checking the SYSAUX Tablespace Size


Ensure that the SYSAUX tablespace has sufficient space to prevent database running
exceptions or the ORA-600 error.

Reference Standard
The SYSAUX tablespace size is equal to or greater than 5 GB.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 94


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the SYSAUX tablespace size.
SQL> select tablespace_name,sum(bytes/1024/1024/1024) "GB" from dba_data_files
where tablespace_name='SYSAUX' group by tablespace_name;
TABLESPACE_NAME GB
--------------- -------------
SYSAUX 8

----End

Exception Handling

If the SYSAUX tablespace size is less than 5 GB, extend the tablespace.
Before extending the tablespace, ensure that the operating system has sufficient available
space.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Add a data file to the SYSAUX tablespace.
SQL> alter tablespace sysaux add datafile ‘Path/File name’ size File sizeM;
For example, to add the 8 GB data file /dev/vg_data/rlv_test10 to the sysaux tablespace, run
the following command:
SQL> alter tablespace sysaux add datafile '/dev/vg_data/rlv_test10' size 8192M;
----End

2.5.8 SSTAE008C-Checking the UNDO Tablespace Size


Ensure that the UNDO tablespace has sufficient space to prevent database running exceptions
or the ORA-01555 error.

Reference Standard
The UNDO tablespace size is equal to or greater than 6 GB.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 95


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the UNDO tablespace size.
SQL> select tablespace_name, sum(bytes / 1024 / 1024 / 1024) "GB" from dba_data_files
d, v$parameter p where p.name = 'undo_tablespace'and p.VALUE = d.tablespace_name
group by tablespace_name;
TABLESPACE_NAME GB
--------------- -------------
UNDOTBS1 8

----End

Exception Handling

If the UNDO tablespace size is less than 6 GB, extend the tablespace.
Before extending the tablespace, ensure that the operating system has sufficient available
space.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Add a data file to the UNDO tablespace.
SQL> alter tablespace Tablespace name add datafile ‘Path/File name’ size File sizeM;
For example, to add the 8 GB data file /dev/vg_data/rlv_test10 to the undotbs1 tablespace,
run the following command:
SQL> alter tablespace undotbs1 add datafile '/dev/vg_data/rlv_test10' size 8192M;
----End

2.5.9 SSTAE009C-Checking the TEMP Tablespace Size and


Properties
Ensure that the TEMP tablespace has sufficient space and the properties are correct so that
services can properly run.

Reference Standard
 The TEMP tablespace size is equal to or greater than 4 GB.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 96


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

 The temporary tablespace is LOCAL and the segment type is TEMPORARY.


 The user whose does not use temporary time segments by default does not exist.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the TEMP tablespace size.
SQL> select tablespace_name,sum(bytes/1024/1024/1024) "GB" from dba_temp_files
where tablespace_name=(select property_value from database_properties where
property_name='DEFAULT_TEMP_TABLESPACE') group by tablespace_name;
GB
----------------
4

Step 4 Check temporary tablespace properties.


SQL> select a.tablespace_name, a.extent_management, a.contents from dba_tablespaces
a where tablespace_name=(select property_value from database_properties where
property_name='DEFAULT_TEMP_TABLESPACE');
TABLESPACE_NAME EXTENT_MANAGEMENT CONTENTS
---------------- ------------- -----
TEMP LOCAL TEMPORARY

Step 5 Check for users who do not use temporary segments by default.
SQL> select u.username, t.tablespace_name from dba_users u, dba_tablespaces t where
u.temporary_tablespace = t.tablespace_name and t.contents <> 'TEMPORARY';
----End

Exception Handling

Before extending the TEMP tablespace, contact Huawei engineers for guidance.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 If the temporary tablespace is small, add data files to the temporary tablespaces.
For example, to add the 2 GB data file /dev/vg_ora/rlv_temp02 to the TEMP tablespace, run
the following command:
SQL> alter tablespace temp add tempfile '/dev/vg_ora/rlv_temp02' size 2048M;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 97


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 4 If the value of CONTENTS for the TEMP tablespace is not TEMPORARY, create a
temporary tablespace that is managed locally for the system.
For example, create the temporary tablespace TS_TEMP.
SQL> CREATE TEMPORARY TABLESPACE ts_temp TEMPFILE
'/dev/vg_ora/rlv_ts_temp' SIZE 500M autoextend off extent management local
UNIFORM SIZE 1m;
Set TS_TEMP to the default temporary tablespace of the database.
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE ts_temp;
Step 5 If there is a user who uses tablespace that uses permanent segments as the default temporary
tablespace, change the default temporary tablespace to the temporary tablespace managed
locally.
SQL> ALTER USER username TEMPORARY TABLESPACE ts_temp;
----End

2.5.10 SSTAE010A-Checking Tablespace Usage


Ensure that tablespaces have sufficient available space to prevent service interruption.

Reference Standard
 The usage of the SYSTEM and SYSAUX tablespaces is less than 75%.
 The usage of a tablespace except for SYSTEM, SYSAUX, or UNDO tablespace is less
than 85%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check tablespace usage.
SQL> select a.tablespace_name, a.used_space * 8192 / (1024 * 1024) used_space_mb,
a.tablespace_size * 8192 / (1024 * 1024) tablespace_size_mb, round(a.used_percent, 2)
"used%" from dba_tablespace_usage_metrics a where a.tablespace_name not in (select
distinct tablespace_name from dba_undo_extents);
----End

Exception Handling

If the available space in tablespaces is insufficient, extend the tablespaces.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 98


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If you must delete historical service records from tablespaces, contact product personnel or
obtain customer approval before deleting records.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Add a data file to tablespaces whose available space is insufficient.
SQL> alter tablespace Tablespace name add datafile 'Path/File name' size File sizeM;
For example, to add the 8 GB data file /dev/vg_data/rlv_test10 to the test tablespace, run the
following command:
SQL> alter tablespace test add datafile '/dev/vg_data/rlv_test10' size 8192M;
----End

2.5.11 SSTAE011A-Checking the Ratio of the Active Extent in the


UNDO Tablespace
Check the ratio of the active extent in the UNDO tablespace to prevent the ORA-01555 error.

Reference Standard
The UNDO tablespace usage is less than 70%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the ratio of the active extent in the UNDO tablespace.
SQL> select a.tablespace_name, used_undo, total_undo, trunc(used_undo / total_undo *
100, 2) used_rat from (select nvl(sum(bytes / 1024 / 1024), 0) used_undo,
tablespace_name from dba_undo_extents where status = 'ACTIVE' group by
tablespace_name) a, (select tablespace_name, sum(bytes / 1024 / 1024) total_undo from
dba_data_files where tablespace_name in (select value from v$spparameter where name
= 'undo_tablespace' and (sid = (select instance_name from v$instance) or sid = '*'))
group by tablespace_name) b where a.tablespace_name = b.tablespace_name;
TABLESPACE_NAME USED_UNDO TOTAL_UNDO USED_RAT
----------------- ---------- ---------- ------------
UNDOTBS1 9 4000 .22

----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 99


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If the UNDO tablespace usage is equal to or greater than 70%, extend the tablespace.
Before extending the TEMP tablespace, contact Huawei engineers for guidance.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Add a data file to the UNDO tablespace.
For example, to add the 2 GB data file /dev/vg_ora/rlv_undotbs02 to the UNDO tablespace,
run the following command:
SQL> alter tablespace undo add tempfile '/dev/vg_ora/rlv_undotbs02' size 2048M;
----End

2.5.12 SSTAE012A-Checking Whether the SYSTEM Tablespace


Contains Service Objects
Ensure that the SYSTEM tablespace does not contain service objects to prevent service data
from filling up the tablespace. If service data fills up the SYSTEM tablespace, database
exceptions occur.

Reference Standard
The SYSTEM tablespace does not contain service objects.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the SYSTEM tablespace contains service objects.
SQL> select owner, segment_name, segment_type from dba_segments where
tablespace_name = 'SYSTEM' and owner not in ('SYS', 'SYSTEM', 'OUTLN');
no rows selected

The SYSTEM tablespace can store only data of the SYS, SYSTEM, and OUTLN users.
 If no rows selected is displayed, the SYSTEM tablespace does not contain service
objects.
 If information instead of no rows selected is displayed, the SYSTEM tablespace
contains service objects.
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 100


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Exception Handling

If the SYSTEM tablespace contains service objects such as service tables, contact Huawei
engineers and move these objects to other tablespaces under their guidance.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Move service objects from the SYSTEM tablespace to other tablespaces.
For example, to move the test table to the imaptmdb service tablespace, run the following
command:
SQL> alter table Owner.test move tablespace imaptmdb;
In the preceding command, query owner field value of owner Step 3.
----End

2.5.13 SSTAE013A-Checking Tablespace Attributes


Ensure that tablespace attributes are correctly configured so that database performance is not
affected when the database allocates storage space to tables.

Reference Standard
 All tablespaces are managed locally. That is, the value of EXTENT_MANAGEMENT
is LOCAL for all tablespaces.
 The segment space of tablespaces except SYSTEM, UNDO, and TEMP are managed
automatically. That is, the value of segment_space_management is AUTO for
tablespaces except SYSTEM, UNDO, and TEMP.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check tablespace attributes.
SQL> select a.tablespace_name, a.contents, a.extent_management,
a.segment_space_management from dba_tablespaces a where a.contents not in
('UNDO', 'TEMPORARY') and tablespace_name not in ('SYSTEM') order by
a.segment_space_management;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 101


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

TABLESPACE_NAME CONTENTS EXTENT_MANAGEMENT SEGMENT_SPACE_MANAGEMENT


--------------- ------------ ------------------ ------------------------
PERFDB PERMANENT LOCAL AUTO

----End

Exception Handling

If tablespace attributes are incorrectly configured, modify them.


Before modifying tablespace attributes, delete related tablespaces and recreate the
tablespaces, which affects services. Therefore, obtain customer approval and contact Huawei
engineers for confirmation before modification.

Contact Huawei engineers.

2.5.14 SSTAE014A-Checking for Segments That Require


Restructuring
Ensure that segments that require restructuring do not exist to prevent fragments or low
management efficiency.

Reference Standard
Segments that require restructuring do not exist. A segment must be restructured if the number
of extents allocated to the segment is greater than or equal to 4096.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check for segments that require restructuring.
SQL> select a.owner,a.segment_name, a.extents from dba_segments a where extents >
4096;
no rows selected

If no rows selected is displayed, segments that require restructuring do not exist.


----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 102


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If segments that require restructuring exist, resolve this problem.


When resolving this problem, services in segments that require restructuring may encounter
query errors or delay. Therefore, obtain customer approval before resolving this problem.

If the number of extents allocated to a segment is equal to or greater than 4096, this segment
contains fragments or the segment management efficiency is low. In this case, contact Huawei
engineers to create a plan and restructure this segment or adopt the partition table technology
based on the plan.

2.5.15 SSTAE015A-Checking ASM Disk Status


When the database uses the ASM to manage disks, check ASM disk status to prevent ASM
instance running exceptions.

Reference Standard
In the ASM disk status query result, the value of MODE_STATUS is ONLINE and the value
of STATUS is NORMAL.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Set the ASM instance name.
$ export ORACLE_SID=+ASM1
In the preceding command, +ASM1 indicates the ASM instance name. Change the name
based on the site requirements.
Step 3 Connect to the database.
$ sqlplus '/ as sysdba'
Step 4 Check ASM disk status.
SQL> select group_number,mode_status,state,name,path from v$asm_disk where
group_number<>0;
DISK_NUMBER MODE_STATUS STATE NAME PATH
----------- ----------- ------ ----- --------------------
0 ONLINE NORMAL DG_BACKUP_0000 /dev/raw/raw1236
0 ONLINE NORMAL DG_DATA_0000 /dev/raw/raw1234
0 ONLINE NORMAL DG_INDEX_0000 /dev/raw/raw1235
0 ONLINE NORMAL DG_ORA_0000 /dev/raw/raw1233

----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 103


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If ASM disk status does not comply with the reference standard, resolve this problem.

Contact Huawei engineers for guidance.

2.5.16 SSTAE016A-Checking ASM Disk Space


When the database uses the ASM to manage disks, check ASM disk space and ensure that
ASM disks have sufficient available space.

Reference Standard
Available space on each ASM disk is greater than 20% of the total disk space. That is, the
result of Free_MB divided by Total_MB is greater than 20%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Set the ASM instance name.
$ export ORACLE_SID=+ASM1
In the preceding command, +ASM1 indicates the ASM instance name. Change the name
based on the site requirements.
Step 3 Access asmcmd.
$ asmcmd
Step 4 Check ASM disk space.
ASMCMD> lsdg;
For example, the following information is displayed:
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB
Usable_file_MB Offline_disks Name
MOUNTED EXTERN N 512 4096 1048576 61440 57198 0
57198 0 DG_BACKUP/
MOUNTED EXTERN N 512 4096 1048576 133120 18953 0
18953 0 DG_DATA/
MOUNTED EXTERN N 512 4096 1048576 112640 14478 0
14478 0 DG_INDEX/
MOUNTED EXTERN N 512 4096 1048576 101426 14508 0
14508 0 DG_ORA/

The result of Free_MB divided by Total_MB must be greater than 20%. Otherwise, increase
the ASM disk space.
----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 104


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If ASM disks have insufficient available space, resolve this problem.

Send the ASM disk space query result to Huawei engineers so that Huawei engineers can
create a plan. Resolve this problem based on the plan.

2.6 Preventive Maintenance Items for Performance


Monitoring
2.6.1 SSTAF001A-Checking Wait Events
Check wait events to ensure high database performance.

Reference Standard
In the command output in , the EVENT column does not contain the following wait events
within 15 minutes:
 read by other session, buffer busy waits
 control file parallel write
 enqueue
 latch free
 log file sync
 log file switch (checkpoint incomplete)
 log file switch (archiving needed)
 global cache busy, gc current block busy, gc cr block busy
 log buffer space
 log file parallel write
 cursor: mutex S
 cursor: mutex X
 cursor: pin S
 cursor: pin S wait on X
 cursor: pin X
 DFS lock handle
 library cache lock
 library cache pin
 row cache lock

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 105


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

$ sqlplus '/ as sysdba'


Step 3 Check wait events.
SQL> select * from (select a.event, count(*) from v$active_session_history a where
a.sample_time > sysdate - 15 / (24 * 60) and a.sample_time < sysdate and a.session_state
= 'WAITING' and a.wait_class not in ('Idle') group by a.event order by 2 desc, 1) where
rownum <= 5;
EVENT COUNT(*)
------------------------- ---------
log file parallel write 134
log file sync 116
rdbms ipc reply 19
null event 15
control file parallel write 10

----End

Exception Handling

If wait events mentioned in the reference standard are found, resolve this problem.

Contact Huawei engineers for guidance.

2.6.2 SSTAF002A-Checking the Database SCN


Ensure that the database SCN does not increase to a specified threshold. If the database SCN
increases to the threshold when in some states, transactions processed by applications are
rolled back and report errors, affecting services. This problem has been resolved by CPU or
PSU patch sets released in January 2012.

Reference Standard
The number formed by the first two digits in the decimal part of the INDICATOR value is
greater than 62.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the database SCN.
SQL> select version,date_time,dbms_flashback.get_system_change_number
current_scn,indicator from(select version,to_char(SYSDATE,'YYYY/MM/DD
HH24:MI:SS') DATE_TIME,((((((to_number(to_char(sysdate,'YYYY'))-
1988)*12*31*24*60*60) + ((to_number(to_char(sysdate,'MM'))-1)*31*24*60*60) +

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 106


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

(((to_number(to_char(sysdate,'DD'))-1))*24*60*60) +
(to_number(to_char(sysdate,'HH24'))*60*60) + (to_number(to_char(sysdate,'MI'))*60)
+ (to_number(to_char(sysdate,'SS')))) * (16*1024)) -
dbms_flashback.get_system_change_number) / (16*1024*60*60*24)) indicator from
v$instance);
VERSION DATE_TIME CURRENT_SCN INDICATOR
---------- ------------------- ----------- ----------------
11.1.0.7.0 2012/09/27 15:29:21 3908468 9202.6426209033

----End

Exception Handling

If the number formed by the first two digits in the decimal part of the INDICATOR value is
less than or equal to 62, resolve this problem.

Contact Huawei engineers for guidance.

2.6.3 SSTAF003B-Checking for Lock Wait Events and Library


Latch Wait Events
If lock wait events or library latch wait events occur in the database, concurrency performance
deteriorates and the database may be hung. When the database is slow in responding or a large
number of processes are running, ensure that no lock wait event or library latch wait event
occurs.

Reference Standard
No lock wait event or library latch wait event occurs.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check for lock wait events and library latch wait events.
1. Check for lock wait events.
SQL> select 'session ' || c.locker ||' lock session ' || c.locked ||', alter system kill
session ' ||'''' || c.locker || ',' ||d.serial# || '''' as "result" from ( select a.sid locked,b.sid
locker from v$lock a, v$lock b where a.request > 0 and a.id1 = b.id1 and a.id2 =
b.ID2 and a.type = b.type and a.addr <> b.addr) c,v$session d where c.locker =
d.sid;
If no information is displayed, no lock wait event occurs.
2. Check for library latch wait events.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 107


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SQL> select 'session ' || d.locker ||' lock session ' || d.locked ||', alter system kill
session ' ||'''' || d.locker || ',' ||d.serial# || '''' as "result" from ( select
a.locker,a.serial#,a.locked,row_number() over( partition by a.locker, a.locked order
by a.locker ) as rn from ( select s.sid locker, s.serial#,w.sid locked from dba_kgllock
k, v$session s,v$session_wait w where w.event like 'library cache%' and k.kgllkhdl
= w.p1raw and k.kgllkuse = s.saddr and s.sid <> w.sid) a) d where d.rn = 1;
If no information is displayed, no library latch wait event occurs.
----End

Exception Handling

Services may be affected if you forcibly stop sessions related to lock wait events or library
latch wait events. Therefore, contact Huawei engineers for confirmation and perform
troubleshooting.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Stop sessions related to lock wait events or library latch wait events.
SQL> alter system kill session '120, 569';
In the preceding command, 120 indicates a session ID and 569 indicates the value of serial#.
----End

2.6.4 SSTAF004B-Checking the Row Cache Hit Ratio


Check the row cache hit ratio to prevent data from filling up the shared pool.

Reference Standard
The row cache hit ratio is greater than 95%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the row cache hit ratio.
SQL> select sum(a.value)/count(*) pct from v$metric_history a where a.metric_name =
'Row Cache Hit Ratio' and group_id = 2 and a.begin_time >= sysdate - 1 and a.end_time
< sysdate;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 108


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

PCT
-------------------
99.4112278722774

The command output indicates that the row cache hit ratio is 99.4112278722774%.
----End

Exception Handling

If the row cache hit ratio is less than or equal to 95%, resolve this problem.

To increase the shared pool memory, contact Huawei engineers.

2.6.5 SSTAF005B-Checking the Library Cache Hit Ratio


Check the library cache hit ratio to prevent SQL statement hardcoding that slows down
service responding.

Reference Standard
The library cache hit ratio is greater than 99%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the library cache hit ratio.
SQL> select sum(a.value)/count(*) pct from v$metric_history a where a.metric_name =
'Library Cache Hit Ratio' and group_id = 2 and a.begin_time >= sysdate - 1 and
a.end_time < sysdate;
PCT
-------------
99.4112278722774

The command output indicates that the library cache hit ratio is 99.4112278722774%.
----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 109


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If the library cache hit ratio is less than or equal to 99%, resolve this problem.

 Bind SQL statements to variables.


 Increase the shared pool space.
Contact Huawei engineers for guidance.

2.6.6 SSTAF006B-Checking the Soft Parse Ratio


Check the soft parse ratio to prevent inappropriate SQL statement coding.

Reference Standard
The soft parse ratio is greater than 99%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the soft parse ratio.
SQL> select sum(a.value)/count(*) pct from v$metric_history a where a.metric_name =
'Soft Parse Ratio' and group_id = 2 and a.begin_time >= sysdate - 1 and a.end_time <
sysdate;
PCT
-------------
100

The command output indicates that the soft parse ratio is 100%.
----End

Exception Handling

If the soft parse ratio is less than or equal to 99%, resolve this problem.

 Bind SQL statements to variables.


 Fix large packages that are frequently used.
 Increase the shared pool space.
Contact Huawei engineers for guidance.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 110


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.6.7 SSTAF007B-Checking the Ratio of Available Space in the


Shared Pool
Ensure that the shared pool has sufficient available space to prevent faults such as system
crash and SQL statement execution failures.

Reference Standard
The ratio of available space in the shared pool is greater than 5%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the ratio of available space in the shared pool.
SQL> select freesize freesize_MB, totalsize totalsize_MB,
round((freesize/totalsize)*100,2) " FREE%" from (select ceil(sum(bytes) / (1024 * 1024))
totalsize from v$sgastat where pool = 'shared pool' ), (select ceil(bytes / (1024 * 1024))
freesize from v$sgastat where name = 'free memory' and pool = 'shared pool');
FREESIZE_MB TOTALSIZE_MB FREE%
----------- ------------ ----------
217 337 64.39

In the command output, the value 64.39%(FREESIZE_MB/TOTALSIZE_MB*100=FREE%)


in the FREE% column indicates the ratio of available space in the shared pool.
----End

Exception Handling

If the ratio of available space in the shared pool is less than or equal to 5%, resolve this
problem.

 Bind SQL statements to variables.


 Increase the shared pool space.
 Check whether the ORA-04031 error is reported. If this error is reported, resolve it.
Contact Huawei engineers for guidance.

2.6.8 SSTAF008B-Checking the Global Cache Performance


Check the global cache performance to prevent network exceptions.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 111


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
The AVG BLOCK RECEIVE TIME duration is shorter than or equal to 15 milliseconds.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the global cache performance.
SQL> select b1.inst_id, b2.value "GCS CR BLOCKS RECEIVED", b1.value "GCS CR
BLOCK RECEIVE TIME", ((b1.value / decode(b2.value, 0, 0.0000001, b2.value)) * 10)
"AVG CR BLOCK RECEIVE TIME(ms)", b4.value "GCS CUR BLOCKS
RECEIVED", b3.value "GCS CUR BLOCK RECEIVE TIME", ((b3.value /
decode(b4.value, 0, 0.0000001, b4.value)) * 10) "AVG CUR BLOCK RECEIVE
TIME(ms)" from gv$sysstat b1, gv$sysstat b2, gv$sysstat b3, gv$sysstat b4 where
b1.name = 'gc cr block receive time' and b2.name = 'gc cr blocks received' and b1.inst_id
= b2.inst_id and b3.inst_id = b4.inst_id and b2.inst_id = b3.inst_id and b3.name = 'gc
current block receive time' and b4.name = 'gc current blocks received';
INST_ID GCS CR BLOCKS RECEIVED GCS CR BLOCK RECEIVE TIME AVG CR BLOCK RECEIVE
TIME(ms) GCS CUR BLOCKS RECEIVED GCS CUR BLOCK RECEIVE TIME AVG CUR BLOCK RECEIVE
TIME(ms)
1 1 0 0 0 0 0 0

----End

Exception Handling

If the AVG BLOCK RECEIVE TIME duration is longer than 15 milliseconds, resolve this
problem.

Check whether network bottlenecks exist and eliminate them if network bottlenecks are
found. Verify database parameter settings and operating system TCP and UDP configurations.
Contact Huawei engineers for guidance.

2.6.9 SSTAF009B-Checking the Global Cache Lock Performance


Check the global cache lock performance to ensure high database performance.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 112


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
The AVG GLOBAL LOCK GET TIME duration is shorter than or equal to 30 milliseconds.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the global cache lock performance.
SQL> select b1.inst_id, (b1.value + b2.value) "GLOBAL LOCK GETS", b3.value
"GLOBAL LOCK GET TIME", (b3.value / decode((b1.value + b2.value),0,0.0000001,
(b1.value + b2.value)) * 10) "AVG GLOBAL LOCK GET TIME (ms)" from gv$sysstat
b1, gv$sysstat b2, gv$sysstat b3 where b1.name = 'global lock sync gets' and b2.name =
'global lock async gets' and b3.name = 'global lock get time' and b1.inst_id = b2.inst_id
and b2.inst_id = b3.inst_id or b1.name = 'global enqueue gets sync' and b2.name =
'global enqueue gets async' and b3.name = 'global enqueue get time' and b1.inst_id =
b2.inst_id and b2.inst_id = b3.inst_id;
INST_ID GLOBAL LOCK GETS GLOBAL LOCK GET TIME AVG GLOBAL LOCK GET TIME (ms)
1 1 0 0 0

----End

Exception Handling

If the AVG GLOBAL LOCK GET TIME duration is longer than 30 milliseconds, resolve
this problem.

Contact Huawei engineers for guidance.

2.6.10 SSTAF010B-Checking Whether SQL Statements Are Bound


to Variables
Ensure that SQL statements are bound to variables to prevent slow database responding or
high memory usage.

Reference Standard
Service SQL statements are bound to variables. BI or datastore applications determine
whether to bind to variables based on the site requirements.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 113


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SQL statements of the Oracle database do not need to be bound to variables.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether SQL statements are bound to variables.
SQL> select substr(sql_text, 1, 40) "SQL", count(*), sum(executions) "TotExecs" from
v$sqlarea where executions < 5 group by substr(sql_text, 1, 40) having count(*) > 30
order by 2 desc;
If no information is displayed, SQL statements are bound to variables. If information similar
to the following is displayed, some SQL statements are not bound to variables:
SQL COUNT(*) TotExecs
--------------------------------------- ------ ------
SELECT t10.CONDITIONID, t10.ALARMID, t10 1517 4551
SELECT t13.mocname FROM FDN2MOC t13 WHER 640 1940
select Class from imap_db.INMSNEMO a wh 215 627
select fdn, devID, NEIdentityString, XML 203 640
insert into imap_db.EAMDataChangeInfo (f 144 290

----End

Exception Handling

If some SQL statements are not bound to variables resolve this problem.

Contact Huawei engineers to bind SQL statements to variables.

2.6.11 SSTAF011A-Checking CPU Usage


Check the CPU usage to prevent abnormal occupation of system resources and inappropriate
service design.

Reference Standard
The values related to the CPU are as follows:
 The average of all the values in the id column is equal to or greater than 30.
 The average of all the values in the wa column is less than or equal to 20. Skip this for
HP-UX because it does not contain information about this column.
 The average of all the values in the sy column is less than or equal to 15.
 The average of all the values in the us column is less than or equal to 70.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 114


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Precaution
Perform this check on both the active and standby node for the Oracle HA environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check CPU usage.
$ vmstat 2 10
 For HP-UX, information similar to the following is displayed:
procs memory page
faults cpu
r b w avm free re at pi po fr de sr in
sy cs us sy id
1 0 0 908460 1172446 450 7 0 0 0 0 0
1352 4359 209 1 1 99
1 0 0 891940 1172367 355 4 0 0 0 0 0
1377 2646 207 5 0 95
1 0 0 891940 1172367 493 5 0 0 0 0 0
1373 2451 208 1 0 99
1 0 0 891940 1172366 315 3 0 0 0 0 0
1369 1910 200 1 1 98
1 0 0 891940 1172366 414 4 0 0 0 0 0
1367 2020 215 0 0 100
1 0 0 891940 1172367 531 5 0 0 0 0 0
1368 2058 214 0 1 98
1 0 0 892397 1172366 340 3 0 0 0 0 0
1367 1618 204 0 0 99
1 0 0 892397 1172366 430 4 0 0 0 0 0
1374 1790 203 0 0 100
1 0 0 892397 1172366 542 5 0 0 0 0 0
1361 1973 207 1 0 99
1 0 0 892397 1172366 346 3 0 0 0 0 0
1353 1548 199 1 1 98

 For AIX, information similar to the following is displayed:


System configuration: lcpu=2 mem=8704MB ent=0.40

kthr memory page faults cpu


----- ----------- ------------------------ ------------ -----------------------

r b avm fre re pi po fr sr cy in sy cs us sy id wa pc ec

1 0 564944 1167095 0 0 0 0 0 0 14 812 343 1 1 98 0 0.01


2.5
2 0 564944 1167095 0 0 0 0 0 0 9 169 335 0 1 99 0 0.01
1.7
3 0 564944 1167095 0 0 0 0 0 0 17 333 330 1 1 99 0 0.01
2.0
3 0 564944 1167095 0 0 0 0 0 0 13 333 337 0 1 99 0 0.01
1.9
2 0 564944 1167095 0 0 0 0 0 0 32 584 355 1 1 98 0 0.01
3.1

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 115


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2 0 564944 1167095 0 0 0 0 0 0 16 223 334 1 1 98 0 0.01


2.4
2 0 564944 1167095 0 0 0 0 0 0 13 484 337 1 2 97 0 0.01
3.3
2 0 564944 1167095 0 0 0 0 0 0 14 481 319 1 1 98 0 0.01
2.5
2 0 564945 1167094 0 0 0 0 0 0 12 707 338 1 1 98 0 0.01
2.4
2 0 564944 1167095 0 0 0 0 0 0 10 356 336 1 1 99 0 0.01
2.0

 For SuSE Linux, information similar to the following is displayed:


procs -----------memory---------- ---swap-- -----io---- -system--
-----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa
st
3 0 0 14259920 281252 8826828 0 0 8 21 7 3 8 10 81
0 0
0 0 0 14258936 281252 8826828 0 0 41 29 849 10108 4 11 85
0 0
6 0 0 14248476 281252 8826828 0 0 41 25 835 12079 13 15 72
0 0
0 0 0 14259236 281252 8826828 0 0 25 511 854 10751 4 12 81
4 0
1 0 0 14259308 281252 8826828 0 0 97 29 1284 8835 10 7 83
0 0
1 0 0 14259176 281252 8826828 0 0 41 303 891 9891 4 9 86
1 0
4 0 0 14258156 281252 8826828 0 0 33 5 854 15572 14 21 65
0 0
7 0 0 14252228 281252 8826828 0 0 33 29 823 8799 8 9 84
0 0
1 0 0 14259016 281252 8826828 0 0 33 457 818 9884 7 12 80
1 0
1 0 0 14261004 281252 8826828 0 0 97 5 1046 8192 11 7 82
0 0

----End

Exception Handling

If some values in the CPU SAR report do not comply with the reference standard, resolve this
problem.

Contact Huawei engineers for guidance.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 116


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.6.12 SSTAF012A-Checking I/O Distribution and Performance of


Data Files
Check I/O distribution and performance of data files to prevent storage I/O errors or
inappropriate database plans.

Reference Standard
The average physical read duration for the online transaction processing (OLTP) system is
shorter than 20 milliseconds. That is, the values are less than 20 in the avreads(ms) column.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check I/O distribution and performance of data files.
SQL> select ts#, file#, name, "avreads(ms)", phyreads, "avwrites(ms)", phywrites from
(select b.ts#,b.file#,b.name,ceil(a.value * 10) as "avreads(ms)",c.value
phyreads,ceil(d.value * 10) as "avwrites(ms)",e.value phywrites from v$metric a,
v$datafile b, v$metric c, v$metric d, v$metric e where a.entity_id = b.file# and
a.metric_id = 7000 and c.metric_id = 7002 and d.metric_id = 7001 and e.metric_id =
7003 and c.entity_id = a.entity_id and d.entity_id = a.entity_id and e.entity_id =
a.entity_id) order by ts#,file#;
TS# FILE# NAME avreads(ms) PHYREADS avwrites(ms) PHYWRITES
0 1 /opt/oracle/oradb/oradata/inomc/system01.dbf 6 27 1 146
1 2 /opt/oracle/oradb/oradata/inomc/sysaux01.dbf 0 2 0 7
2 3 /opt/oracle/oradb/oradata/inomc/undotbs01.dbf 0 0 2 41
4 4 /opt/oracle/oradb/oradata/inomc/users01.dbf 0 0 0 0
6 5 /opt/oracle/oradb/data/imap_db.dbf 1 70 0 1
7 6 /opt/oracle/oradb/data/imaplogdb.dbf 1 394 0 7
8 7 /opt/oracle/oradb/data/imapsmdb.dbf 0 8 0 0
9 8 /opt/oracle/oradb/data/imaptmdb.dbf 0 68 0 0
10 9 /opt/oracle/oradb/data/alarmdb.dbf 1 1656 0 0
11 10 /opt/oracle/oradb/data/perfdb.dbf 1 12305 1 119
12 11 /opt/oracle/oradb/data/nmsguest.dbf 0 0 0 0
13 12 /opt/oracle/oradb/data/perfdb_idx.dbf 1 165 0 57
14 13 /opt/oracle/oradb/oradata/inomc/icnfgspace.dbf 1 9240 0 3

----End

Exception Handling

Adjusting data files requires stopping services. Therefore, obtain customer approval before
adjusting data files.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 117


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Contact Huawei engineers for guidance.

2.6.13 SSTAF013A-Checking the Database Memory Sorting Ratio


Online transaction processing (OLTP) database sorting operations must be performed in the
memory in desired state. If the sorting ratio decreases, the database design or database
performance needs to be adjusted.

Reference Standard
The database memory sorting ratio must be greater than 98%.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Log in to the database.
$ sqlplus / as sysdba
Step 3 Check the memory sorting ratio.
SQL> select sum(a.value)/count(*) pct from v$metric_history a where a.metric_name =
'Memory Sorts Ratio' and group_id = 2 and a.begin_time >= sysdate - 1 and a.end_time
< sysdate;
PCT
----------
100

The returned result shows that the database memory sorting ratio is 100%.
----End

Exception Handling

If the check result is different from the expected result, database performance deteriorates,
affecting service running efficiency. Therefore, you must resolve this problem.

Database optimization involves SQL statement or system configuration adjustment. You are
advised to contact Huawei engineers for troubleshooting.
The following aspects can be taken into consideration of database optimization:
 Whether a lot of sorted SQL statements exist
 Whether program global area (PGA) configuration is proper

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 118


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.7 Preventive Maintenance Items for Backup and Disaster


Recovery
2.7.1 SSTAG001A-Checking Whether the Real Time Apply
Function Is Enabled in the RM Database
Ensure that the real time apply function is enabled in the RM database so that the DataGuard
runs properly.

Reference Standard
The real time apply function is enabled. That is, the value is MANAGED REAL TIME
APPLY for RECOVERY_MODE in the command output in .

Precaution
Perform this check only in the Oracle DataGuard environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the real time apply function is enabled.
SQL> select recovery_mode from v$archive_Dest_status where
recovery_mode='MANAGED REAL TIME APPLY';
RECOVERY_MODE
----------------
MANAGED REAL TIME APPLY

----End

Exception Handling

If the value is not MANAGED REAL TIME APPLY for RECOVERY_MODE in the
command output in , resolve this problem.

Step 1 Log in to the operating system as the oracle user.


Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the redo apply function is enabled.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 119


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

SQL> select RECOVERY_MODE from v$archive_Dest_status;


RECOVERY_MODE
-----------------------
MANAGED
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
11 rows selected.

 If MANAGED exists in the RECOVERY_MODE column in the command output, the


redo apply function is enabled. Then go to Step 4.
 If MANAGED does not exist in the RECOVERY_MODE column in the command
output, the redo apply function is disabled. Then go to Step 5.
Step 4 Disable the redo apply function.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Step 5 Enable the real time apply function.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING
CURRENT LOGFILE DISCONNECT FROM SESSION;
Step 6 Verify that the real time apply function is enabled.
SQL> select RECOVERY_MODE from v$archive_Dest_status;
RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE
IDLE

 If the value of RECOVERY_MODE is MANAGED REAL TIME APPLY, the real


time apply function is enabled.
 If the value of RECOVERY_MODE is not MANAGED REAL TIME APPLY, the
real time apply function is disabled. Then collect error information and related logs, such
as logs in $ORACLE_HOME/network/log, and submit collected information to Huawei
engineers.
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 120


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

2.7.2 SSTAG002A-Checking the Status of the LNS Process in the


PM Database
Check the status of the LNS process in the PM database to ensure that the DataGuard runs
properly.

Reference Standard
The LNS process is in the WRITING state.

Precaution
Perform this check only in the Oracle DataGuard environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Switch to online redo log.
SQL> alter system switch logfile;
Step 4 Check the status of the LNS process in the PM database.
SQL> set lin 1000
SQL> select process, status, thread#, sequence#, block# from v$managed_standby where
process='LNS';
PROCESS STATUS THREAD# SEQUENCE# BLOCK#
--------- ------------ ---------- ---------- ----------
LNS WRITING 1 16 126501

----End

Exception Handling

If the LNS process is not in the WRITING state, resolve this problem.

Contact Huawei engineers for guidance.

2.7.3 SSTAG003A-Checking the Status of the MRP0 Process in the


RM Database
Check the status of the MRP0 process in the RM database to ensure that the DataGuard runs
properly.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 121


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Reference Standard
The MRP0 process is in the APPLYING_LOG state.

Precaution
Perform this check only in the Oracle DataGuard environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check the status of the MRPO process in the RM database.
SQL> set lin 1000
SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK# FROM V
$MANAGED_STANDBY where PROCESS='MRP0';
PROCESS STATUS THREAD# SEQUENCE# BLOCK#
--------- ------------ ---------- ---------- ----------
MRP0 APPLYING_LOG 1 40 121420
RFS IDLE 1 40 121421
RFS IDLE 0 0 0
RFS IDLE 0 0 0

----End

Exception Handling

If the MRP0 process is not in the APPLYING_LOG state, resolve this problem.

Contact Huawei engineers for guidance.

2.7.4 SSTAG004A-Checking the RLink Status


Check the RLink status to ensure that the DataGuard runs properly.

Reference Standard
The RLink is in the VALID state.

Precaution
Perform this check only in the Oracle DataGuard environment.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 122


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Automatic Preventive MaintenanceAutomatic Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check whether the status of the RLink between the PM and RM.
SQL> COLUMN dest_name FORMAT A18;
SQL> column status FORMAT A18;
SQL> select dest_name,status from v$archive_dest_status where dest_id=2;
DEST_NAME STATUS
------------------ ------------------
LOG_ARCHIVE_DEST_2 VALID

----End

Exception Handling

If the RLink is not in the VALID state, resolve this problem.

Contact Huawei engineers for guidance.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 123


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

3 Manual Preventive Maintenance

About This Chapter


3.1 Preventive Maintenance Items for Performance Monitoring
3.2 Preventive Maintenance Items for Log Management
3.3 Preventive Maintenance Items for Backup and Disaster Recovery

3.1 Preventive Maintenance Items for Performance


Monitoring
3.1.1 SSTAF014A-Checking Whether Service User Statistics Are
Correctly Collected
You can check service user statistics collection status so that the plan is correctly executed.

Reference Standard
Service user statistics are correctly collected.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Log in to the database.
$ sqlplus / as sysdba
Step 3 Check whether service user statistics are correctly collected.
SQL> set serveroutput on size 1000000;
SQL> declare
obj_list dbms_stats.objecttab;

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 124


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

str_list varchar2(1000);
str_username varchar2(200) := upper('TEST');TEST is a service user name example.
Use the actual service user name.
begin
dbms_stats.gather_schema_stats( ownname => str_username,
options => 'list empty',
objlist => obj_list,
force => true
);
dbms_output.enable(buffer_size => 999999);
dbms_output.put_line('Return the list of objects belong current user');
for i in 1 .. obj_list.count
loop
if ( obj_list(i).objtype = 'TABLE' ) then
str_list := 'ownname = ' || obj_list(i).ownname || ', '
|| 'objtype = ' || obj_list(i).objtype || ', '
|| 'objname = ' || obj_list(i).objname || ', '
|| 'partname = ' || obj_list(i).partname || ', '
|| 'subpartname = ' || obj_list(i).subpartname;
else
str_list := 'ownname = ' || obj_list(i).ownname || ', '
|| 'objtype = ' || obj_list(i).objtype || ', '
|| 'objname = ' || obj_list(i).objname;
end if;
dbms_output.put_line(str_list);
if (mod(i, 50) = 0) then
dbms_output.enable(buffer_size => 999999);
end if;
end loop;
for item in ( select owner,
table_name,
column_name,
rownum i
from dba_tab_columns

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 125


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

where last_analyzed is null


and owner = str_username
order by table_name, column_name
)
loop
str_list := 'ownname = ' || item.owner || ', '
|| 'objtype = ' || 'COLUMN' || ', '
|| 'objname = ' || item.table_name || ', '
|| 'colname = ' || item.column_name;
dbms_output.put_line(str_list);
if (mod(item.i, 50) = 0) then
dbms_output.enable(buffer_size => 999999);
end if;
end loop;
end;
/
TEST is a service user name example. Use the actual user name. Multiple users are separated
with a comma (,).
If the command output is blank, service user statistics are correctly collected.
----End

Exception Handling

If the check result is different from the expected result, you must resolve this problem.

Contact Huawei engineers for guidance to correctly collect service user statistics and use the
following methods to collect statistics:
Step 1 Log in to the operating system as the oracle user.
Step 2 Log in to the database.
$ sqlplus / as sysdba
Step 3 Collect table statistics.
SQL> exec DBMS_STATS.GATHER_TABLE_STATS
(ownname=>'TEST',tabname=>'table_name');
----End

3.2 Preventive Maintenance Items for Log Management


Issue 01 (2013-06-30) Huawei Proprietary and Confidential 126
Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

3.2.1 SSTAH001A-Checking Alarm Logs for Oracle Database


Instances
Check alarm logs for Oracle database instances to prevent fatal errors in the database.

Reference Standard
Alarm logs for Oracle database instances do not contain ORA-.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access the directory for storing alarm logs.
$ cd $ORACLE_BASE/diag/rdbms/<db_name>/$ORACLE_SID/trace
Step 3 Check the alarm log file alert_$ORACLE_SID.log.
$ grep "ORA-" alert*
If no information is displayed, alarm logs do not contain ORA-.
----End

Exception Handling

If alarm logs for Oracle database instances contain ORA-, resolve this problem.

Contact Huawei engineers for guidance.

3.2.2 SSTAH002B-Checking Connection Logs for Oracle Database


Instances
Check connection logs for Oracle database instances to prevent database access faults for
services.

Reference Standard
Connection logs for Oracle database instances do not contain TNS-.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access the directory for storing connection logs.
$ cd $ORACLE_BASE/diag/tnslsnr/<hostname>/<listener_name>/trace
In the preceding command, hostname indicates the host name.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 127


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 3 Check the connection log file <listener_name>.log


$ grep "TNS-" listener*
By default, this command checks logs generated over the last 30 days. If no information is
displayed, connection logs do not contain TNS-.
----End

Exception Handling

If connection logs for Oracle database instances contain TNS-, resolve this problem.

Contact Huawei engineers for guidance.

3.2.3 SSTAH003B-Checking Cluster Synchronization Service Logs


for Oracle Database Instances
Check cluster synchronization service logs for Oracle database instances to prevent faults of
synchronization between database instances.

Reference Standard
Cluster synchronization service logs for Oracle database instances do not contain ERROR or
WARNING.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access the directory for storing cluster synchronization service logs.
$ cd $ORA_CRS_HOME/log/<hostname>/cssd
In the preceding command, host_name indicates the host name.
Step 3 Check the cluster synchronization service log file ocssd.log.
$ egrep "ERROR|WARNING" ocssd*
By default, this command checks logs generated over the last 30 days. If no information is
displayed, cluster synchronization service logs do not contain ERROR or WARNING.
----End

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 128


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Exception Handling

If cluster synchronization service logs for the Oracle database instance contain ERROR or
WARNING, resolve this problem.

Contact Huawei engineers for guidance.

3.2.4 SSTAH004B-Checking CRS Alarm Logs


Check CRS alarm logs to prevent CRS instance running exceptions.

Reference Standard
CRS alarm logs do not contain ERROR or records about abnormal restart.

In normal cases, when the CRS restarts, the message "voting file is online" is displayed on the
command-line interface.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check CRS alarm logs.
$ grep "ERROR" $ORA_CRS_HOME/log/<hostname>/alert<hostname>.log
In the preceding command, host_name indicates the host name. By default, this command
checks logs generated over the last 30 days.
If no information is displayed, CRS alarm logs do not contain ERROR or records about
abnormal restart.
----End

Exception Handling

If CRS alarm logs contain ERROR or records about abnormal restart, resolve this problem.

Contact Huawei engineers for guidance.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 129


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

3.2.5 SSTAH005B-Checking CRS Directories racg, crsd, and evmd


Check CRS directories racg, crsd, and evmd to prevent CRS instance running exceptions.

Reference Standard
CRS directories racg, crsd, and evmd do not contain ERROR. That is, these directories do
not contain severe error information.

Precaution
Perform this check only in the Oracle RAC environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check CRS directories racg, crsd, and evmd.
$ grep "ERROR" $ORA_CRS_HOME/log/<hostname>/racg/*
$ grep "ERROR" $ORA_CRS_HOME/log/<hostname>/crsd/*
$ grep "ERROR" $ORA_CRS_HOME/log/<hostname>/evmd/*
In the preceding command, host_name indicates the host name.
If no information is displayed, racg, crsd, and evmd do not contain ERROR.
----End

Exception Handling

If CRS directories racg, crsd, and evmd contain ERROR, resolve this problem.

Contact Huawei engineers for guidance.

3.2.6 SSTAH006A-Checking ASM Background Logs


When the database uses the ASM to manage disks, check ASM background logs to prevent
ASM instance running exceptions.

Reference Standard
ASM background logs do not contain ORA- or Error.

Procedure
Step 1 Log in to the operating system as the oracle user.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 130


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

Step 2 Set the ASM instance name.


$ export ORACLE_SID=+ASM1
In the preceding command, +ASM1 indicates the ASM instance name. Change the name
based on the site requirements. By default, this command checks logs generated over the last
30 days.
Step 3 Check ASM background logs.
$ egrep "ORA-|Error" $ORACLE_BASE/diag/asm/
+asm/<ASM_SID>/trace/alert_<ASM_SID>.log
If no information is displayed, ASM background logs do not contain ORA- or Error.
----End

Exception Handling

If ASM background logs contain ORA- or Error, resolve this problem.

Send ASM background logs to Huawei engineers for troubleshooting.

3.3 Preventive Maintenance Items for Backup and Disaster


Recovery
3.3.1 SSTAG005A-Checking Database Backup Sets
Check database backup sets to ensure that the database can be restored using backup files
when data files are damaged or other cases occur.

Reference Standard
Backup files generated over the last day exist whether the database is in nonarchive mode or
in archive mode.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Check backup sets of the database in nonarchive mode and in archive mode.
 Check backup sets that are backed up using EXP when the database is in nonarchive
mode.
$ ls -a /opt/orabak
-rw-r--r-- 1 oracle oinstall 392060928 2012-09-27 16:28 orcl.dmp

The command output indicates that backup files generated over the last day exist.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 131


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

 Check backup sets that are backed up using RMAN when the database is in archive
mode.
$ rman target/
RMAN> list backup of database
RMAN> list backup of database;
List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time


------- ---- -- ---------- ----------- ------------ ---------------
1 Full 117.72M DISK 00:00:44 26-SEP-12
BP Key: 1 Status: AVAILABLE Compressed: YES Tag: TAG20120926T160025

Piece Name:
/oracle/app/flash_recovery_area/TEST/backupset/2012_09_26/o1_mf_nnndf_TAG201209
26T160025_865fjt2n_.bkp

If the value of Completion Time is 26-SEP-12 in the command output, backup files
generated over the last day exist.
----End

Exception Handling

If backup files generated over the last day do not exist, resolve this problem.

Back up files using service tools or scripts.

3.3.2 SSTAG006A-Checking RM Alarm Logs in the DataGuard


Environment
Check the alarm logs of the RM in the DataGuard environment to ensure that the RM runs
properly.

Reference Standard
RM alarm logs do not contain ORA- or information about damaged blocks.

Precaution
Perform this check only in the Oracle DataGuard environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Access the directory for storing RM alarm logs.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 132


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

$ cd $ORACLE_BASE/diag/rdbms/<db_name>/$ORACLE_SID/trace
Step 3 Check the alarm log file alert_$ORACLE_SID.log.
$ egrep "ORA-01578|ORA-08103|ORA-01499|kdsgrp1" alert*
If no information is displayed, RM alarm logs do not contain ORA- or information about
damaged blocks.
----End

Exception Handling

If RM alarm logs contain ORA- and information about damaged blocks, resolve this problem.

Contact Huawei engineers for guidance.

3.3.3 SSTAG007A-Checking PM Archive Log Transmission in the


DataGuard Environment
Ensure that archive logs on the PM are transmitted to the RM so that the DataGuard runs
properly.

Reference Standard
Archive logs that are generated over the last seven days are transmitted to the RM.

Precaution
Perform this check only in the Oracle DataGuard environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check PM archive log transmission.
SQL> SELECT DESTINATION, STATUS, ARCHIVED_THREAD#,
ARCHIVED_SEQ# FROM V$ARCHIVE_DEST_STATUS WHERE STATUS <>
'DEFERRED' AND STATUS <> 'INACTIVE';
For example, the following information is displayed:
DESTINATION STATUS ARCHIVED_THREAD# ARCHIVED_SEQ#
------------------ ------ ---------------- -------------
/private1/prmy/lad VALID 1 947
standby1 VALID 1 947

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 133


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

The command output indicates that archive logs that are generated over the last seven days are
transmitted to the RM.
----End

Exception Handling

If log transmission does not comply with the reference standard, resolve this problem.

Contact Huawei engineers for guidance.

3.3.4 SSTAG008A-Checking RM Log Application on the


DataGuard Network
Check RM archive log application so that the DataGuard runs properly.

Reference Standard
All values in the APPLIED column are YES in the command output in .

Precaution
Perform this check only in the Oracle DataGuard environment.

Procedure
Step 1 Log in to the operating system as the oracle user.
Step 2 Connect to the database.
$ sqlplus '/ as sysdba'
Step 3 Check RM log application.
SQL> select thread#,sequence#,archived,applied,first_time from v$archived_log where
first_time>sysdate-1;
THREAD# SEQUENCE# ARCHIVED APPLIED FIRST_TIME
------- --------- ---------- --------- --------------------
1 38 YES YES 25-September-12 22:00:36
1 39 YES YES 26-September-12 8:28:01
1 40 YES YES 26-September-12 10:35:31
1 41 YES YES 26-September-12 10:35:34

----End

Exception Handling

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 134


Copyright © Huawei
Technologies Co., Ltd.
IT Auxiliary Manual Preventive MaintenanceManual Preventive
Oracle 11G R1 Preventive Maintenance Guide Maintenance

If log application does not comply with the reference standard, resolve this problem.

Contact Huawei engineers for guidance.

Issue 01 (2013-06-30) Huawei Proprietary and Confidential 135


Copyright © Huawei
Technologies Co., Ltd.

Vous aimerez peut-être aussi