Link to home
Start Free TrialLog in
Avatar of hussainkhan22
hussainkhan22Flag for United States of America

asked on

Oracle Cpu Patch

I was apply oct cpu patch on 11.1.0.7.
I have done with the step Opatch apply and now in
3.3.8.1 Loading Modified .sql Files into the Database. I did the following steps in it and getting error
C:\p8928976_111070_Win32\8928976\files\Bundle\Patch19>sqlplus /nolog
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  535662592 bytes
Fixed Size                  1348508 bytes
Variable Size             176163940 bytes
Database Buffers          352321536 bytes
Redo Buffers                5828608 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
Process ID: 5676
Session ID: 170 Serial number: 5
Avatar of hussainkhan22
hussainkhan22
Flag of United States of America image

ASKER

in Bdump
Errors in file c:\app\hussain\diag\rdbms\oracle11g\oracle11\trace\oracle11_ora_3484.trc:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Error 704 happened during db open, shutting down database
USER (ospid: 3484): terminating the instance due to error 704
Instance terminated by USER, pid = 3484
ORA-1092 signalled during: alter database open...
ORA-1092 : opiodr aborting process unknown ospid (5444_3484)
Wed Dec 30 15:54:49 2009
ORA-1092 : opitsk aborting process


Errors in file c:\app\hussain\diag\rdbms\oracle11g\oracle11\trace\oracle11_ora_3484.trc:

*** 2009-12-30 15:54:46.923
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option

*** 2009-12-30 15:54:46.954
USER (ospid: 3484): terminating the instance due to error 704
SQL> startup mount
ORACLE instance started.

Total System Global Area  535662592 bytes
Fixed Size                  1348508 bytes
Variable Size             176163940 bytes
Database Buffers          352321536 bytes
Redo Buffers                5828608 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
Process ID: 3484
Session ID: 170 Serial number: 5


SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
Avatar of it-rex
it-rex

restart your oarcle service in the service console
sqlplus as sys dba
startup upgrade;
then run the catalog.sql script from oracle_home/rdbms
then run the catproc.sql script in Oracle_home/rdbms

then shutdown ;
startup
then tun utlrp.sql from Oracle_home/rdbms
run it as many times till you get the lease number of invalid objects

select count(*) from dba_objects
where status='INVALID';
Hey its showing 549 Invalid objects even after doing several times. Now what shall i do
Hey i have Installed octCPU patch successfully but now i would like to know how to check now if any database CPU patch is applied or not. And which CPU patch is latest in any database
http://forums.oracle.com/forums/thread.jspa?threadID=605228

opatch lsinventory

select * from DBA_REGISTRY_HISTORY
Thanks alot it-Rex. Lastly the 549 invalid objects which are present. What should I do with them to make them valid
Select * from dba_registry

Do u have any invalid comps
Hi it-rex, when i run the above command its showing 19 rows selected. what should i do now
When i execute
SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID';
its still showing 522 rows selected.
Check the status in dba_registry
SQL> conn / as sysdba
Connected.

SQL> desc dba_registry
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------

 COMP_ID                                   NOT NULL VARCHAR2(30)
 COMP_NAME                                          VARCHAR2(255)
 VERSION                                            VARCHAR2(30)
 STATUS                                             VARCHAR2(11)
 MODIFIED                                           VARCHAR2(20)
 NAMESPACE                                 NOT NULL VARCHAR2(30)
 CONTROL                                   NOT NULL VARCHAR2(30)
 SCHEMA                                    NOT NULL VARCHAR2(30)
 PROCEDURE                                          VARCHAR2(61)
 STARTUP                                            VARCHAR2(8)
 PARENT_ID                                          VARCHAR2(30)
 OTHER_SCHEMAS                                      VARCHAR2(4000)

SQL> select comp_name,status from dba_registry;

COMP_NAME
--------------------------------------------------------------------------------

STATUS
-----------
OWB
VALID

Oracle Application Express
VALID

Oracle Enterprise Manager
VALID


COMP_NAME
--------------------------------------------------------------------------------

STATUS
-----------
Oracle Ultra Search
VALID

OLAP Catalog
VALID

Spatial
INVALID


COMP_NAME
--------------------------------------------------------------------------------

STATUS
-----------
Oracle Multimedia
INVALID

Oracle XML Database
VALID

Oracle Text
VALID


COMP_NAME
--------------------------------------------------------------------------------

STATUS
-----------
Oracle Expression Filter
INVALID

Oracle Rules Manager
INVALID

Oracle Workspace Manager
INVALID


COMP_NAME
--------------------------------------------------------------------------------

STATUS
-----------
Oracle Database Catalog Views
VALID

Oracle Database Packages and Types
INVALID

JServer JAVA Virtual Machine
VALID


COMP_NAME
--------------------------------------------------------------------------------

STATUS
-----------
Oracle XDK
VALID

Oracle Database Java Packages
VALID

OLAP Analytic Workspace
VALID


COMP_NAME
--------------------------------------------------------------------------------

STATUS
-----------
Oracle OLAP API
VALID


19 rows selected.

SQL>
Shutdown;
Startup upgrade;
Run catalog from rdbms
Then run catalog
Then shutdown and startup and run utlrp
I have done with catalog.sql. But when i run UTLP.sql it display this errors

SQL> @utlrp.sql
SELECT dbms_registry_sys.time_stamp('utlrp_bgn') as timestamp from dual
                                                                   *
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors


DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#
DECLARE
*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_SQLTUNE_INTERNAL" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_SQLTUNE_INTERNAL"
ORA-06512: at "SYS.UTL_RECOMP", line 760
ORA-06512: at line 4


SELECT dbms_registry_sys.time_stamp('utlrp_end') as timestamp from dual
                                                                   *
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors



PL/SQL procedure successfully completed.

DOC> The following query reports the number of objects that have compiled
DOC> with errors (objects that compile with errors have status set to 3 in
DOC> obj$). If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  2

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


PL/SQL procedure successfully completed.

BEGIN dbms_registry_sys.validate_components; END;

*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_REGISTRY_SYS"
ORA-06512: at line 1


SQL>
Sorry
I forgot about catproc

Shutdown;
Startup upgrade;
Run catalog from rdbms
Then run catproc
Then shutdown and startup and run utlrp



make sure that you run catalog first then catproc and both be run after sartup migrate;
then you have to shutdown and startup and run utlrp
Hi it-rex, I have done the steps which you mention shutdown, startup upgrade, run catalog.sql, catproc.sql, shutdown , startup, utlrp.sql.
Now when I'm running this command its showing me
SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID';
546 rows selected.
Do we need to do anything to make Nill or just leave it
ASKER CERTIFIED SOLUTION
Avatar of it-rex
it-rex

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks alot it-Rex. I will try again from fresh. But for this situation how to resolve this problem. Is it possible to resolve problem now or not
if u still have the same issue

go to metalink and check for eacj comp in dba_registry which is invalid and see how to remove/uninstall and then install again in a clean way!