Text box

Please note that the problems that i face may not be the same that exist on your environment so please test before applying the same steps i followed to solve the problem .

Sunday 30 December 2012

Unable to create font cache directory in Apps 11i

The below error appeared in 11i Apps and we solved it as follows:


 

1. Navigation Path:

(Responsibility) XML Publisher Administrator > (Menu) Home > (Tab) Administration > (SubTab) Configuration > Properties > General > Temporary directory

2. Provide a valid value to 'Temporary directory', and click button 'Save'.

3. Re-test the issue.

The issue:

 
Error Page


Exception Details.

 oracle.apps.fnd.framework.OAException: oracle.apps.xdo.XDOException: Unable to create font cache directory:
 /appltop1/proderpcomn/temp/xdofonts/STAGERP
        at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:975)
        at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
        at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
        at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:785)
        at oracle.apps.per.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:238)
        at oracle.apps.per.irc.offers.webui.OfferReviewCO.processFormRequest(OfferReviewCO.java:152)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
        at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
        at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
        at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
        at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
        at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2676)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1683)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
        at _oa__html._OA._jspService(_OA.java:84)
        at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
        at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
        at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
        at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
        at oracle.jsp.JspServlet.service(JspServlet.java:156)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
        at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
        at org.apache.jserv.JServConnection.run(JServConnection.java:294)
        at java.lang.Thread.run(Thread.java:662)
## Detail 0 ##

Sunday 30 September 2012

11g Cluster Architecture


1-Cluster Architecture:
The oracle cluster-ware is started by OS init daemon as shown below:



During the installation of Oracle Clusterware, the init.ohasd startup script is copied to /etc/init.d. This script is responsible for setting up environment variables and then starting the Oracle Clusterware daemons and processes.
The Oracle High Availability Services daemon (ohasd) is responsible for starting in proper order, monitoring, and restarting other local Oracle daemons, up through the crsd daemon,which manages clusterwide resources. When init starts ohasd on Clusterware startup,ohasd starts orarootagent, cssdagent, and oraagent. These processes then carry out the following tasks:
• orarootagent starts crsd.
- crsd starts another orarootagent process responsible for root-owned CRS
resources including the SCAN VIPS.
• cssdagent starts cssd (ocssd).
• oraagent starts mdnsd, evmd, ASM, ctssd, and gpnpd. oraagent also starts
gsd, Oracle Notification Service (ONS), and the listeners.

Some of the high availability daemons will be running under the root user with real-time
priority, and others will be running under the Clusterware owner with user-mode priorities
after they are started. When a command is used to stop Oracle Clusterware, the daemons will
be stopped, but the ohasd process will remain running.

2-Cluster Processes:
Oracle Clusterware comprises several processes that facilitate cluster operations. The Cluster
Ready Service (CRS), Cluster Synchronization Service (CSS), Event Management (EVM),
and Oracle Notification Service (ONS) components communicate with other cluster
component layers in the same cluster database environment. These components are also the
main communication links between Oracle Database, applications, and the Oracle Clusterware
high availability components. In addition, these background processes monitor and manage
database operations. The following list describes some major Oracle Clusterware background
processes. The list includes components that are processes on Linux and UNIX, or services on
Windows.
• Cluster Ready Service (CRS): Is the primary program for managing high availability
operations in a cluster. The CRS process manages two types of CRS resources:
- Cluster resources: A cluster resource is an Oracle Clusterware resource. Cluster
resources are viewed, added, modified, or removed using the crsctl command.
- Local resources: A local resource runs on every node in the cluster (no failover)
and can be, for example, a listener, ASM, a disk group, or Oracle Notification
Service (ONS).
• The CRS daemon (crsd) manages cluster resources based on configuration information
that is stored in Oracle Cluster Registry (OCR) for each resource. This includes start,
stop, monitor, and failover operations. The crsd process generates events when the
status of a resource changes.
When you have Oracle RAC installed, the crsd process monitors the Oracle database
instance, listener, and so on, and automatically restarts these components when a failure
occurs. When a CRS resource fails, the CRS daemon attempts to restart it, if the resource
is so configured. CRS fails the resource over to another node (again, if it is configured to
do so) after exhausting restart attempts.
• Cluster Synchronization Service (CSS): Manages the cluster configuration by
controlling which nodes are members of the cluster and by notifying members when a
node joins or leaves the cluster. If you are using certified third-party clusterware, then
CSS processes interfaces with your clusterware to manage node membership
information. CSS has three separate processes: the CSS daemon (ocssd), the CSS
Agent (cssdagent), and the CSS Monitor (cssdmonitor). The cssdagent
process monitors the cluster and provides input/output fencing. This service formerly
was provided by Oracle Process Monitor daemon (oprocd), also known as
OraFenceService on Windows. A cssdagent failure results in Oracle Clusterware
restarting the node.
• Disk Monitor daemon (diskmon): Monitors and performs input/output fencing for
Oracle Exadata Storage Server. As Exadata storage can be added to any Oracle RAC
node at any point in time, the diskmon daemon is always started when ocssd is
started.
• Event Manager (EVM): Is a background process that publishes Oracle Clusterware
events
• Multicast domain name service (mDNS): Allows DNS requests. The mDNS process is
a background process on Linux and UNIX, and a service on Windows.
• Oracle Grid Naming Service (GNS): Is a gateway between the cluster mDNS and
external DNS servers. The GNS process performs name resolution within the cluster.
• Oracle Notification Service (ONS): Is a publish-and-subscribe service for
communicating Fast Application Notification (FAN) events
• oraagent: Extends clusterware to support Oracle-specific requirements and complex
resources. It runs server callout scripts when FAN events occur. This process was known
as RACG in Oracle Clusterware 11g Release 1 (11.1).
• Oracle root agent (orarootagent): Is a specialized oraagent process that helps
CRSD manage resources owned by root, such as the network, and the Grid virtual IP
address
• Cluster kill daemon (oclskd): Handles instance/node evictions requests that have
been escalated to CSS
• Grid IPC daemon (gipcd): Is a helper daemon for the communications infrastructure



