hcheck.sql - Script to Check Data Dictionary for Known Problems (Doc ID 136697.1)
- Get link
- X
- Other Apps
In this Document
Applies to:Oracle Database Backup Service - Version N/A and laterOracle Database Cloud Exadata Service - Version N/A and later Oracle Database Cloud Service - Version N/A and later Oracle Database Cloud Schema Service - Version N/A and later Oracle Database Exadata Express Cloud Service - Version N/A and later Information in this document applies to any platform. Purpose
Current Versions
Note: Although this script has been tested internally by Oracle Support and Development, it should be run (and resolve any issues) in a development or test environment before running it in production. Troubleshooting StepsRequirementsExecution Environment: SQL*Plus Access Privileges: Requires to be run connected as SYS schema Usage: $ sqlplus SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 19 08:14:13 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Enter username: / as sysdba Connected to: SQL> spool hcheck.log For 12c with Multitenant, connect to each PDB to run the script. Example: SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 19 08:14:13 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Enter username: / as sysdba Connected to: SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED SQL> alter session set container=CDB1_PDB1; Session altered. SQL> spool hcheck.log ConfiguringFor 19.22.0.0.240116 onward : SQL> set serveroutput on size unlimited For Oracle 10.2.0.5 to Database Jan 2024 Release Update (DB RU) 19.22.0.0.240116:
For Oracle 9i to 10.2.0.4:
For Oracle 8i:
Instructions1. Connect as SYS schema in SQL*Plus. If using Oracle 12c with Multitenant (CDB), connect to each PDB. 2. spool outputfile (optional, as a trace file with the output is created). 3. Run hcheck.sql in SYS schema - this is for Oracle 10.2.0.5 onwards. For Oracle 9i until 10.2.0.4, use hcheck_10204.sql. For Oracle 8i, create package hOut as described in Note:101468.1 and run hcheck8i.sql. 4. Output will go to the spool file (if spool was defined) and the session trace file. 5. spool off 6. Review the spool file or the trace file (sid_ora_pid_HCHECK.trc).
ScriptThe relevant script can be downloaded here:
NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner. For the purposes of this document, the following fictitious environment is used as an example to describe the procedure: Schema=SCOTT Sample Output$ sqlplus SQL*Plus: Release 12.2.0.1.0 Production on ... Copyright (c) 1982, 2016, Oracle. All rights reserved. Enter username: / as sysdba Connected to: SQL> @hcheck HCheck Version 07MAY18 on .....---------------------------------------------- Catalog Version 12.2.0.1.0 (1202000100) db_name: Is CDB?: YES CON_ID: 3 Container: CDB1_PDB1 Catalog Fixed HCKE-0019: Orphaned TAB$ (no SEG$) (Doc ID 1360889.1) .- SegNotInDeferredStg ... 1202000100 > 1102000000 ..... 09:49:02 PASS --------------------------------------- ..................... Elapsed: 1 secs --------------------------------------- Found 1 potential problem(s) and 0 warning(s) Contact Oracle Support with the output and trace file to check if the above needs attention or not PL/SQL procedure successfully completed. Statement processed. Complete output is in trace file: SQL> spool off
ReferencesNOTE:101468.1 - Script to Install the "hOut" Helper Package ("hout.sql")NOTE:101466.1 - Introduction to the "H*" Helper Scripts |
- Get link
- X
- Other Apps

Comments
Post a Comment