0% found this document useful (0 votes)
189 views6 pages

SQL Select OBJECT - NAME From DBA - OBJECTS Where Status 'INVALID'

Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
189 views6 pages

SQL Select OBJECT - NAME From DBA - OBJECTS Where Status 'INVALID'

Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1. Download interim patch to /home/patchnumber (ftp updates.oracle.com with metalink user id and password) a.

Go to the OracleMetaLink Web site at: b. http://metalink.oracle.com/ c. Log in to OracleMetaLink. d. Select the Patches & Updates tab. e. Select Simple Search. f. Enter 5337014 in the patch number field. g. Select your platform from the drop-down list. h. Click Go. i. Click View Readme. j. Click Download after reading the Readme file. K .Follow the installation instructions in the patch set documentation 2. Check invalids sql>select OBJECT_NAME from DBA_OBJECTS where status = 'INVALID' 3. Shutdown the databases and listener SQL> Shut immediate [oracle@prod]$ lsnrctl stop $ORACLE_SID a. Shutdown All the Oracle Processes running from that Oracle Home , including the Listener and Database instance, Management agent etc b. You MUST Backup your oracle Home and Inventory

3 .Set env variables a. export ORACLE_HOME=/u02/oracle/10.2.0 b. export LD_LIBRARY_PATH=$ORACLE_HOME/lib c. export PATH =$ORACLE_HOME/OPatch:$RACLE_HOME/bin:$PATH 4 .Check if opatch is in your path Set Oracle Home [oracle@prod ]$ oraenv ORACLE_SID = [PROD] ? Set the PATH variable: [oracle@prod ] $ export PATH=$PATH:$ORACLE_HOME/OPatch [oracle@prod] $ which opatch /opt/oracle/product/10g/db_2/OPatch/opatch

5. Query the Oracle Inventory:

[oracle@prod]$ opatch lsinventory Invoking OPatch 10.2.0.3.0 Oracle interim Patch Installer version 10.2.0.3.0 Copyright (c) 2005, Oracle Corporation. All rights reserved.. Oracle Home : /opt/oracle/product/10g/db_2 Central Inventory : /opt/oracle/oraInventory from : /etc/oraInst.loc OPatch version : 10.2.0.3.0 OUI version : 10.2.0.3.0 OUI location : /opt/oracle/product/10g/db_2/oui Log file location : /opt/oracle/product/10g/db_2/cfgtoollogs/opatch/opatch2007-10-18_0921-35AM.log Lsinventory Output file location : /opt/oracle/product/10g/db_2/cfgtoollogs/opatch/lsinv/lsinventory2007-10-18_09-2135AM.txt Installed Top-level Products (2): Oracle Database 10g 10.2.0.1.0 Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0 There are 2 products installed in this Oracle Home. Interim patches (2) : Patch 5556081 : applied on Sun Feb 11 12:40:40 EST 2007 Created on 9 Nov 2006, 22:20:50 hrs PST8PDT Bugs fixed: 5556081 Patch 5557962 : applied on Sun Feb 11 12:40:31 EST 2007 Created on 9 Nov 2006, 23:23:06 hrs PST8PDT Bugs fixed: 4269423, 5557962, 5528974 OPatch succeeded.

6. Where is your oracle Inventory


[oracle@prod]$ ls

oraInst.loc