Component
Processes
Owner
Cluster Ready Service (CRS)
crsd
Root
Cluster Synchronization Service (CSS)
ocssd,cssdmonitor, cssdagent
grid owner,root,root
Event Manager (EVM)
evmd, evmlogger
grid owner
Cluster Time Synchronization Service
(CTSS)
octssd
root
Oracle Notification Service (ONS)
ons, eons
grid owner
Oracle Agent
oraagent
grid owner
Oracle Root Agent
orarootagent
root
Grid Naming Service (GNS)
gnsd
root
Grid Plug and Play (GPnP)
gpnpd
grid owner
Multicast domain name service (mDNS)
mdnsd
grid owner

Thursday 27 September 2012

Monitoring Rman

In this section i want to discuss how to monitor the RMAN sessions:

Query V$SESSION and V$PROCESS to identify the relationship between server sessions and RMAN

channels.

 COLUMN CLIENT_INFO FORMAT a30
 COLUMN SID FORMAT 999
 COLUMN SPID FORMAT 9999
 SELECT s.sid, p.spid, s.client_info,s.event
 FROM v$process p, v$session s
 WHERE p.addr = s.paddr
 AND CLIENT_INFO LIKE 'rman%';


We can Monitor the progress of backup and restore operations by querying V$SESSION_LONGOPS as shown below:

SQL> SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE" FROM V$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK; SID SERIAL# CONTEXT SOFAR TOTALWORK %_COMPLETE --- ------- ------- ------- --------- ---------- 20 90 1 9470 15360 61.65 39 100 1 15871 28160 56.36
I wish those sample examples help you out.

Regards
Mohamed ELAzab




Thursday 20 September 2012

Using data Pump to export and import in case of characterset conversion and in case of no characterset conversion

I want to share 2 cases where we want to export and import into the same character set and export and import into different character set.

NO Character set Conversion:

We export the data from production as follows:
1-Create a parfile and name it ADAPTER.PAR

=================================
Contents of the file:
=================================
schemas=ADAPTER
dumpfile=ADAPTER-20-9-2012.dmp
directory=DPUMP_DIR3
logfile=USG-20-09-12.log
FLASHBACK_SCN=7890710186518

================================

Then export  from the database as follows:
C:\expdp mazab@CCDB parfile='ADAPTER.PAR'

transfer the file using scp command:

scp /filepath/ADAPTER-20-09-2012.dmp oracle@Your_IP:/data/DB/TIMDB/DPUMP
=======================================================
=======================================================
Then import the dump as follows:
========================================================
login to TIMDB:
export ORACLE_SID=TIMDB

impdp directory=TIM_DATA_PUMP dumpfile=ADAPTER-9-5-2011.dmp logfile=ADAPTER-9-5-2011.log schemas=adapter REMAP_SCHEMA=adapter:adapters_ea4 remap_tablespace=ADAPTER:TIM_EA3

Please consider the tablespaces on production and remap them in testing.

 Characterset Conversion:


We export the data from production as follows:
1-Create a parfile and name it SUB.PAR
2-Get scn from the production database to avoid parent child constraints error when importing into TIMDB.
=================================
Contents of the file:
=================================
schemas=SUB
dumpfile=SUB-20-09-2012.dmp
directory=DPUMP_DIR3
logfile=SUB20-09-12.log
QUERY =SUB.SMS_ARCHIVE:"where 1=2"
QUERY =SUB.REQUEST_PARAMETER_ARCHIVE:"where 1=2"
QUERY =SUB.REQUEST_ARCHIVE:"where 1=2"
QUERY =SUB.MOBILE_TRADER_STG:"where 1=2"
QUERY =SUB.TRANSACTION:"where 1=2"
QUERY =SUB.TRANSACTION_PARAMETERS:"where 1=2"
QUERY =SUB.Transaction_Archive:"where 1=2"
QUERY =SUB.Request:"where 1=2"
QUERY =SUB.SMS:"where 1=2"
QUERY =SUB.Transaction_Parameters_Archive:"where 1=2"
QUERY =Mobile_trader:"where 1=2"
FLASHBACK_SCN=7882306652406

================================

Then export  from the database as follows:
C:\expdp mazab@RSDSDB parfile='SUB.PAR'

transfer the file using scp command:

scp /filepath/SUB-20-09-2012.dmp oracle@Your_IP:/data/DB/TIMDB/DPUMP
=======================================================
=======================================================
Then import the dump as follows:
========================================================
login to TIMDB:
export ORACLE_SID=TIMDB

