Validação do ambiente Oracle com a ferramenta ORACHK
Por Jhonata Lamim,
Postado em Novembro 2016
Revisado por Marcelo Pivovar - Solution Architect
O Oracle orachk é uma ferramenta desenvolvida pela própria Oracle para validação de produtos Oracle (database e middleware). Anteriormente conhecido como raccheck, o orachk foi aprimorado e projetado para atender tando as versões Single instance quanto RAC, gerando um relatório detalhado sobre os pontos de riscos encontrados. Além de emitir uma pontuação do ambiente, que vai de 0 a 100.
Atualmente o orachk realiza uma validação dos seguintes produtos:
- Oracle Database
Standalone Database
Grid Infrastructure & RAC
Maximum Availability Architecture (MAA) Validation
Upgrade Readiness Validation
Golden Gate
Application Continuity
- Enterprise Manager Cloud Control (12c & 13.1)
Repository
Agents
OMS (version 12.1.0.1 and above on Linux only)
- E-Business Suite
Oracle Payables (R12 only)
Oracle Workflow
Oracle Purchasing (R12 only)
Oracle Order Management (R12 only)
Oracle Process Manufacturing (R12 only)
Oracle Fixed Assets (R12 only)
Oracle Human Resources (R12 only)
Oracle Receivables (R12 only)
Oracle Customer Relationship Management
Oracle Project Billing
- Oracle Hardware Systems
Oracle Solaris
Oracle Solaris Cluster
Oracle Systems configuration for Oracle Database, Oracle Middleware & Oracle Applications
ZFS Storage Appliance
Oracle Virtual Networking
- Oracle Identity and Access Management
Oracle Identity Manager (11.1.2.2.x and 11.1.2.3.x)
Oracle Access Manager (11.1.2.2.x and 11.1.2.3.x)
Oracle Unified Directory (11.1.2.2.x and 11.1.2.3.x)
- Oracle Siebel
Oracle Siebel verification of the database configuration for stability, best practices and performance optimization (Siebel 8.1.1.11 connecting to Oracle Database 11.2.0.4.)
- Oracle PeopleSoft
Oracle PeopleSoft verification of the database best practices
As principais características que podemos destacar do ORAchk são:
- Verificação proativa de problemas conhecidos e de maior impacto para o sistema.
- Simplifica e agiliza a investigação e análise de problemas conhecidos que representam um risco ao ambiente.
- É uma ferramenta leve, não precisa de instalação e a execução ocorre isolada (os dados não trafegam pela rede nem são enviados para a Oracle)
- Possuí relatório de alto nível possibilitando identificação clara dos riscos existentes no ambiente.
- Permite o possibilidade de configuração de envio de email quando um problema é detectado.
Agora que já conhecemos um pouco do ORAchk e seus benefícios, vamos a um exemplo prático de instalação", execução e verificação do relatório gerado em um ambiente de testes single instance. O donwload da versão mais atual pode ser realizado no My Oracle Support através do Doc ID 1268927.2. Apos efetuar o download do ORAchk e envia-lo ao servidor que estaremos avaliando, basta descompacta-lo dentro de um diretório específico. No teste efetuado, criei o diretório orachk, e descompactei o arquivo dentro do mesmo
1 [oracle@ora12c discos]$ mkdir orachk
2 [oracle@ora12c discos]$ mv orachk.zip orachk
3 [oracle@ora12c discos]$ cd orachk
4 [oracle@ora12c orachk]$ ls
5 orachk.zip
6 [oracle@ora12c orachk]$ unzip orachk.zip
7 Archive: orachk.zip
8 inflating: sample_user_defined_checks.xml
9 inflating: collections.dat
10 inflating: CollectionManager_App.sql
11 inflating: UserGuide.txt
12 inflating: rules.dat
13 inflating: orachk
14 creating: .cgrep/
15 inflating: .cgrep/exalogic_zfs_checks_el_extensive.aksh
16 inflating: .cgrep/OVMMCheckChannels.py
17 inflating: .cgrep/scnhealthcheck.sql
18 inflating: .cgrep/checkDiskFGMapping.sh
19 inflating: .cgrep/pxhcdr.sql
20 inflating: .cgrep/lcgrep4
21 inflating: .cgrep/lcgreps9
22 inflating: .cgrep/zonecores.sh
23 inflating: .cgrep/cgrepwin61
24 inflating: .cgrep/profile_collections.pl
25 inflating: .cgrep/checkHiddenParams.sh
26 inflating: .cgrep/registry_validation.sql
27 inflating: .cgrep/ggdiscovery.sh
28 inflating: .cgrep/zfssa_checks.aksh
29 inflating: .cgrep/psqlplus
30 inflating: .cgrep/ogghc_12101.sql
31 inflating: .cgrep/load_checks_attributes.pl
32 inflating: .cgrep/parse_index.pl
33 inflating: .cgrep/oracle-upstarttmpl.conf
34 inflating: .cgrep/acchk.jar
35 inflating: .cgrep/rack_comparison.py
36 inflating: .cgrep/discoverdbasm.pl
37 inflating: .cgrep/create_small_file.pl
38 inflating: .cgrep/preupgrd.sql
39 inflating: .cgrep/diff_checks.pl
40 inflating: .cgrep/scgrep
41 inflating: .cgrep/diff_collections.pl
42 inflating: .cgrep/lcgreps11
43 inflating: .cgrep/hiacgrep
44 inflating: .cgrep/ogghc_11203.sql
45 inflating: .cgrep/ogghc_11204.sql
46 inflating: .cgrep/isc_summary.pl
47 inflating: .cgrep/ofm_client.sh
48 inflating: .cgrep/rac_lib.pm
49 inflating: .cgrep/mineocr.pm
50 inflating: .cgrep/validatePassword.sh
51 inflating: .cgrep/check_sysctl.awk
52 inflating: .cgrep/zlcgrep6
53 inflating: .cgrep/auto_upgrade.pl
54 inflating: .cgrep/vmpscan.sh
55 inflating: .cgrep/scgrepx86
56 inflating: .cgrep/checkFlashCache.sh
57 inflating: .cgrep/checkDiskScheduler.sh
58 inflating: .cgrep/profile_only.dat
59 inflating: .cgrep/discover_java_home.sh
60 inflating: .cgrep/create_version.pl
61 inflating: .cgrep/raw_data_browser.pl
62 inflating: .cgrep/show_file_in_html.pl
63 extracting: .cgrep/zfs_basic_check.akwf
64 creating: .cgrep/profiles/
65 inflating: .cgrep/profiles/D49B218473787400E0431EC0E50A0BB9.prf
66 extracting: .cgrep/profiles/2A2FC945D720BAB8E0530C98EB0AC02F.prf
67 inflating: .cgrep/profiles/12B66730A5161437E05312C0E50AABAB.prf
68 inflating: .cgrep/profiles/0A82EA8BF9646097E05313C0E50A26D6.prf
69 inflating: .cgrep/profiles/F9ED0179CCD8256BE04312C0E50A5399.prf
70 inflating: .cgrep/profiles/1B0907A7BA8DA932E0530C98EB0A0947.prf
71 inflating: .cgrep/profiles/F6AFECA37F177C3FE04313C0E50A56BF.prf
72 inflating: .cgrep/profiles/09DC8AC7C7974BDDE05313C0E50A2339.prf
73 inflating: .cgrep/profiles/177BBFEE0215240AE0530E98EB0AEBF7.prf
74 inflating: .cgrep/profiles/D49BDC2EC9E624AEE0431EC0E50A3E12.prf
75 extracting: .cgrep/profiles/21A3C08B67727E6AE0530E98EB0AE59C.prf
76 inflating: .cgrep/profiles/165CCF84D4FE0342E0530A98EB0AAE6E.prf
77 extracting: .cgrep/profiles/1A5008BEC8B612BCE0530E98EB0AA998.prf
78 inflating: .cgrep/profiles/D49C0AB26A6D45A8E0431EC0E50ADE06.prf
79 inflating: .cgrep/profiles/D49C4F9F48735396E0431EC0E50A9A0B.prf
80 inflating: .cgrep/profiles/DFE9C207A8F2428CE04313C0E50A6B0A.prf
81 inflating: .cgrep/profiles/271BD73C756AE5EDE0530B98EB0A6A13.prf
82 inflating: .cgrep/profiles/DF65D0F7FB6F1014E04312C0E50A7808.prf
83 inflating: .cgrep/profiles/1B0907A7BA8CA932E0530C98EB0A0947.prf
84 inflating: .cgrep/profiles/270F37922A89B520E0530B98EB0ADDE9.prf
85 inflating: .cgrep/profiles/178E758EB8CA06D8E0530D98EB0A7AC9.prf
86 extracting: .cgrep/profiles/F13E11974A282AB3E04312C0E50ABCBF.prf
87 inflating: .cgrep/profiles/EF6C016813C51366E04313C0E50AE11F.prf
88 inflating: .cgrep/profiles/DA94919CD0DE0913E04312C0E50A7996.prf
89 inflating: .cgrep/profiles/D49C0FBF8FBF4B1AE0431EC0E50A0F24.prf
90 inflating: .cgrep/profiles/06889D8BB65E575CE05313C0E50ADFD3.prf
91 inflating: .cgrep/profiles/D8367AD6754763FEE04312C0E50A6FCB.prf
92 inflating: .cgrep/profiles/DF65D6117CB41054E04312C0E50A69D1.prf
93 inflating: .cgrep/profiles/06702DE980726771E05313C0E50ACF83.prf
94 extracting: .cgrep/profiles/2A302D96CCE5F8B2E0530A98EB0A71EE.prf
95 inflating: .cgrep/profiles/1B0907A7BA8EA932E0530C98EB0A0947.prf
96 inflating: .cgrep/profiles/20E3DAB976AD7377E0530A98EB0A9BCA.prf
97 inflating: .cgrep/profiles/E1BF012E8F210839E04313C0E50A7B68.prf
98 inflating: .cgrep/profiles/D462A6F7E9C340FDE0431EC0E50ABE12.prf
99 inflating: .cgrep/profiles/069273EAA9873FD1E05312C0E50A8953.prf
100 inflating: .cgrep/profiles/EA5EE324E7E05128E04313C0E50A4B2A.prf
101 inflating: .cgrep/profiles/3194E615F4BBEDD0E0530A98EB0A046E.prf
102 inflating: .cgrep/profiles/1C6E4AC8EF3674D0E0530D98EB0ACEC1.prf
103 inflating: .cgrep/profiles/E8DF76E07DD82E0DE04313C0E50AA55D.prf
104 inflating: .cgrep/profiles/206B850D83B1CE54E0530C98EB0A5C89.prf
105 inflating: .cgrep/profiles/F32F44CE0BCD662FE04312C0E50AB058.prf
106 inflating: .cgrep/profiles/E2E972DDE1E14493E04312C0E50A1AB1.prf
107 inflating: .cgrep/profiles/D49AD88F8EE75CD8E0431EC0E50A0BC3.prf
108 inflating: .cgrep/lcgrep5
109 inflating: .cgrep/idmhc_get_check_status.pl
110 inflating: .cgrep/switch_multirack.sh
111 inflating: .cgrep/utlu112i.sql
112 inflating: .cgrep/parse_user_defined_checks.pl
113 inflating: .cgrep/rac_file_checker.pl
114 inflating: .cgrep/detect_custom_rpms.sh
115 inflating: .cgrep/checkLocalDisks.sh
116 inflating: .cgrep/lcgreps10
117 inflating: .cgrep/get_zfs_checks.pl
118 inflating: .cgrep/filechecker.sh
119 inflating: .cgrep/check_reblance_free_space.sql
120 inflating: .cgrep/merge_collections.pl
121 inflating: .cgrep/append_merge_collections.pl
122 inflating: .cgrep/lcgrep6s
123 inflating: .cgrep/utluppkg.sql
124 inflating: .cgrep/host_specific_collections.pl
125 inflating: .cgrep/reset_crshome.pl
126 inflating: .cgrep/wallet2.pl
127 inflating: .cgrep/cgrepwin63
128 inflating: .cgrep/asrexacheck
129 inflating: .cgrep/init.tmpl
130 inflating: .cgrep/readreg.pl
131 inflating: .cgrep/utlusts.sql
132 inflating: .cgrep/rac_main.pl
133 inflating: .cgrep/acgrep
134 inflating: .cgrep/exalogic_zfs_checks.aksh
135 inflating: .cgrep/profiles.dat
136 inflating: .cgrep/lcgrep6
137 inflating: .cgrep/checkvg.sh
138 inflating: .cgrep/run_individual_checks.pl
139 inflating: .cgrep/combine_collections.pl
140 inflating: .cgrep/versions.dat
141 inflating: readme.txt
142 inflating: user_defined_checks.xsd
143 creating: .cgrep/zfschecks/
144 inflating: .cgrep/zfschecks/Cluster
145 inflating: .cgrep/zfschecks/ZSCPU
146 inflating: .cgrep/zfschecks/ExtMirrorProfile
147 inflating: .cgrep/zfschecks/ExtShareDedup
148 inflating: .cgrep/zfschecks/Shadows
149 inflating: .cgrep/zfschecks/ExtShadows
150 inflating: .cgrep/zfschecks/ZSServices
151 inflating: .cgrep/zfschecks/NFSDomain
152 inflating: .cgrep/zfschecks/NFS4LockObjectLeak
153 inflating: .cgrep/zfschecks/ShareQuota
154 inflating: .cgrep/zfschecks/ZSILOM
155 inflating: .cgrep/zfschecks/ShareDedup
156 inflating: .cgrep/zfschecks/ExtShareQuota
157 inflating: .cgrep/zfschecks/SnapshotVisibility
158 inflating: .cgrep/zfschecks/ZSFan
159 inflating: .cgrep/zfschecks/Lock
160 inflating: .cgrep/zfschecks/BlockSize
161 inflating: .cgrep/zfschecks/SoftringWorkflow
162 inflating: .cgrep/zfschecks/DiskTimeoutWarning
163 inflating: .cgrep/zfschecks/HeadStatus
164 inflating: .cgrep/zfschecks/ZSRouting
165 inflating: .cgrep/zfschecks/Maintenance
166 inflating: .cgrep/zfschecks/AnalyticsRetentionPolicy
167 inflating: .cgrep/zfschecks/ZSVersion
168 inflating: .cgrep/zfschecks/ZSIPMP
169 inflating: .cgrep/zfschecks/L2ARCHeader
170 inflating: .cgrep/zfschecks/ZSSlot
171 inflating: .cgrep/zfschecks/Datasets
172 inflating: .cgrep/zfschecks/DNSConfiguration
173 inflating: .cgrep/zfschecks/ZSDIMM
174 inflating: .cgrep/zfschecks/ZSPrivateNetworkInterface
175 inflating: .cgrep/zfschecks/MirrorProfile
176 inflating: .cgrep/zfschecks/Backend
177 inflating: .cgrep/zfschecks/ZSNTP
178 inflating: .cgrep/zfschecks/NFSDelegation
179 inflating: .cgrep/zfschecks/CommonCode
180 inflating: .cgrep/zfschecks/StorageMemSize
181 inflating: .cgrep/zfschecks/ZSPowerSupply
182 inflating: .cgrep/zfschecks/ExtBlockSize
183 inflating: .cgrep/zfschecks/ZSPool
184 inflating: .cgrep/zfschecks/ZSZillas
185 creating: exadiscover/
186 inflating: exadiscover/list_master_node.sql
187 inflating: exadiscover/list_ovmm.sql
188 inflating: exadiscover/list_all_ips_vars.sql
189 inflating: exadiscover/exadiscover.py
190 inflating: exadiscover/exadiscover.sh
191 inflating: exadiscover/CHANGELOG
192 inflating: exadiscover/README
193 inflating: exadiscover/list_all_ips.sql
194 inflating: exadiscover/list_assets.sql
195 creating: templates/
196 inflating: templates/exachk_exalogic.conf.tmpl_quarter
197 inflating: templates/exachk_exalogic.conf.tmpl_full
198 inflating: templates/exachk_exalogic.conf.tmpl_eighth
199 inflating: templates/exachk_exalogic.conf.tmpl_half
200 inflating: generate_guests_list.sh
201 inflating: ORAchk_Health_Check_Catalog.html
202 inflating: doc/ORAchk_and_EXAchk_User_Guide.pdf
203 inflating: doc/ORAchk_EXAchk_Feature_Fix_History.pdf
204 [oracle@ora12c orachk]$
Após descompactar, basta executar o orachk e informar as "interações" solicitadas para execução do relatório. Para que toda a validação seja possível, será preciso que o usuário que estará executando (preferencialmente seja o oracle) tenha permissão para realizar um sudo ou você pode fornecer a senha do root durante a execução.
1 Banco=lamimcdb-> echo $ORACLE_HOME
2 /orabin/app/oracle//product/12.1.0.2/db_1
3 Banco=lamimcdb-> echo $ORACLE_SID
4 lamimcdb
5 Banco=lamimcdb-> echo $ORACLE_BASE
6 /orabin/app/oracle/
7 Banco=lamimcdb->
8 Banco=lamimcdb->
9 Banco=lamimcdb-> ./orachk
10 Enter ORACLE_HOME for lamimcdb : /orabin/app/oracle//product/12.1.0.2/db_1
11 List of running databases
12 1. lamimcdb
13 2. None of above
14 Select databases from list for checking best practices. For multiple databases,
15 select 1 for All or comma separated number like 1,2 etc [1-2][1].1
16 . .
17
18 Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS
19 . . . . . . . . . . . . . . .
20 -------------------------------------------------------------------------------------------------------
21 Oracle Stack Status
22 -------------------------------------------------------------------------------------------------------
23 Host Name CRS Installed ASM HOME RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name
24 -------------------------------------------------------------------------------------------------------
25 ora12c No No Yes No No Yes lamimcdb
26 -------------------------------------------------------------------------------------------------------
27
28 Copying plug-ins
29 . . . . . . . . .
30
31 *** Checking Best Practice Recommendations (PASS/WARNING/FAIL) ***
32
33 Collections and audit checks log file is
34 /u01/discos/orachk/orachk_ora12c_lamimcdb_090616_140408/log/orachk.log
35
36 Checking for prompts in /home/oracle/.bash_profile on ora12c for oracle user...
37
38 . .
39 =============================================================
40 Node name - ora12c
41 =============================================================
42 . . . . .
43 Collecting - Database Parameters for lamimcdb database
44 Collecting - Database Undocumented Parameters for lamimcdb database
45 Collecting - RDBMS Feature Usage for lamimcdb database
46 Collecting - CPU Information
47 Collecting - DiskMount Information
48 Collecting - Kernel parameters
49 Collecting - Maximum number of semaphore sets on system
50 Collecting - Maximum number of semaphores on system
51 Collecting - Maximum number of semaphores per semaphore set
52 Collecting - Memory Information
53 Collecting - OS Packages
54 Collecting - Operating system release information and kernel version
55 Collecting - Patches for RDBMS Home
56 Collecting - Table of file system defaults
57 Collecting - number of semaphore operations per semop system call
58
59
60 Data collections completed. Checking best practices on ora12c.
61 --------------------------------------------------------------------------------------
62
63 WARNING => DBRM is not configured. for lamimcdb
64 WARNING => Linux Swap Configuration does NOT meet Recommendation
65 WARNING => physical memory is not sufficient
66 WARNING => free physical memory is not at sufficient level on system
67 INFO => Important Storage Minimum Requirements for Grid & Database Homes
68 INFO => Most recent ADR incidents for /orabin/app/oracle//product/12.1.0.2/db_1
69 WARNING => PGA allocation for all databases is more than total memory available on this system
70 INFO => Oracle GoldenGate failure prevention best practices
71 INFO => At some times checkpoints are not being completed for lamimcdb
72 WARNING => OSWatcher is not running as is recommended.
73 FAIL => Database parameter DB_BLOCK_CHECKSUM is NOT set to recommended value on lamimcdb instance
74 FAIL => Database parameter DB_LOST_WRITE_PROTECT is NOT set to recommended value on lamimcdb instance
75 INFO => umask for RDBMS owner is not set to 0022
76 WARNING => Database parameter DB_BLOCK_CHECKING on PRIMARY is NOT set to the recommended value for lamimcdb
77 INFO => Operational Best Practices
78 INFO => Database Consolidation Best Practices
79 INFO => Computer failure prevention best practices
80 INFO => Data corruption prevention best practices
81 INFO => Logical corruption prevention best practices
82 INFO => Database/Cluster/Site failure prevention best practices
83 INFO => Client failover operational best practices
84 WARNING => Duplicate objects were found in the SYS and SYSTEM schemas for lamimcdb
85 WARNING => Oracle clusterware is not being used
86 WARNING => RAC Application Cluster is not being used for database high availability on lamimcdb instance
87 WARNING => DISK_ASYNCH_IO is NOT set to recommended value for lamimcdb
88 FAIL => Flashback on PRIMARY is not configured for lamimcdb
89 INFO => Database failure prevention best practices
90 WARNING => fast_start_mttr_target has NOT been changed from default on lamimcdb instance
91 FAIL => Primary database is NOT protected with Data Guard (standby database)
92 for real-time data protection and availability for lamimcdb
93 FAIL => Active Data Guard is not configured for lamimcdb
94 INFO => Oracle recovery manager(rman) best practices
95 INFO => Consider increasing the COREDUMPSIZE size
96 WARNING => Consider increasing the value of the session_cached_cursors database parameter for lamimcdb
97 WARNING => Consider investigating the frequency of SGA resize operations
98 and take corrective action forlamimcdb
99
100 Best Practice checking completed.Checking recommended patches on ora12c.
101 ---------------------------------------------------------------------------------
102
103 Collecting patch inventory on ORACLE_HOME /orabin/app/oracle//product/12.1.0.2/db_1
104 ---------------------------------------------------------------------------------
105
106 ---------------------------------------------------------------------------------
107 1 Recommended RDBMS patches for 121020 from /orabin/app/oracle//product/12.1.0.2/db_1 on ora12c
108 ---------------------------------------------------------------------------------
109 Patch# RDBMS ASM type Patch-Description
110 ---------------------------------------------------------------------------------
111 22291127 no merge DATABASE PATCH SET UPDATE 12.1.0.2.160419
112 ---------------------------------------------------------------------------------
113 ---------------------------------------------------------------------------------
114
115 ---------------------------------------------------------------------------------
116 RDBMS homes patches summary report
117 ---------------------------------------------------------------------------------
118 Total patches Applied on RDBMS Applied on ASM ORACLE_HOME
119 ---------------------------------------------------------------------------------
120 1 0 0 /orabin/app/oracle//product/12.1.0.2/db_1
121 ---------------------------------------------------------------------------------
122
123 ---------------------------------------------------------------------------------
124
125 Detailed report (html) - /u01/discos/orachk/orachk_ora12c_lamimcdb_090616_140408/
126 orachk_ora12c_lamimcdb_090616_140408.html
127 UPLOAD(if required) - /u01/discos/orachk/orachk_ora12c_lamimcdb_090616_140408.zip
128 Banco=lamimcdb->
Ao término da execução, será criado no diretório raiz do ORAchk um novo diretório (orachk_ora12c_lamimcdb_090616_140408) com o relatório html do ambiente, que acabou de ser gerado. Também será realizada uma copia compactada (orachk_ora12c_lamimcdb_090616_140408.zip) deste diretório que pode ser utilizada em alguma SR da Oracle.
Abaixo estarei compartilhando algumas imagens do report gerado pelo orachk em meu ambiente de testes.

Jhonata Euclides Lamim, MBA em Gestão de Banco de Dados Oracle pelo Centro Universitário de Araraquara (UNIARA), Bacharel em Sistemas de Informação pelo Centro Universitário de Brusque (UNIFEBE). Atua como DBA Oracle desde 2010, pela Teiko Soluções em Tecnologia da Informação. É um entusiasta da tecnologia Oracle e autor do blog lamimdba.com.br.
Este artigo foi revisto pela equipe de produtos Oracle e está em conformidade com as normas e práticas para o uso de produtos Oracle.