oraInst.loc [[oracle@prod]$ cat oraInst.loc inventory_loc=/opt/oracle/oraInventory inst_group=dba [oracle@prod etc]

Location of Oracle Inventory =/u01/app/oracle/product/10.1.0/db_1/inventory This is the expected location of the inventory with the full path to the actual file being /u01/app/oracle/product/10.1.0/db_1/inventory/ContentsXML/comps.xml Comps.xml is file with both the Patch IDs and the related bug numbers

7. Install patch (or) apply patch


Copy the patch in $ORACLE_HOME/patches
Unzip p4567866_LINUX.zip cd 4567866 opatch apply

8. Query the Oracle Inventory:


[oracle@prod]$ opatch lsinventory Invoking OPatch 10.2.0.3.0 Oracle interim Patch Installer version 10.2.0.3.0 Copyright (c) 2005, Oracle Corporation. All rights reserved.. Oracle Home : /opt/oracle/product/10g/db_2 Central Inventory : /opt/oracle/oraInventory from : /etc/oraInst.loc OPatch version : 10.2.0.3.0 OUI version : 10.2.0.3.0 OUI location : /opt/oracle/product/10g/db_2/oui Log file location : /opt/oracle/product/10g/db_2/cfgtoollogs/opatch/opatch2007-10-18_0921-35AM.log Lsinventory Output file location : /opt/oracle/product/10g/db_2/cfgtoollogs/opatch/lsinv/lsinventory2007-10-18_09-2135AM.txt Installed Top-level Products (2): Oracle Database 10g 10.2.0.1.0 Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0 There are 2 products installed in this Oracle Home. Interim patches (2) : Patch 5556081 : applied on Sun Feb 11 12:40:40 EST 2007 Created on 9 Nov 2006, 22:20:50 hrs PST8PDT Bugs fixed: 5556081

Patch 5557962 : applied on Sun Feb 11 12:40:31 EST 2007 Created on 9 Nov 2006, 23:23:06 hrs PST8PDT Bugs fixed: 4269423, 5557962, 5528974 Patch 4567866: applied on Mon Nov 31 12:40:31 EST 2011 Created on 9 Nov 2006, 23:23:06 hrs PST8PDT Bugs fixed: 4269428, 5557967, 5528971

9. Start listener and database


SQL>Startup []$ lsnrctl start $ORACLE_SID

10. checking a new check


sql>select OBJECT_NAME from DBA_OBJECTS where status = 'INVALID' How to Rollback a patch opatch rollback -id <Patch Number> The following example applies all patches under the <patch_location> directory: opatch napply <patch_location> The following example applies patches 1, 2, and 3 that are under the <patch_location> directory: opatch napply <patch_location> -id 1,2,3 Syntax Use the following syntax for this command: opatch lsinventory [-all ][-all_nodes] [-bugs_fixed asc|desc] [-delay <value> ][-detail] [-group_by_date] [-invPtrLoc <Path to oraInst.loc> ][-jre <LOC> ] [-oh <ORACLE_HOME> ] [-patch asc|desc] [-property_file <path to property file>] [-retry <value> ]

Central Inventory Pointer File Every Oracle software installation has an associated Central Inventory where the details of all the Oracle products installed on a host are registered. The Central Inventory is located in the directory specified by the inventory pointer file. Each Oracle software installation will have its own Central Inventory pointer file which is unknown to another Oracle software installation /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall Oracle Home Inventory ( or) local inventory Oracle home inventory or local inventory is present inside each Oracle home. It contains information relevant to the particular Oracle home only. This file is located in the following location: $ORACLE_HOME/inventory It contains the following files and folders: Components File Home Properties File Other Folders

Components File This file contains the details about third party applications like Java Runtime Environment (JRE) required by different Java-based Oracle tools and components. In addition, it also contains details of all the components as well as patchsets or interim patches installed in the Oracle home. This file is located in the following location: ORACLE_HOME/inventory/ContentsXML/comps.xml

Home Properties File This file contains the details about the node list, the local node name, and the CRS flag for the Oracle home. In a shared home, the local node information is not present. This file also contains the following information: GUID: This is the unique global ID for the Oracle home. ARU ID: This is the unique platform ID. The patching and patchset application depends on this ID. ARU ID DESCRIPTION: This is the platform description.

The information in oraclehomeproperties.xml overrides the information in inventory.xml. This file is located in the following location: $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml Patch Types 1. 2. 3. 4. One-off patch Patchsets( no roll backword, Installed Through OUI) Cpu patch(Critical Patch Update) Crs# patch

All above patches can be installed using Opatch Utility except patchset PATCH A patch is a one-off fix for a specific issue. The patch may be a manual process, or applied using the opatch utility. These changes may not result in an oracle version change, PATCHSET A patchset is a collection or collection of patches. Typically, a patchset is a more major operation, and as such will include be applied using the Oracle Universal Installer. The patchset will typically result in a significant version change, like 10.2.0.1.0 to 10.2.0.2.0 etc
What is OPatch? OPatch is Oracle's utility for applying patches. It is a command line tool. It has no GUI.

The main purposes of OPatch is a. Applying interim patch. b. Rolling back the interim patch. c. Detecting Conflict when applying an interim patch after pervious interim patches have been applied. It also suggests the best options to resolve a conflict. d. Reporting on installed products and iterim patch.

You might also like