impdp directory=TIM_DATA_PUMP dumpfile=SUB-20-09-2012.dmp logfile=SUB-20-09-2012.log schemas=sub REMAP_SCHEMA=sub:SUB_EA4 remap_tablespace=sub_idx:TIM_EA3,sub:TIM_EA3 content=metadata_only exclude=index exclude=constraint exclude=statistics exclude=trigger exclude=grant
==============================================
==============================================
SQL> drop table semantics$;
SQL>create table semantics$(s_owner varchar2(40),
                       s_table_name varchar2(40),
                       s_column_name varchar2(40),
                       s_data_type varchar2(40),
                       s_char_length number)
===================================================
@insert.sql
@cursor.sql
drop table semantics$;
==================================================
impdp directory=TIM_DATA_PUMP dumpfile=SUB-20-09-2012.dmp logfile=SUB-20-09-2012.log schemas=sub REMAP_SCHEMA=SUB:sub_EA4 remap_tablespace=sub_idx:TIM_EA3,sub:TIM_EA3 content=data_only
=====================================================
impdp directory=TIM_DATA_PUMP dumpfile=SUB-SUB-20-09-2012.dmp logfile=SUB-20-09-2012.log schemas=sub REMAP_SCHEMA=SUB:sub_EA4 remap_tablespace=sub_idx:TIM_EA3,sub:TIM_EA3 content=metadata_only include=index include=constraint include=statistics include=trigger transform=storage:n
============================================
Contents of the cursors:
==========
@insert.sql
============
insert into semantics$
  select C.owner, C.table_name, C.column_name, C.data_type, C.char_length
    from all_tab_columns C, all_tables T
  where C.owner = T.owner
    and T.owner = upper('&&schema')
    and C.table_name = T.table_name
    and C.char_used = 'B'
-- only need to look for tables who are not yet CHAR semantics.
--  and T.partitioned != 'YES'
-- exclude partitioned tables  (removed condition!)
    and C.table_name not in (select table_name from all_external_tables where owner = upper('&&schema'))
    and C.data_type in ('VARCHAR2', 'CHAR')
  -- You can exclude or include tables or schemas as you wish, by adjusting
  -- "and T.owner not in" as per your requirements
/
===========
@cursor.sql
===========
declare
  cursor c1 is select * from semantics$;
  v_statement varchar2(255);
  v_nc number(10);
  v_nt number(10);
begin
  execute immediate
    'select count(*) from semantics$' into v_nc;
  execute immediate
    'select count(distinct s_table_name) from semantics$' into v_nt;
  dbms_output.put_line
    ('ALTERing ' || v_nc || ' columns in ' || v_nt || ' tables');
  for r1 in c1 loop
    v_statement := 'ALTER TABLE ' || r1.s_owner || '.' || r1.s_table_name;
    v_statement := v_statement || ' modify (' || r1.s_column_name || ' ';
    v_statement := v_statement || r1.s_data_type || '(' || r1.s_char_length;
    v_statement := v_statement || ' CHAR))';
    --dbms_output.put_line(v_statement);
    execute immediate v_statement;
  end loop;
  dbms_output.put_line('Done');
end;
/
=========================================
Please consider the tablespaces on production and remap them in testing.







Wednesday 5 September 2012

Migration from character set AR8ISO8859P6 to AL32UTF8 using csscan and csalter

This topic should cover a simple example for migrating data from  AR8ISO8859P6 to AL32UTF8 using data pump.

The steps involved in character set conversion are listed below.
  • Export data
  • CLUSTER_DATABASE=FALSE (*RAC Only*)
  • SHUTDOWN IMMEDIATE
  • STARTUP
  • CSSCAN
  • SHUTDOWN IMMEDIATE
  • STARTUP RESTRICT
  • CSALTER
  • CLUSTER_DATABASE=TRUE (*RAC Only*)
  • SHUTDOWN IMMEDIATE
  • STARTUP
  • Import data
[oracle@radbstage1 oracleup3]$ csscan FULL=Y FROMCHAR=AR8ISO8859P6 TOCHAR=AL32UTF8 ARRAY=1024000 LOG=charcheck CAPTURE=Y PROCESS=4
Character Set Scanner v2.2 : Release 11.2.0.3.0 - Production on Wed Sep 5 12:07:14 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Username: sys/password as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
Enumerating tables to scan...
. process 1 scanning SYSTEM.AUD$[AAAOQsAABAAAOZYAAA]
. process 2 scanning SYS.SOURCE$[AAAADgAABAAAAXgAAA]]
...................
. process 1 scanning SYSMAN.MGMT_TYPE_PROPERTIES[AAAOg9AACAAAF5wAAA]Message 9999 not found;  product=CSMIG; facility=CSS
. process 3 scanning SYSMAN.MGMT_ARU_OUI_COMPONENTS[AAAOljAACAAAGBIAAA]
. ..................
. process 1 scanning SYS.DUAL[AAAAB0AABAAAAOgAAA]Message 9999 not found;  product=CSMIG; facility=CSS
. process 4 scanning SYS.TRIGGERJAVAC$[AAAACoAABAAAAU4AAA]]
. ....................................
. process 4 scanning SYSMAN.MGMT_TASK_QTABLE[AAAOYKAACAAAFY4AAA]Message 9999 not found;  product=CSMIG; facility=CSS
. process 2 scanning SYSMAN.MGMT_CATEGORIES[AAAOg2AACAAAF64AAA]A]
......................................
. process 2 scanning EXFSYS.RLM$VALIDPRIVS
Creating Database Scan Summary Report...
Creating Individual Exception Report...
Scanner terminated successfully.

The CSSCAN generate 3 files charcheck.txt, charcheck.err and charcheck.out.
Checking the contents of the charcheck.txt showed that the Application user data has some data inside tables that needs conversion.
You must backup those data first then drop those tables.I my case i exported the schemas then droped the schemas containing those data.
;;; 
Export: Release 11.2.0.3.0 - Production on Wed Sep 5 10:01:57 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
;;; 
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  /******** AS SYSDBA directory=DATA_PUMP_DIR dumpfile=schemas-backup-5-9-2012.dmp logfile=schemas-backup-5-9-2012.log schemas=APPADMTST,RFETECMUCADM,RFETECMUCAPP,RFETEPRTADM,RFETEPRTAPP,RFETEUCADM,RFETEUCAPP,RFETEUCDAT,RTETECMUCADM,RTETECMUCAPP,RTETEPRTADM,RTETEPRTAPP,RTETEUCADM,RTETEUCAPP,RTETEUCDAT 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 3.327 GB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PACKAGE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
Processing object type SCHEMA_EXPORT/FUNCTION/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA
. . exported "RTETEUCADM"."SCH_T_FILE_PART"              149.8 MB  604267 rows
. . exported "RTETEUCADM"."IM_L_TRANSACTION_BLOCK"       124.2 MB 1599134 rows
............................................
. . exported "RTETEUCDAT"."ROAM_TAP_AGG":"DEF"               0 KB       0 rows
. . exported "RTETEUCDAT"."SUBS_BSCS":"DEF"                  0 KB       0 rows
. . exported "RTETEUCDAT"."SUBS_BSCS_AGG":"DEF"              0 KB       0 rows
. . exported "RTETEUCDAT"."TAP_OUT_IOT"                      0 KB       0 rows
Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
  /oracle/oracle11/product/11.2.0/dbhome_1/rdbms/log/schemas-backup-5-9-2012.dmp
Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at 10:05:00

The contents of the data dictionary showed that some data dictionary needs to be converted :
Data Dictionary Tables:

Datatype                    Changeless      Convertible       Truncation            Lossy
--------------------- ---------------- ---------------- ---------------- ----------------
VARCHAR2                    18,427,017              412                0                0
CHAR                            16,903                0                0                0
LONG                           204,199                0                0                0
CLOB                         1,336,770           31,521                0                0
VARRAY                          20,577                0                0                0
--------------------- ---------------- ---------------- ---------------- ----------------
Total                       20,005,466           31,933                0                0
Total in percentage             99.841%           0.159%           0.000%           0.000%

As you can see the re 412 VARCHAR2 are convertible and regarding the 31,521 CLOB.The "Convertible"  CLOB in   Data Dictionary  will be handled by Csalter.
No manual action is required on CLOB "Convertible"   because CSALTER will handle it.

Now we should drop the schemas containing the data under User / Application Data that need action before using Csalte or the csalter will not work.

After backing data/database and dropping this data you can check if you have done your job well by running the below query:

conn / AS sysdba
SELECT DISTINCT z.owner_name
|| '.'
|| z.table_name
|| '('
|| z.column_name
|| ') - '
|| z.column_type
|| ' - '
|| z.error_type
|| ' ' UserColumns
FROM csmig.csmv$errors z
WHERE z.owner_name NOT IN
(SELECT DISTINCT username FROM csmig.csm$dictusers
)
ORDER BY UserColumns
/

to check the data dictionary tables that need manual interaction when using csalter that generated the 412 varchar2 above use this query:

conn / AS sysdba
SELECT DISTINCT z.owner_name
|| '.'
|| z.table_name
|| '('
|| z.column_name
|| ') - '
|| z.column_type
|| ' - '
|| z.error_type
|| ' ' NotHandledDataDictColumns
FROM csmig.csmv$errors z
WHERE z.owner_name IN
(SELECT DISTINCT username FROM csmig.csm$dictusers
) minus
SELECT DISTINCT z.owner_name
|| '.'
|| z.table_name
|| '('
|| z.column_name
|| ') - '
|| z.column_type
|| ' - '
|| z.error_type
|| ' ' DataDictConvCLob
FROM csmig.csmv$errors z
WHERE z.error_type ='CONVERTIBLE'
AND z.column_type = 'CLOB'
AND z.owner_name IN
(SELECT DISTINCT username FROM csmig.csm$dictusers
)
ORDER BY NotHandledDataDictColumns
/

In my case it showed that the error in table  SYS.WRI$_*  and Typically this is seen in SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.

Refering to note:

This is being solved by applying the below steps:

To clear EPVALUE of SYS.WRI$_OPTSTAT_HISTGRM_HISTORY execute:

Do not update or truncate SYS.WRI$_OPTSTAT_HISTGRM_HISTORY itself

Conn / as sysdba
-- check the current retention of stats
-- the default value is 31
select systimestamp - dbms_stats.get_stats_history_availability from dual;
-- now disable stats retention
exec dbms_stats.alter_stats_history_retention(0);
-- remove all stats
DECLARE
ts  TIMESTAMP WITH TIME ZONE;
BEGIN
SELECT SYSTIMESTAMP INTO ts FROM dual;
dbms_stats.purge_stats(ts);
END;
-- check there are no more left
select count(*) from SYS.WRI$_OPTSTAT_HISTGRM_HISTORY;
-- this will clear SYS.WRI$_OPTSTAT_HISTGRM_HISTORY(EPVALUE )

-- now run the csscan again to see the new fixes we did and then run csalter.
exec dbms_stats.alter_stats_history_retention(31);

Running the csscan showed that no data dictionary tables need conversion and the csalter successfully worked :
The content of charcheck.txt after running csscan and csalter:
[Data Dictionary Conversion Summary]

Data Dictionary Tables:

Datatype                    Changeless      Convertible       Truncation            Lossy
--------------------- ---------------- ---------------- ---------------- ----------------
VARCHAR2                    16,275,600                0                0                0
CHAR                            16,860                0                0                0
LONG                           204,199                0                0                0
CLOB                         1,243,848           31,585                0                0
VARRAY                          20,577                0                0                0
--------------------- ---------------- ---------------- ---------------- ----------------
Total                       17,761,084           31,585                0                0
Total in percentage             99.822%           0.178%           0.000%           0.000%
The data dictionary can be safely migrated using the CSALTER script
[Application Data Conversion Summary]

Datatype                    Changeless      Convertible       Truncation            Lossy
--------------------- ---------------- ---------------- ---------------- ----------------
VARCHAR2                             0                0                0                0
CHAR                                 0                0                0                0
LONG                                 0                0                0                0
CLOB                                 0                0                0                0
VARRAY                               0                0                0                0
--------------------- ---------------- ---------------- ---------------- ----------------
Total                                0                0                0                0
Total in percentage              0.000%           0.000%           0.000%           0.000%

Running CSALTER script:

[oracle@radbstage1 oracleup3]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 5 12:09:24 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> @?/rdbms/admin/csalter.plb

0 rows created.


Function created.


Function created.


Procedure created.

This script will update the content of the Oracle Data Dictionary.
Please ensure you have a full backup before initiating this procedure.
Would you like to proceed (Y/N)?y
old   6:     if (UPPER('&conf') <> 'Y') then
new   6:     if (UPPER('y') <> 'Y') then
Checking data validity...
begin converting system objects
1 row in table SYS.RULE$ is converted
2778 rows in table SYS.SCHEDULER$_EVENT_LOG are converted
2555 rows in table SYS.WRH$_SQLTEXT are converted
1788 rows in table SYSMAN.MGMT_IP_REPORT_ELEM_PARAMS are converted
20551 rows in table SYS.WRI$_ADV_SQLT_PLANS are converted
27 rows in table SYS.WRI$_REPT_FILES are converted
21 rows in table SYS.WRI$_DBU_HWM_METADATA are converted
10072 rows in table SYS.WRI$_ADV_RATIONALE are converted
130 rows in table SYSMAN.MGMT_IP_ELEM_DEFAULT_PARAMS are converted
5591 rows in table SYS.WRI$_ADV_OBJECTS are converted
31 rows in table SYSMAN.MGMT_IP_SQL_STATEMENTS are converted
3326 rows in table SYS.WRI$_ADV_ACTIONS are converted
171 rows in table SYS.WRI$_DBU_FEATURE_METADATA are converted
179 rows in table SYS.METASTYLESHEET are converted
5 rows in table SYS.WRI$_ADV_DIRECTIVE_META are converted
5301 rows in table SYS.WRI$_ADV_SQLT_PLAN_STATS are converted
64548 rows in table SYS.WRH$_SQL_PLAN are converted
164 rows in table SYS.WRI$_DBU_FEATURE_USAGE are converted

PL/SQL procedure successfully completed.

Alter the database character set...
CSALTER operation completed, please restart database

PL/SQL procedure successfully completed.


0 rows deleted.


Function dropped.


Function dropped.


Procedure dropped.


Restart the database and import data back :

;;; 
Import: Release 11.2.0.3.0 - Production on Wed Sep 5 13:01:12 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
;;; 
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
Master table "SYS"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_SCHEMA_01":  /******** AS SYSDBA directory=DATA_PUMP_DIR dumpfile=schemas-backup-5-9-2012.dmp logfile=schemas-backup-import-5-9-2012.log schemas=APPADMTST,RFETECMUCADM,RFETECMUCAPP,RFETEPRTADM,RFETEPRTAPP,RFETEUCADM,RFETEUCAPP,RFETEUCDAT,RTETECMUCADM,RTETECMUCAPP,RTETEPRTADM,RTETEPRTAPP,RTETEUCADM,RTETEUCAPP,RTETEUCDAT 
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "RTETEUCADM"."SCH_T_FILE_PART"              149.8 MB  604267 rows
...........................................
. . imported "RTETEUCDAT"."SUBS_BSCS_AGG":"DEF"              0 KB       0 rows
. . imported "RTETEUCDAT"."TAP_OUT_IOT"                      0 KB       0 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PACKAGE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
Processing object type SCHEMA_EXPORT/FUNCTION/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA
Job "SYS"."SYS_IMPORT_SCHEMA_01" completed  at 13:07:53



End of the steps.Hope this helps.
Mohamed ELAzab


Wednesday 29 August 2012

Applying patch set update 11.2.0.3.3 to 11.2.0.3.0 on linux86-64 with no grid infrastructure

The steps to do the patching is listed below:
1-The patch needs opatch utility version 11.2.0.3.0 or later to apply this patch. Oracle recommends that you use the latest released OPatch 11.2, which is available for download from My Oracle Support patch 6880880 by selecting the 11.2.0.0.0 release.
For information about OPatch documentation, including any known issues, see My Oracle Support Note 293369.1 OPatch documentation list.

After downloading the Opatch expand it using unzip utility and move the Opatch directory inside the database home to Opatch.original.now copy the folder you expanded to the oracle home drectory.

The steps:
[oracle@caisvoim02 ~]$ unzip p6880880_112000_Linux-x86-64.zip
Archive:  p6880880_112000_Linux-x86-64.zip
   creating: OPatch/
   creating: OPatch/oplan/
  inflating: OPatch/oplan/README.html
  inflating: OPatch/oplan/README.txt
............................................................
   creating: OPatch/oplan/jlib/
  inflating: OPatch/crs/patch112.pl
  inflating: OPatch/crs/s_crsconfig_defs
  inflating: OPatch/crs/s_crsconfig_lib.pm
[oracle@caisvoim02 ~]$ ls
13923374                                p10404530_112030_Linux-x86-64_2of7.zip
OPatch                                  p13923374_112030_Linux-x86-64.zip
oradiag_oracle                          p6880880_112000_Linux-x86-64.zip
p10404530_112030_Linux-x86-64_1of7.zip
[oracle@caisvoim02 ~]$ mv $ORACLE_HOME/Opatch Opatch.original
[oracle@caisvoim02 ~]$ cp -rfp OPatch $ORACLE_HOME/
The patch 13923374 is for stand alone database only.
download the patch from metalink and unzip the patch using unzip utility. it should create a folder named 13923374 as shown below:

[oracle@caisvoim02 ~]$ unzip p13923374_112030_Linux-x86-64.zip
Archive:  p13923374_112030_Linux-x86-64.zip
   creating: 13923374/
  inflating: 13923374/patchmd.xml
   creating: 13923374/13923374/
   creating: 13923374/13923374/files/
   .........................................
   creating: 13923374/13343438/etc/xml/
  inflating: 13923374/13343438/etc/xml/ShiphomeDirectoryStructure.xml
  inflating: 13923374/13343438/etc/xml/GenericActions.xml
  inflating: 13923374/README.html
[oracle@caisvoim02 ~]$ ls
13923374                                p10404530_112030_Linux-x86-64_2of7.zip
OPatch                                  p13923374_112030_Linux-x86-64.zip
oradiag_oracle                          p6880880_112000_Linux-x86-64.zip
p10404530_112030_Linux-x86-64_1of7.zip
To apply the patch to stand alone database with no grid infrastructure make sure to shutdown the lisener and the database and follow below steps to apply PSU to the database:

[oracle@caisvoim02 dbhome_1]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 29 13:12:50 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      OIMDB
db_unique_name                       string      OIMDB
global_names                         boolean     FALSE
instance_name                        string      OIMDB
lock_name_space                      string
log_file_name_convert                string
processor_group_name                 string
service_names                        string      OIMDB
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
also we have to shutdown the listener:
[oracle@caisvoim02 dbhome_1]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 29-AUG-2012 13:14:06
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=caisvoim02)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                29-AUG-2012 13:13:57
Uptime                    0 days 0 hr. 0 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /app/oracle/diag/tnslsnr/caisvoim02/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=caisvoim02)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
LSNRCTL>
To apply the patch:
[oracle@caisvoim02 ~]$ cd 13923374 [oracle@caisvoim02 13923374]$ /app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply Oracle Interim Patch Installer version 11.2.0.3.0 Copyright (c) 2012, Oracle Corporation. All rights reserved. Oracle Home : /app/oracle/product/11.2.0/dbhome_1 Central Inventory : /app/oraInventory from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc OPatch version : 11.2.0.3.0 OUI version : 11.2.0.3.0 Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2012-08-29_12-24-15PM_1.log Verifying environment and performing prerequisite checks... Prerequisite check "CheckActiveFilesAndExecutables" failed. The details are: Following executables are active : /app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed. Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2012-08-29_12-24-15PM_1.log OPatch failed with error code 73 [oracle@caisvoim02 13923374]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 29-AUG-2012 11:24:45 Copyright (c) 1991, 2011, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=caisvoim02)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 27-AUG-2012 15:29:38 Uptime 1 days 19 hr. 55 min. 9 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /app/oracle/diag/tnslsnr/caisvoim02/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=caisvoim02)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) The listener supports no services The command completed successfully LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=caisvoim02)(PORT=1521))) The command completed successfully LSNRCTL> LSNRCTL> LSNRCTL> LSNRCTL> LSNRCTL> LSNRCTL> exit [oracle@caisvoim02 13923374]$ /app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply Oracle Interim Patch Installer version 11.2.0.3.0 Copyright (c) 2012, Oracle Corporation. All rights reserved. Password (optional): Unable to establish connection to Oracle Configuration Manager server. Hostname (https://ccr.oracle.com) is unknown. Unable to establish a network connection to Oracle. Specify the URL for an Oracle Support Hub in this format: http[s]://<OracleSupportHubHost>:<OracleSupportHubPort> If you do not wish to configure OCM through an Oracle Support Hub, enter NONE Oracle Support Hub URL: NONE Unable to establish a network connection to Oracle. If your systems require a proxy server for outbound Internet connections, enter the proxy server details in this format: [<proxy-user>@]<proxy-host>[:<proxy-port>] If you want to remain uninformed of critical security issues in your configuration, enter NONE Proxy specification: NONE Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/app/oracle/product/11.2.0/dbhome_1') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying sub-patch '13343438' to OH '/app/oracle/product/11.2.0/dbhome_1' Patching component oracle.rdbms.rsf, 11.2.0.3.0... Patching component oracle.rdbms, 11.2.0.3.0... Patching component oracle.rdbms.dbscripts, 11.2.0.3.0... Verifying the update... Applying sub-patch '13696216' to OH '/app/oracle/product/11.2.0/dbhome_1' Patching component oracle.rdbms.rsf, 11.2.0.3.0... Patching component oracle.rdbms, 11.2.0.3.0... Patching component oracle.sdo.locator, 11.2.0.3.0... Patching component oracle.sysman.console.db, 11.2.0.3.0... Patching component oracle.sysman.oms.core, 10.2.0.4.4... Verifying the update... Applying sub-patch '13923374' to OH '/app/oracle/product/11.2.0/dbhome_1' ApplySession: Optional component(s) [ oracle.network.cman, 11.2.0.3.0 ] not present in the Oracle Home or a higher version is found. Patching component oracle.rdbms.rsf, 11.2.0.3.0... Patching component oracle.rdbms, 11.2.0.3.0... Patching component oracle.rdbms.dbscripts, 11.2.0.3.0... Patching component oracle.network.rsf, 11.2.0.3.0... Patching component oracle.network.listener, 11.2.0.3.0... Patching component oracle.sysman.console.db, 11.2.0.3.0... Verifying the update... Composite patch 13923374 successfully applied. Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2012-08-29_12-24-59PM_1.log OPatch succeeded.

After applying the patch we have to load modified SQL files into the database:

SQL> startup ORACLE instance started. Total System Global Area 534462464 bytes Fixed Size 2230072 bytes Variable Size 239077576 bytes Database Buffers 285212672 bytes Redo Buffers 7942144 bytes Database mounted. Database opened. SQL> !ls $ORACLE_HOME/rdbms/admin/catbundle.sql /app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catbundle.sql SQL> @$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Generating apply and rollback scripts... Check the following file for errors: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/catbundle/catbundle_PSU_OIMDB_GENERATE_2012Aug29_11_31_10.log Apply script: /app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_OIMDB_APPLY.sql Rollback script: /app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_OIMDB_ROLLBACK.sql PL/SQL procedure successfully completed. Executing script file... SQL> COLUMN spool_file NEW_VALUE spool_file NOPRINT SQL> SELECT '/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/catbundle/' || 'catbundle_PSU_' || name || '_APPLY_' || TO_CHAR(SYSDATE, 'YYYYMonDD_hh24_mi_ss', 'NLS_DATE_LANGUAGE=''AMERICAN''') || '.log' AS spool_file FROM v$database; SQL> SPOOL &spool_file SQL> exec dbms_registry.set_session_namespace('SERVER') PL/SQL procedure successfully completed. SQL> PROMPT Processing Oracle Database Packages and Types... Processing Oracle Database Packages and Types... SQL> ALTER SESSION SET current_schema = sys; Session altered. SQL> @?/psu/scripts/bug9858539.sql SQL> Rem SQL> Rem $Header: rdbms/admin/bug9858539.sql /st_rdbms_11.2.0.3.0dbpsu/1 2012/04/19 06:42:27 mjangir Exp $ SQL> Rem SQL> Rem bug9858539.sql SQL> Rem SQL> Rem Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. SQL> Rem SQL> Rem NAME SQL> Rem bug9858539.sql - <one-line expansion of the name> SQL> Rem SQL> Rem DESCRIPTION SQL> Rem <short description of component this file declares/defines> SQL> Rem SQL> Rem NOTES SQL> Rem <other useful comments, qualifications, etc.> SQL> Rem SQL> Rem MODIFIED (MM/DD/YY) SQL> Rem mjangir 04/18/12 - Created SQL> Rem SQL> SQL> SET ECHO ON SQL> SET FEEDBACK 1 SQL> SET NUMWIDTH 10 SQL> SET LINESIZE 80 SQL> SET TRIMSPOOL ON SQL> SET TAB OFF SQL> SET PAGESIZE 100 SQL> SQL> -- load XSL stylesheets connect / as sysdba SQL> SQL> execute sys.dbms_metadata_util.load_stylesheets; PL/SQL procedure successfully completed. SQL> @?/rdbms/admin/prvsawr.plb SQL> /* ------------------------------------------------------------------------- > * DBMS_SWRF_REPORT_INTERNAL PACKAGE SQL> * SQL> * This package will handle the reporting for AWR. The report main SQL> * routine will be called by the dbms_workload_repository.awr_report SQL> * function. SQL> * ------------------------------------------------------------------------- */ SQL> /* SQL> * ------------------------------------------------------------------------- SQL> * DBMS_SWRF_REPORT_INTERNAL error code summary SQL> * SQL> * -20001 : error in the report main, at the top of the error stack SQL> * -20002: internal error in ith_displayable_child routine when passed SQL> * invalid arg tree_idx SQL> * -20003: internal error in ith_displayable child routine when passed SQL> * invalid arg child_idx SQL> * -20004: invalid argument passed to dflt_align_for_type, internally SQL> * -20005: error initializing the report due to missing snapshot data SQL> * -20006: missing start value for dba_hist_librarycache SQL> * -20007: missing end value for dba_hist_librarycache SQL> * -20008: missing init.ora param SQL> * -20009: missing system stat SQL> * -20010: missing start value for dba_hist_waitstat SQL> * -20011: missing end value for dba_hist_waitstat SQL> * -20012: missing start time wait value for dba_hist_system_event SQL> * -20013: missing end time wait value for dba_hist_system_event SQL> * -20014: missing start value for DBA_HIST_LATCH gets and misses SQL> * -20015: missing end value for DBA_HIST_LATCH gets and misses SQL> * -20016: missing value for SGASTAT SQL> * -20017: Missing start value for DLM statistic SQL> * -20018: Missing end value for DLM statistic SQL> * -20019: invalid begin_snap/end_snap pair specified by user SQL> * -20020: invalid dbid/inst_num pair specified by user SQL> * -20021: missing start value for time model stat SQL> * -20022: missing end value for time model stat SQL> * -20023: missing start and end values for time model stat SQL> * -20024: failed to reset time zone SQL> * SQL> * -20100: invalid flush level specified to create_snapshot SQL> * -20101: no valid snapshots in range (bid, eid) for database id dbid SQL> * -20102: user name 'schname' is invalid SQL> * -20103: directory name 'dmpdir' is invalid SQL> * -20104: not allowed to specify the 'SYS' user SQL> * -20105: unable to move AWR data from schema to SYS SQL> * -20106: cannot move data from newer AWR schema SQL> * -20107: not allowed to move AWR data for local dbid SQL> * -20108: cannot move data from newer AWR schema SQL> * -20109: error encountered during move_to_awr SQL> * -20110: invalid Top N SQL value. not allowed to specify 0 or 1. SQL> * -20111: invalid Top N SQL string: topnsql SQL> * SQL> * -20500: Invalid input to generate ASH report SQL> * -20501: Invalid input to helper function to create report SQL> * SQL> * -20600: Invalid (dbid, version) for DB Feature Usage SQL> * -20601: Invalid (dbid, version) for High Water Mark SQL> */ SQL> create or replace package dbms_swrf_report_internal wrapped 2 a000000 15 abcd 16 abcd 17 abcd 18 abcd 19 9 20 9738 206d 21 evIH7Hvw061aB+cWkM5JC6OuMFkwg1VMHscFYaeacjrVV7y3DcdJ3qL8THiQa1paBuxmiKyb 22 jA9XGGLG7MWn6vETn7ADqvjhj5mPHXsaiVXaHinNLqTk/61XlnZ2qRqw/eqSNj4oD7zNFVX+ 135 136 / Package created. SQL> SHOW ERRORS; No errors. SQL> @?/rdbms/admin/prvtawr.plb SQL> /* ------------------------------------------------------------------------- > * DBMS_SWRF_REPORT_INTERNAL PACKAGE BODY SQL> * SQL> * This package will handle the reporting for AWR. It will have the SQL> * following interfaces: SQL> * ------------------------------------------------------------------------- */ SQL> create or replace package body dbms_swrf_report_internal wrapped 2 a000000 3 1 12 abcd 13 abcd 14 abcd 15 abcd 16 abcd 17 abcd 18 abcd 19 b 20 8a8a7 1752c 21 kJdswIBy2atlN05e2rPpIOORqLYwg4pz9hL9eMIWXz/BZN3/owOhG6BW+qHJ4JWtrrd+oXpI 22 wilIJcIXZHOba2yDPIiT0sjDZYfau/nNWwK6hhl9GzItgEFfYvdna2lcTcWOngJSdxKIkNtN 23 EzOaUW2/TzwDgSwK/gM9Bk7ADVhMhyBvCh46lKtd8DnmpSw61mn1p9fCMG7JtzFwIXV0UZGl .....................................................
...................................................... 1329 ka1oEYTwlxs7hcqGoJE+iYdHcoIUQG0UE5W3H7WGtR0rVWgD 1330 1331 / Package body created. SQL> show errors; No errors. SQL> /* -------------------------------------------- > * DBMS_WORKLOAD_REPOSITORY package body SQL> * -------------------------------------------- */ SQL> CREATE OR REPLACE PACKAGE BODY dbms_workload_repository wrapped 2 a000000 3 1 4 abcd 5 abcd ...............................
............................... 121 kDQP 122 123 / Package body created. SQL> SHOW ERRORS; No errors. SQL> @?/rdbms/admin/prvtawrs.plb SQL> CREATE OR REPLACE PACKAGE BODY dbms_awr_report_layout wrapped 2 a000000 3 1 4 abcd 5 abcd 6 abcd ..............................................
.............................................. 3114 ECNCCHK1wbVbMHoTLw== 3115 3116 / Package body created. SQL> SHOW ERRORS; No errors. SQL> ALTER SESSION SET current_schema = SYS; Session altered. SQL> PROMPT Updating registry... Updating registry... SQL> INSERT INTO registry$history 2 (action_time, action, 3 namespace, version, id, 4 bundle_series, comments) 5 VALUES 6 (SYSTIMESTAMP, 'APPLY', 7 SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'), 8 '11.2.0.3', 9 3, 10 'PSU', 11 'PSU 11.2.0.3.3'); 1 row created. SQL> COMMIT; Commit complete. SQL> SPOOL off SQL> SET echo off Check the following log file for errors: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/catbundle/catbundle_PSU_OIMDB_APPLY_2012Aug29_11_31_11.log SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

To check the oracle logs for the loading the modified sql into the database :

[oracle@caisvoim02 13923374]$ cd $ORACLE_HOME/cfgtoollogs/catbundle [oracle@caisvoim02 catbundle]$ ls catbundle_PSU_OIMDB_APPLY_2012Aug29_11_31_11.log catbundle_PSU_OIMDB_GENERATE_2012Aug29_11_31_10.log
 

References:

End of the steps.