Friday, May 31, 2013

Cacti:Change Time Zone

In cacti console, timestamp is found in UTC format, to fix it,
make change in /etc/php5/apache2/php.ini

date.timezone = 'Canada/Eastern'

Wednesday, May 29, 2013

Oracle 11g Stream: Change Stream Dump Location

Problem:

Non critical error ORA-48180 caught while writing to trace file "/usr2/app/oracle/diag/rdbms/GOWEEKENDCA/GOWEEKENDCA/trace/GOWEEKENDCA_ora_1436.trc"
Error message: SVR4 Error: 28: No space left on device
Additional information: 1
Writing to the above trace file is disabled for now on...
Errors in file /usr2/app/oracle/diag/rdbms/GOWEEKENDCA/GOWEEKENDCA/trace/GOWEEKENDCA_ora_1436.trc:
ORA-19502: write error on file "/usr2/app/oracle/admin/GOWEEKENDCA/dpdump/streams_setup_2013_5_28_14_22_50_896.dmp", block number 3617537 (block size=4096)
ORA-27063: number of bytes read/written is incorrect
SVR4 Error: 28: No space left on device

Analysis:

In the Stream setup scripts, you can find below snippet, ORA_EM_STRM_DPUMP_10205 is the key to fix the problem. /usr2 ran out of space, either increase ORA_EM_STRM_DPUMP_10205 space or to map it to somewhere with enough space.

dbms_file_transfer.put_file(
source_directory_object => '"ORA_EM_STRM_DPUMP_10205"',
source_file_name => 'streams_setup_2013_5_28_14_22_50_896.dmp',
destination_directory_object => '"ORA_EM_STRM_DPUMP_10205"',
destination_file_name => 'streams_setup_2013_5_28_14_22_50_896.dmp',
destination_database => 'GOWEEKENDCA');


the directory is defined in dba_directories, but you cannot update it directly.

Solution:

Do below on both of source and destination instance accordingly

SQL> DROP DIRECTORY ORA_EM_STRM_DPUMP_10205;

Directory dropped.

SQL> create directory ORA_EM_STRM_DPUMP_10205 as '/dbfs/admin/GOWEEKENDCA/dpdump';

Directory created.

Tuesday, May 28, 2013

Oracle: Character Escape

' - Single Quote

SELECT 'goweekend.ca'||chr(39)||'s website' FROM Dual
 
 

Monday, May 27, 2013

Oracle 11g: Configure multiple Enterprise Manager on same server

before configure EM, ensure below environment variables are set properly:

export ORACLE_SID=GOWEEKEND
export ORACLE_UNQNAME=GOWEEKEND

$ emca -config dbcontrol db -repos create

other command might be needed:
emctl status dbconsole
emctl stop dbconsole
emctl start dbconsole
emca -deconfig dbcontrol db -repos drop

Friday, May 24, 2013

Upgrade Oracle 10g to 11g Journal

Planning:

Backing up Enterprise Manager Database Control Data
Catalog DB



Complete Checklist to Upgrade the Database to 11gR2 using DBUA [ID 870814.1]
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=481180426703885&id=870814.1&_afrWindowMode=0&_adf.ctrl-state=mqfm1zxvp_311

How to Download and Run Oracle's Database Pre-Upgrade Utility [ID 884522.1]
https://support.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?_afrLoop=481752990964660&id=884522.1&_afrWindowMode=0&_adf.ctrl-state=mqfm1zxvp_324

Updating the RDBMS DST version in 11g Release 2 (11.2.0.1 and up) using DBMS_DST [ID 977512.1]
https://support.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?_afrLoop=550068721629323&id=977512.1&_afrWindowMode=0&_adf.ctrl-state=136vgjhsg3_90

Check for INVALID database components and objects in the Source database
SQL> set pagesize500
       set linesize 100
      
       select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from
       dba_registry order by comp_name;
      
       select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from
       dba_objects where status='INVALID' order by owner,object_type;
      
       select owner,object_type,count(*) from dba_objects where status='INVALID' group by
       owner,object_type order by owner,object_type ;


$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus "/ as sysdba"
SQL> @utlrp.sql


Remove Public SYNONYM XMLCONCAT
sqlplus / as sysdba
SQL> select SYNONYM_NAME,OWNER from all_synonyms where SYNONYM_NAME = 'XMLCONCAT';

SQL> drop public synonym XMLCONCAT;

Synonym dropped.

Optimizer Statistics
EXECUTE dbms_stats.gather_dictionary_stats;
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
      WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE'  2  ;

no rows selected

SQL> SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
      WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'  2  ;

no rows selected

To decrease the amount of downtime incurred when collecting statistics, you can collect statistics prior to performing the actual database upgrade. As of Oracle Database 10g Release 1 (10.1), Oracle recommends that you use the DBMS_STATS.GATHER_DICTIONARY_STATS procedure to gather these statistics. For example, you can enter the following:
$ sqlplus "/as sysdba"
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;


Post Upgrade

mkdir -p /usr2/app/oracle/product/11.2.0.3/admin/DBINSTANCE/adump

mkdir -p $ORACLE_HOME/admin/DBINSTANCE/cdump

SQL> show parameter core_dump_dest
SQL> alter system set core_dump_dest='/usr2/app/oracle/product/11.2.0.3/admin/DBINSTANCE/cdump' scope=both;
SQL> show parameter audit
SQL> alter system set audit_file_dest='/usr2/app/oracle/product/11.2.0.3/admin/DBINSTANCE/adump' scope=spfile;

SQL> ALTER SYSTEM SET COMPATIBLE = '11.2.0' SCOPE=spfile;

System altered.

SQL> shutdown immediate

show parameter DB_RECOVERY_FILE_DEST

alter system set db_recovery_file_dest='/usr2/app/oracle/product/11.2.0.3/flash_recovery_area/DBINSTANCE' scope=both;

check current RDBMS DST version and "DST UPGRADE STATUS" in your 11.2.0.x database.
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;

Check UPFRONT using DBMS_DST if there is affected data that cannot be resolved automatically in your 11.2.0.x database.

$ cd $ORACLE_HOME/dbs

$ orapwd file=orapwDBINSTANCE entries=10

SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;

LOG_MODE
------------
NOARCHIVELOG

QL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1820540928 bytes
Fixed Size                  2229304 bytes
Variable Size             452987848 bytes
Database Buffers         1358954496 bytes
Redo Buffers                6369280 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.

SQL> alter database open;
Database altered.













Configure emca

Drop existing EM repository

emca -deconfig dbcontrol db -repos drop

if doesn't work,

Manually drop EM Repository
exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'SYSMAN.MGMT_NOTIFY_QTABLE',force=>TRUE);

SHUTDOWN IMMEDIATE;

STARTUP RESTRICT;
EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
EXEC sysman.setEMUserContext('',5);
REVOKE dba FROM sysman;


DECLARE
CURSOR c1 IS
 SELECT owner, synonym_name name FROM dba_synonyms
 WHERE table_owner = 'SYSMAN';

BEGIN
FOR r1 IN c1
LOOP IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
 END IF;
 END LOOP;
END;
/
DROP ROLE mgmt_user;
DROP user mgmt_view cascade;
DROP user sysman cascade;
ALTER SYSTEM DISABLE RESTRICTED SESSION;


select username, account_status, created from dba_users where username in ('SYSMAN');

emca -config dbcontrol db -repos create -silent -respFile /usr2/app/oracle/product/11.2.0.3/admin/DBINSTANCE/emca.rsp

$ cat /usr2/app/oracle/product/11.2.0.3/admin/DBINSTANCE/emca.rsp
        ORACLE_HOSTNAME: dbserver.goweekend.ca
        SID: DBINSTANCE
        PORT: 1521
        ORACLE_HOME: /usr2/app/oracle/product/11.2.0.3
        DBSNMP_PWD: <password>
        SYSMAN_PWD: <password>
        SYS_PWD: <password>

or

emca -config dbcontrol db -repos create

Thursday, May 23, 2013

Solaris 11 Cheat Sheet

http://www.oracle.com/technetwork/server-storage/solaris11/documentation/solaris-11-cheat-sheet-1556378.pdf

Complete Checklist to Upgrade the Database to 11gR2 using DBUA [ID 870814.1]

[Thread-105] [ 2013-03-19 09:38:20.323 GMT-05:00 ] [BasicStep.handleNonIgnorableError:430]  oracle.sysman.assistants.util.UIMessageHandler@3d3c4c09:messageHandler
[Thread-105] [ 2013-03-19 09:38:20.323 GMT-05:00 ] [BasicStep.handleNonIgnorableError:431]  ORA-04063: package body "SYS.DBMS_SQLTUNE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SQLTUNE"
ORA-06512: at "SYS.DBMS_STATS", line 20337
ORA-06512: at "SYS.DBMS_STATS", line 20360
ORA-06512: at line 11

The problem is caused by the public synonym XMLCONCAT

Cause

The problem is caused by the public synonym XMLCONCAT
Solution

Start the database (from the 11gR2 home) in upgrade mode as below:


SQL> startup upgrade

1. Drop the synonym:
SQL> drop public synonym XMLCONCAT;

2. Recompile the package
SQL> alter package DBMS_SQLTUNE_INTERNAL compile body;

If the above is successful, then re-run CATUPGRD.SQL again:


In this Document


Purpose
Ask Questions, Get Help, And Share Your Experiences With This Article

Scope

Details
REQUIRED POST UPGRADE STEPS

References

Applies to:

Oracle Server - Enterprise Edition - Version 9.2.0.8 to 11.2.0.3 [Release 9.2 to 11.2]
Oracle Server - Standard Edition - Version 9.2.0.8 to 11.2.0.3 [Release 9.2 to 11.2]
Information in this document applies to any platform.

Purpose

The purpose of this article is to minimize the downtime while upgrading the database using DBUA.

DBUA automates the upgrade process by performing all of the tasks normally performed manually. There are some steps which can be performed when the database is running. If these steps can be done manually before upgrading using DBUA, the downtime can be minimized.

Ask Questions, Get Help, And Share Your Experiences With This Article

Would you like to explore this topic further with other Oracle Customers, Oracle Employees, and Industry Experts?

Click here to join the discussion where you can ask questions, get help from others, and share your experiences with this specific article.
Discover discussions about other articles and helpful subjects by clicking here to access the main My Oracle Support Community page for Database Install/Upgrade.

Scope

Database Administrators, Support

Details

Database Upgrade Assistant (DBUA)

- It Provides a graphical user interface (GUI) that guides you through the upgrade of a database.
- It is the recommended method for performing a major release upgrade or patch release upgrade.
- It automates the upgrade process by performing all of the tasks.
- It makes appropriate recommendations for configuration options such as tablespaces, redo, optimizer statistics and time zone file, etc. You can then act on these recommendations. This method is very easy and user friendly.
- Hidden parameters which are in the source database are not carried to the target database by DBUA, This is expected behavior. Oracle recommends removing all hidden parameters prior to upgrading.

To view existing hidden parameters execute the following command while connected AS SYSDBA:
SELECT name,description from SYS.V$PARAMETER WHERE name LIKE '\_%' ESCAPE '\'

Changes will need to be made in the init.ora or spfile if you are manually upgrading the database. If you are using the DBUA then it is taken care by DBUA.

DBUA performs some of the checks before actually starting the database upgrade.
So those steps and recommendations can be performed when the database is in normal startup mode. By performing these steps manually, the down time can be minimized.

DBUA performs the following checks before the upgrade:

=> Invalid user accounts or roles
=> Invalid data types or invalid objects
=> De-supported character sets
=> Adequate resources, including rollback segments, tablespaces, and free disk space
=> Missing SQL scripts needed for the upgrade
=> Listener running (if Oracle Enterprise Manager Database Control upgrade or configuration is requested)
=> Oracle Database software linked with Database Vault option. If Database Vault is enabled, then DBUA will return an error asking you to disable Database Vault prior to upgrade. See "Disable Oracle Database Vault"
=> Stale optimizer statistics
=> Time zone file versions
=> Enterprise Manager Database control Repository exists in the database or not
Recommendations for Source database

1) Ensure that all database components/objects provided by Oracle are VALID  in the source database  prior to starting the upgrade.
2) Ensure that you do not have duplicate objects in the SYS and SYSTEM schema.
The following objects are permissible duplicate objects:
 OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------
AQ$_SCHEDULES TABLE
AQ$_SCHEDULES_PRIMARY INDEX
DBMS_REPCAT_AUTH PACKAGE
DBMS_REPCAT_AUTH PACKAGE BODY
 Please refer to the following article for complete instructions to remove any other duplicates.
NOTE.1030426.6 HOW TO CLEAN UP DUPLICATE OBJECTS OWNED BY SYS AND SYSTEM
Note: All these checks are done when you execute step 3 (dbupgdiag.sql)
3) Disable the custom triggers that would fire before/after DDL and enable them after the upgrade is complete.

Requirements and recommendations  for target database
  • Download and Install Oracle 11g Release 2 in a new Oracle Home and make sure there are no relinking errors.
  • Install the latest available Patchset from Metalink. (If available).
  • Install the latest available Critical Patch Update. (If available).
  • Either take a Cold or Hot backup of your source database (advisable to have cold backup).
  • Check the database server upgrade/downgrade compatibility before upgrading the database.
Compatibility Matrix

Minimum Version of the database that can be directly upgraded to Oracle 11g Release 2

Source Database                Target Database
9.2.0.8 or higher                    11.2.x
10.1.0.5 or higher                  11.2.x
10.2.0.2 or higher                  11.2.x
11.1.0.6 or higher                  11.2.x

The following database version will require an indirect upgrade path.

Source Database ---> Upgrade Path for Target Database--->Target Database
7.3.3 (or lower)----->   7.3.4 --->   9.2.0.8 ---->11.2.x
8.0.5 (or lower)---->    8.0.6 --->    9.2.0.8 ---->11.2.x
8.1.7 (or lower)---->    8.1.7.4---> 10.2.0.4---->11.2.x
9.0.1.3 (or lower)----> 9.0.1.4-- ->10.2.0.4---->11.2.x
9.2.0.7(or lower)---->9.2.0.8---->11.2.x

For example:

If source database is 8.1.7.0.0, the upgrade path to be followed is as below:
8.1.7.0.0 --> 8.1.7.4 --> 10.2.0.4--> 11.2.x.

NOTE: DBUA throws the following error if not on minimum version:
"The CEP File does not provide the version directive"


Run the Pre-Upgrade Information Tool for Collecting Pre-Upgrade Information

To download and use the latest Pre-Upgrade Information Tool see the following:

Note 884522.1: How to Download and Run Oracle's Database Pre-Upgrade Utility

or

Step 1
-------
  •   Log in to the system as the owner of the Oracle Database 11g Release 2 (11.2) Oracle Home directory.
  •   Copy the Pre-Upgrade Information Tool (utlu112i.sql) from the Oracle Database 11g Release 2 (11.2) ORACLE_HOME/rdbms/admin directory to a directory outside of the Oracle Home, such as the temporary directory on your system.

$ORACLE_HOME/rdbms/admin/utlu112i.sql


Step 2
-------
  •   Change to the directory where utlu112i.sql had been copied in the previous step.
  •   Start SQL*Plus and connect to the database instance as a user with SYSDBA privileges. Then run and spool the utlu112i.sql file. Please note that the database should be started using the Source Oracle Home.

$ sqlplus '/ as sysdba'
SQL> spool upgrade_info.log
SQL> @utlu112i.sql
SQL> spool off


Check the spool file and examine the output of the Upgrade Information Tool.
The sections which follow describe the output of the Upgrade Information Tool.
For sample output, Click here

Check for INVALID database components and objects in the Source database

Ensure that there are NO INVALID database components/objects in the source database prior to starting the upgrade.
You can execute the following query to check the invalid database components/objects in the source database:
set pagesize500
       set linesize 100
     
       select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from
       dba_registry order by comp_name;
     
       select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from
       dba_objects where status='INVALID' order by owner,object_type;
     
       select owner,object_type,count(*) from dba_objects where status='INVALID' group by
       owner,object_type order by owner,object_type ;

If you find invalid objects and/or database components then try to VALIDATE the invalid objects and/or database components by executing the following steps:

Run $ORACLE_HOME/rdbms/admin/utlrp.sql to validate the invalid objects in the database. You can execute the utlrp.sql scripts multiple times to validate the invalid objects.
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus "/ as sysdba"
SQL> @utlrp.sql 

You may get the following warning message if recommended checks are not done prior to upgrade:
Oracle Corporation strongly recommends that the following issues be resolved in the database "upgrade" before you start the database upgrade .

Database is using the old time zone file version. After the upgrade ,patch the database timezone file version using the DBMS_DST package to record the latest time zone file Version

Database contains stale optimizer statistic. Refer to the Upgrade Guide for instruction to update statistics prior to upgrade the database

Enterprise manager Database Control Repository exists  in the database . Direct downgrade of the Enterprise Manager Control is not supported . Refer to the 11g  Upgrade Guide for the instruction to save the Enterprise manager data prior to upgrade

Do you want to continue with upgrade ?

Check for TIMESTAMP WITH TIMEZONE Datatype

The time zone files that are supplied with Oracle Database 11g Release 2 (11.2) have been updated to version 11 (11.2.0.1) and 14 (11.2.0.2/11.2.0.3)to reflect changes in transition rules for some time-zone regions.
The changes might affect existing data of the TIMESTAMP WITH TIME ZONE data type.


Case 1
--------

Output of pre-upgrade utility is showing a statement like :
WARNING: -->Database is using a timezone file older than .....


If the source database is using a timezone file lower or equal to :
- version 11 and target oracle home is 11.2.0.1
or
- version 14 and target oracle home is 11.2.0.2/11.2.0.3

then nothing to do in source home , it is suggested to use DBMS_DST package AFTER the upgrade :
Note 977512.1 : Updating the RDBMS DST version in 11gR2 (11.2.0.1 and up) using DBMS_DST

Case 2
--------

Output of pre-upgrade utility is showing a statement like :
WARNING: --> Database is using a timezone file greater than ....

If the source database is using a timezone file greater than :
- version 11 and target oracle home is 11.2.0.1
or
- version 14 and target oracle home is 11.2.0.2/11.2.0.3

then BEFORE upgrading you MUST patch the 11gR2 $ORACLE_HOME with a timezone data file of the SAME version as the one used in the source release database.

For a detailed description of the time zone upgrade, please refer to the following :

Note 815679.1 : Actions For DST Updates When Upgrading To 11.2.0.1 Base Release
Note 1201253.1 : Actions For DST Updates When Upgrading To Or Applying The 11.2.0.2 Patchset
Note 1358166.1 : Actions For DST Updates When Upgrading To Or Applying The 11.2.0.3 Patchset

Once upgrade will be finished if you want to apply the last DST/TZ patch on target home then refer to :

Note 412160.1 :  Updated DST transitions and new Time Zones in Oracle Time Zone File patches

Note:
 The TIMESTAMP WITH TIME ZONE data stored in the database can become corrupted during the upgrade if there is a time zone file version mismatch.

Audit records From 10gr2 DBUA/catupgrd script can spend an infinite time to process the records in FGA_LOG$ and/or AUD$ if there are too many records.

See Note 1062993.1 : 11.2.0.1 Catupgrd.sql Hangs While Running Procedure POPULATE_DBID_AUDIT
For 10.2 and later source versions there is now a pre-process script available :
Note 1329590.1 : How to Pre-Process SYS.AUD$ Records Pre-Upgrade From 10.1 or later to 11gR1 or later.

If  do not want to keep the records collected before 11GR2  then you can just do in source environment :
truncate table sys.aud$;
truncate table sys.fga_log$;


Optimizer Statistics

When upgrading to Oracle Database 11g Release 2 (11.2), optimizer statistics are collected for dictionary tables that lack statistics. This statistics collection can be time consuming for databases with a large number of dictionary tables, but statistics gathering only occurs for those tables that lack statistics or are significantly changed during the upgrade.

To determine the schema's which lack statistics, download and run the script from below MOS article:
Note 560336.1  Script to Check Schemas with Stale Statistics

To decrease the amount of downtime incurred when collecting statistics, you can collect statistics prior to performing the actual database upgrade. As of Oracle Database 10g Release 1 (10.1), Oracle recommends that you use the DBMS_STATS.GATHER_DICTIONARY_STATS procedure to gather these statistics. For example, you can enter the following:
$ sqlplus "/as sysdba"
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

If you are using Oracle Database 9i Release 2 (9.2), then you should use the DBMS_STATS.GATHER_SCHEMA_STATS procedure to gather statistics. To do this, you can run the scripts provided in Appendix D.

Appendix D has sample script, which creates the table, dictstattab, and exports the statistics for the RDBMS component schema into it. The statistics collection might give errors if a particular component schema does not exist in the database, or if a component is not installed or invalid.

Backup the existing statistics to revert / import back the statistics, once the upgrade is successful.

For example, the following PL/SQL subprograms import the statistics for the SYS schema after deleting the existing statistics:
SQL> EXEC DBMS_STATS.DELETE_SCHEMA_STATS('SYS');
SQL> EXEC DBMS_STATS.IMPORT_SCHEMA_STATS('SYS','dictstattab');


Backing up Enterprise Manager Database Control Data

After upgrading to Oracle Database 11g release 2(11.2), if you want to downgrade Oracle Enterprise Manager Database Control you must save your Database Control files and data before upgrading your database. The emdwgrd utility can be used to keep a copy of your database control files and data before upgrading your database. The emdwgrd utility resides in the ORACLE_HOME/bin directory in the Oracle Database 11g release 2 (11.2) Home.

1. Set ORACLE_HOME to your old Oracle Home.
2. Set ORACLE_SID to the SID of the database being upgraded.
3. Set PATH, LD_LIBRARY_PATH and SHLIB_PATH to point to the Oracle Home from which the database is being upgraded.
4. Change directory to Oracle Database 11g release 2 (11.2) Home.
5. Run the following command:

a. Run the following command for single instance database:
$ emdwgrd -save -sid old_SID -path save_directory

where old_SID is the SID of the database being upgraded and save_directory is the path to the storage place you have chosen for your Database Control files and data.

Please refer to the following article for complete information:
Note 870877.1  How To Save Oracle Enterprise Manager Database Control Data Before Upgrading The Single Instance Database To Other Release ?

b. For a RAC database, remote copy is required across the cluster nodes. Define an environment variable to indicate which remote copy is configured. For example: setenv EM_REMCP /usr/bin/scp
$ emdwgrd -save -cluster -sid old_SID -path save_directory

Note: If 10g Oracle Home is on a shared device, add -shared to the previous command line.

The above command(s) may core dump on HP-UX Itanium platform, which is a known issue. For more information, refer to following MOS article:
Note 562980.1  - emdwgrd core dumps : emdwgrd[228]: 10366 Memory fault(coredump)

6. Enter the SYS password for the database to be upgraded.
Note: On RAC databases you will be prompted to run '/tmp/racdwgrd_dbctl.sh' on each of the nodes.


Disable Oracle Database Vault

When upgrading from Oracle Database Release 10.2, if you have enabled Oracle Database Vault option in your current Oracle Home, then you must disable Oracle Database Vault in the target Oracle home where the new release 11.2 software is installed before upgrading the database, and enable it again when the upgrade is finished. If Database Vault is enabled, then DBUA will return an error asking you to disable Database Vault prior to upgrade.

You must do this before upgrading the database. Enable Oracle Database Vault again once the upgrade is complete.

Please refer to the following Documentation/Articles for complete information to Disable/Enable Oracle Database Vault:

 Disabling and Enabling Oracle Database Vault

OR

You can also refer to the following MOS Documents for Disabling Oracle Database Vault before the upgrade and enabling it after the upgrade:

Note 803948.1 -  How To Uninstall Or Reinstall Database Vault in 11g (UNIX)
Note 453902.1  - Enabling and Disabling Oracle Database Vault in WINDOWS
Note 1085051.1 - 11gR2 DBUA Errors - Database Vault Option Is Enabled

Check Deprecated CONNECT Role


After upgrading to Oracle Database 11g Release 1 (11.2) from Oracle Database9i Release 2 (9.2) or Oracle Database 10g Release 1 (10.1), the CONNECT role has only the CREATE SESSION privilege; the other privileges granted to the CONNECT role in earlier releases are revoked during the upgrade. To identify which users and roles in your database are granted the CONNECT role, use the following query:
SELECT grantee FROM dba_role_privs
WHERE granted_role = 'CONNECT' and
grantee NOT IN (
'SYS', 'OUTLN', 'SYSTEM', 'CTXSYS', 'DBSNMP',
'LOGSTDBY_ADMINISTRATOR', 'ORDSYS',
'ORDPLUGINS', 'OEM_MONITOR', 'WKSYS', 'WKPROXY',
'WK_TEST', 'WKUSER', 'MDSYS', 'LBACSYS', 'DMSYS',
'WMSYS', 'EXFSYS', 'SYSMAN', 'MDDATA',
'SI_INFORMTN_SCHEMA', 'XDB', 'ODM');

If users or roles require privileges other than CREATE SESSION, then grant the specific required privileges prior to upgrade.
The upgrade scripts adjust the privileges for the Oracle-supplied users.

In Oracle 9.2.x and 10.1.x CONNECT role includes the following privileges:
SELECT GRANTEE,PRIVILEGE
FROM DBA_SYS_PRIVS
WHERE GRANTEE ='CONNECT'

GRANTEE PRIVILEGE
------- ----------------------
CONNECT CREATE VIEW
CONNECT CREATE TABLE
CONNECT ALTER SESSION
CONNECT CREATE CLUSTER
CONNECT CREATE SESSION
CONNECT CREATE SYNONYM
CONNECT CREATE SEQUENCE
CONNECT CREATE DATABASE LINK

From Oracle 10.2, 'CONNECT' role only includes 'CREATE SESSION' privilege.

Using the Oracle Net Configuration Assistant

 a) Stop the listener for the database.
$ lsnrctl stop

Previous versions of the listener are not supported for use with an Oracle Database 11g Release 2 (11.2) database. However, it is possible to use the new version of the listener with previous versions of Oracle Databases.
If you are upgrading from 9i  then run Oracle Net Configuration Assistant before upgrading the Oracle database.

This is a two-step option.
You must first run Oracle Net Configuration Assistant from the old Oracle Home to remove the old listener.
- Invoke the Netca
- Choose the configuration you want to do ==> Choose Listener Configuration
- Select what you want to do ==> Delete
- Select the listener you want to delete .

Then you must run Oracle Net Configuration Assistant again from the new Oracle Database 11g Release 2 (11.2) Home to create a new listener.

- Invoke the Netca
- Choose the configuration you want to do ==> Choose Listener Configuration
- Select what you want to do ==> Add
- Provide the detail that is required to configure the listener.

You must remove the old listener before creating a new one. If you attempt to create a new listener from the new Oracle Home first, and use the same name and port as the old listener, then Oracle Net Configuration Assistant returns an error.

Note: This is your only option if you want to upgrade your Oracle RAC database manually.

b) Stop other executable such as dbconsole, isqlplus, etc.
$ emctl stop dbconsole
$ isqlplusctl stop

Password protected rolesIn version 11.2 password protected roles are no longer enabled by default,
if any of your applications relies on such roles being enabled by default and you take no measures to allow
the user to enter the password with the set role command, it is recommended to remove the password
from those roles to allow for existing privileges to remain available, for more information see :

Note 745407.1 : What Roles Can Be Set as Default for a User?
Oracle Database Security Guide 10g Release 2 (10.2) Part Number B14266-07
Oracle Database Security Guide 11g Release 1 (11.1) Part Number B28531-15
Oracle Database Security Guide 11g Release 2 (11.2) Part Number E16543-09


Memory settings

Ensure that the SHARED_POOL_SIZE , LARGE_POOL_SIZE as well as the JAVA_POOL_SIZE are greater than 150MB (At least 250MB if you are running XDB)
else you may hit problems described in :

Note 789779.1 : DBUA Error ORA-04031 unable to allocate 4120 bytes of shared memory, ORA-01034: ORACLE not available, ORA-00600: internal error code, arguments: [504]
Note 1127179.1 ORA-07445 [qmkmgetConfig()+52] During Catupgrd.sql (11.2.0.1).



Starting Upgrade Using DBUA:


On Linux or UNIX platforms, enter the following command at a system prompt in the Oracle Database 11g Release 2 (11.2.0.x) environment:

Make sure that you are invoking the DBUA utility from the target Oracle home only .

You can invoke it  directly from the $ORACLE_HOME/bin of the target Oracle home
% cd $ORACLE_HOME/bin
% ./dbua

OR

Invoke it from any location by  setting ORACLE_BASE ,ORACLE_HOME and PATH environment variable pointing  to the target Oracle
% dbua

Note:
The dbua executable is usually located in the $ORACLE_HOME/bin directory.

On Windows operating systems, select:
Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Database Upgrade Assistant.
The DBUA Welcome screen appears.

REQUIRED POST UPGRADE STEPS

Please complete the following tasks after you have upgraded your database:
1)  Verify that the following environment variables are set to point to 11.2.0.x Installation:
ORACLE_BASE
ORACLE_HOME
PATH

Note: DBUA automatically points oratab to the new Oracle Home. However, client scripts must be checked no matter which method you use to upgrade.
If you are upgrading a cluster database, then perform these checks on all nodes on which this cluster database has instances configured.
2) Upgrade the Recovery Catalog
For complete information about upgrading the recovery catalog and the UPGRADE
CATALOG command, see Oracle Database Backup and Recovery User's Guide for the
topic that describes the procedures.
3) Upgrade the Time Zone File Version
If the Pre-Upgrade Information Tool instructed you to upgrade the time zone files after
completing the database upgrade, then use the DBMS_DST PL/SQL package to
upgrade the time zone file.

Note 977512.1 Updating the RDBMS DST version in 11gR2 (11.2.0.1 and up) using DBMS_DST

4) Upgrade Statistics Tables Created by the DBMS_STATS Package

If you created statistics tables using the DBMS_STATS.CREATE_STAT_TABLE
procedure, then upgrade these tables by running the following procedure:
EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE('scott', 'stat_table');

In the example, SCOTT is the owner of the statistics table and STAT_TABLE is the
name of the statistics table. Perform this procedure for each statistics table.

5)  Upgrade Externally Authenticated SSL Users

If you are upgrading from Oracle9i Release 2 (9.2) or Oracle Database 10g Release 1
(10.1), and you are using externally authenticated SSL users, then you must run the
SSL external users conversion (extusrupgrade) script to upgrade those users. The
script has the following syntax:
ORACLE_HOME/rdbms/bin/extusrupgrade --dbconnectstring
<hostname:port_no:sid> --dbuser <db admin> --dbuserpassword
<password> -a

Note:  If you are upgrading from Oracle Database 10g Release 2 (10.2) or higher, then you are not required to run this command.
6) Enable Database Vault

Refer to the following MOS Documents for enabling Oracle Database Vault:
Note 453903.1 - Enabling and Disabling Oracle Database Vault in UNIX
Note 453902.1 - Enabling and Disabling Oracle Database Vault in WINDOWS

7) Configure Fine-Grained Access to External Network Services

To avoid "ORA-24247: network access denied by access control list (ACL)" when executing UTL packages (Network related Packages), access has to be granted to user using these packages.

The following example first looks for any ACL currently assigned to host_name. If one is found, then the example grants user_name the CONNECT privilege in the ACL only if that user does not already have it. If no ACL exists for host_name, then the example creates a new ACL called ACL_name, grants the CONNECT privilege to user_name, and assigns the ACL to host_name.
DECLARE
acl_path VARCHAR2(4000);
BEGIN
SELECT acl INTO acl_path FROM dba_network_acls
WHERE host = 'host_name' AND lower_port IS NULL AND upper_port IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(acl_path,'principal','privilege') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl_path,'principal', is_grant, 'privilege');
END IF;
EXCEPTION
WHEN no_data_found THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('ACL_name.xml','ACL description', 'principal', is_grant, 'privilege');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('ACL_name.xml','host_name');
END;

COMMIT;

acl_name.xml => Enter a name for the access control list XML file.
ACL description => 'file description',
principal => 'user_or_role',
is_grant => TRUE|FALSE,
privilege => 'connect|resolve',
host_name => host name
Refer to the below note on how to use DBMS_NETWORK_ACL_ADMIN Package and also to avoid ORA-24247: network access denied by access control list (ACL):
Note 453786.1 ORA-24247 When Executing UTL_HTTP UTL_INADDR Packages

8) Change the compatible parameter to the new release after the upgrade.
After upgrading to Oracle Database 11g Release 2 (11.2), you can set the COMPATIBLE initialization parameter to match the release number of the new release. Doing so enables you to use all features of the new release, but prevents you from downgrading to your earlier release.
Oracle recommends increasing the COMPATIBLE parameter only after complete testing of the upgraded database has been performed.
After you increase the COMPATIBLE parameter, the database cannot subsequently be downgraded to earlier releases.
Known Issues
Note 1066828.1 11GR2 DBUA ORA-06550 PLS-00201 IDENTIFIER SYS.DBMS_JAVA MUST BE DECLARED

Revision History
03-Sep-2009 Article Created

The window below is a live discussion of this article (not a screenshot).  We encourage you to join the discussion by clicking the "Reply" link below for the entry you would like to provide feedback on.  If you have questions or implementation issues with the information in the article above, please share that below.

Oracle 11g: opatch exercise

oracle@goweekend.ca:/apps/oracle/patches$ ls                                                              
16056266                        p16056266_112030_SOLARIS64.zip                                        
oracle@goweekend.ca:/apps/oracle/patches$ cd 16056266/                                                    
oracle@goweekend.ca:/apps/oracle/patches/16056266$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./  
Oracle Interim Patch Installer version 11.2.0.3.4                                                     
Copyright (c) 2012, Oracle Corporation.  All rights reserved.                                         

PREREQ session

Oracle Home       : /usr2/app/oracle/product/11.2.0.3
Central Inventory : /usr2/app/oracle/oraInventory   
   from           : /usr2/app/oracle/product/11.2.0.3/oraInst.loc
OPatch version    : 11.2.0.3.4                                  
OUI version       : 11.2.0.3.0                                  
Log file location : /usr2/app/oracle/product/11.2.0.3/cfgtoollogs/opatch/opatch2013-05-23_14-00-29PM_1.log                                                                                                   

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
oracle@goweekend.ca:/apps/oracle/patches/16056266$ opatch apply                                           
Oracle Interim Patch Installer version 11.2.0.3.4                                                     
Copyright (c) 2012, Oracle Corporation.  All rights reserved.                                         


Oracle Home       : /usr2/app/oracle/product/11.2.0.3
Central Inventory : /usr2/app/oracle/oraInventory   
   from           : /usr2/app/oracle/product/11.2.0.3/oraInst.loc
OPatch version    : 11.2.0.3.4                                  
OUI version       : 11.2.0.3.0                                  
Log file location : /usr2/app/oracle/product/11.2.0.3/cfgtoollogs/opatch/opatch2013-05-23_14-14-14PM_1.log                                                                                                   

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   13343438  13696216  13923374  14275605  14727310  16056266 

Do you want to proceed? [y|n]
y                           
User Responded with: Y      
All checks passed.          
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.                                 
Visit http://www.oracle.com/support/policies.html for details.          
Email address/User Name:                                                

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y 



Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/usr2/app/oracle/product/11.2.0.3')                                 


Is the local system ready for patching? [y|n]
y                                           
User Responded with: Y                      
Backing up files...                         
Applying sub-patch '13343438' to OH '/usr2/app/oracle/product/11.2.0.3'

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 '/usr2/app/oracle/product/11.2.0.3'

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 '/usr2/app/oracle/product/11.2.0.3'
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...
Applying sub-patch '14275605' to OH '/usr2/app/oracle/product/11.2.0.3'
ApplySession: Optional component(s) [ oracle.precomp.lang, 11.2.0.3.0 ]  not present in the Oracle Home or a higher version is found.                                                                        

Patching component oracle.network.client, 11.2.0.3.0...

Patching component oracle.network.rsf, 11.2.0.3.0...

Patching component oracle.precomp.common, 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.rdbms.rman, 11.2.0.3.0...

Patching component oracle.rdbms.rsf, 11.2.0.3.0...

Patching component oracle.rdbms.util, 11.2.0.3.0...

Verifying the update...
Applying sub-patch '14727310' to OH '/usr2/app/oracle/product/11.2.0.3'

Patching component oracle.rdbms, 11.2.0.3.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.3.0...

Patching component oracle.rdbms.rsf, 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 '16056266' to OH '/usr2/app/oracle/product/11.2.0.3'
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.network.listener, 11.2.0.3.0...

Patching component oracle.network.rsf, 11.2.0.3.0...

Patching component oracle.ovm, 11.2.0.3.0...

Patching component oracle.rdbms, 11.2.0.3.0...

Patching component oracle.rdbms.rman, 11.2.0.3.0...

Patching component oracle.rdbms.rsf, 11.2.0.3.0...

Patching component oracle.sdo.locator, 11.2.0.3.0...

Patching component oracle.rdbms.deconfig, 11.2.0.3.0...

Verifying the update...

OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ld: warning: symbol '_start' has differing types:
        (file /usr2/app/oracle/product/11.2.0.3/lib/prod/lib/v9/crt1.o type=FUNC; file /usr2/app/oracle/product/11.2.0.3/lib//libserver11.a(skds.o) type=OBJT);


Composite patch 16056266 successfully applied.
OPatch Session completed with warnings.
Log file location: /usr2/app/oracle/product/11.2.0.3/cfgtoollogs/opatch/opatch2013-05-23_14-14-14PM_1.log

OPatch completed with warnings.
oracle@goweekend.ca:/apps/oracle/patches/16056266$

Oracle: Opatch Sample

Patch 16056266 - 11.2.0.3.6 Patch Set Update

Released: April 16, 2013
This document is accurate at the time of release. For any changes and additional information regarding PSU 11.2.0.3.6, see these related documents that are available at My Oracle Support (http://support.oracle.com/):
  • Document 1525152.1 Patch Set Update and Critical Patch Update April 2013 Availability Document
  • Document 854428.1 Patch Set Updates for Oracle Products
  • Document 1523829.1 Oracle Database Patch Set Update 11.2.0.3.6 Known Issues
This document includes the following sections:

1 Patch Information

Patch Set Update (PSU) patches are cumulative. That is, the content of all previous PSUs is included in the latest PSU patch.
PSU 11.2.0.3.6 includes the fixes listed in Section 7, "Bugs Fixed by This Patch".
To install the PSU 11.2.0.3.6 patch, the Oracle home must have the 11.2.0.3.0 Database installed. Subsequent PSU patches can be installed on Oracle Database 11.2.0.3.0 or any PSU with a lower 5th numeral version than the one being installed.
This patch is Oracle RAC Rolling Installable.
This patch is Data Guard Standby-First Installable. See My Oracle Support Document 1265700.1 Oracle Patch Assurance - Data Guard Standby-First Patch Apply for details on how to remove risk and reduce downtime when applying this patch.
This patch contains a security fix due to which a SELECT query's plan MAY change under the following conditions:
  • The SELECT queries a table protected with a Fined Grained Auditing policy
  • And the policy condition is NULL
Table 1 describes installation types and security content. For each installation type, it indicates the most recent PSU patch to include new security fixes that are pertinent to that installation type. If there are no security fixes to be applied to an installation type, then "None" is indicated. If a specific PSU is listed, then apply that or any later PSU patch to be current with security fixes.
Table 1 Installation Types and Security Content
Installation Type Latest PSU with Security Fixes
Server homes
PSU 11.2.0.3.6
Client-Only Installations
PSU 11.2.0.3.4 to address CVE-2012-3151
Instant Client Installations
None
(The Instant Client installation is not the same as the client-only Installation. For additional information about Instant Client installations, see Oracle Call Interface Programmer's Guide.)

2 Prerequisites

This section includes the following section:

2.1 OPatch Utility

You must use the 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 Document 293369.1 OPatch documentation list.

3 Installation

These instructions are for all Oracle Database installations.

3.1 Patch Pre-Installation Instructions

Before you install PSU 11.2.0.3.6, perform the following actions to check the environment and to detect and resolve any one-off patch conflicts.

3.1.1 Environments with Grid Infrastructure

If you are installing the PSU to an environment that has a Grid Infrastructure home, note the following:
  • Grid Infrastructure PSU 11.2.0.3.6 Patch 16083653 should be applied to the Grid Infrastructure home and Database home using the readme instructions provided with the patch.

3.1.2 Environment Checks

  1. Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.
    The location of these executables depends on your operating system. On many operating systems, they are located in /usr/ccs/bin, in which case you can set your PATH definition as follows:
    export PATH=$PATH:/usr/ccs/bin
    

3.1.3 One-off Patch Conflict Detection and Resolution

For an introduction to the PSU one-off patch concepts, see "Patch Set Updates Patch Conflict Resolution" in My Oracle Support Document 854428.1 Patch Set Updates for Oracle Products.
The fastest and easiest way to determine whether you have one-off patches in the Oracle home that conflict with the PSU, and to get the necessary conflict resolution patches, is to use the Patch Recommendations and Patch Plans features on the Patches & Updates tab in My Oracle Support. These features work in conjunction with the My Oracle Support Configuration Manager. Recorded training sessions on these features can be found in Document 603505.1.
However, if you are not using My Oracle Support Patch Plans, follow these steps:
  1. Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
    unzip p16056266_11203_<platform>.zip
    cd 16056266
    opatch prereq CheckConflictAgainstOHWithDetail -ph ./
    
  2. The report will indicate the patches that conflict with PSU 16056266 and the patches for which PSU 16056266 is a superset.
    Note that Oracle proactively provides PSU 11.2.0.3.6 one-off patches for common conflicts.
  3. Use My Oracle Support Document 1321267.1 Database Patch conflict resolution to determine, for each conflicting patch, whether a conflict resolution patch is already available, and if you need to request a new conflict resolution patch or if the conflict may be ignored.
  4. When all the one-off patches that you have requested are available at My Oracle Support, proceed with Section 3.2, "Patch Installation Instructions".

3.2 Patch Installation Instructions

Follow these steps:
  1. If you are using a Data Guard Physical Standby database, you must install this patch on both the primary database and the physical standby database, as described by My Oracle Support Document 278641.1.
  2. If this is a RAC environment, install the PSU patch using the OPatch rolling (no downtime) installation method as the PSU patch is rolling RAC installable. Refer to My Oracle Support Document 244241.1 Rolling Patch - OPatch Support for RAC.
  3. If this is not a RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.
  4. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:
    unzip p16056266_11203_<platform>.zip
    cd 16056266
    opatch apply
    
  5. If there are errors, refer to Section 5, "Known Issues".

3.3 Patch Post-Installation Instructions

After installing the patch, perform the following actions:
  1. Apply conflict resolution patches as explained in Section 3.3.1.
  2. Load modified SQL files into the database, as explained in Section 3.3.2.
  3. Upgrade Oracle Recovery Manager catalog, as explained in Section 3.3.3.

3.3.1 Applying Conflict Resolution Patches

Apply the patch conflict resolution one-off patches that were determined to be needed when you performed the steps in Section 3.1.3, "One-off Patch Conflict Detection and Resolution".

3.3.2 Loading Modified SQL Files into the Database

The following steps load modified SQL files into the database. For a RAC environment, perform these steps on only one node.
  1. For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
    cd $ORACLE_HOME/rdbms/admin
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> STARTUP
    SQL> @catbundle.sql psu apply
    SQL> QUIT
    
    The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series PSU.
    For information about the catbundle.sql script, see My Oracle Support Document 605795.1 Introduction to Oracle Database catbundle.sql.
  2. Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle or $ORACLE_BASE/cfgtoollogs/catbundle for any errors:
    catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
    catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log
    
    where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, refer to Section 5, "Known Issues".

3.3.3 Upgrade Oracle Recovery Manager Catalog

If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it:
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;

3.4 Patch Post-Installation Instructions for Databases Created or Upgraded after Installation of PSU 11.2.0.3.6 in the Oracle Home

There are no actions required for databases that have been upgraded or created after installation of PSU 11.2.0.3.6.

4 Deinstallation

These instructions apply if you need to deinstall the patch.

4.1 Patch Deinstallation Instructions for a Non-RAC Environment

Follow these steps:
  1. Verify that an $ORACLE_HOME/rdbms/admin/catbundle_PSU_<database SID>_ROLLBACK.sql file exists for each database associated with this ORACLE_HOME. If this is not the case, you must execute the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" against the database before deinstalling the PSU.
  2. Shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.
  3. Run the OPatch utility specifying the rollback argument as follows.
    opatch rollback -id 16056266
    
  4. If there are errors, refer to Section 5, "Known Issues".

4.2 Patch Post-Deinstallation Instructions for a Non-RAC Environment

Follow these steps:

Note:
A known issue exists if 11.2.0.3.1 is deinstalled after deinstalling 11.2.0.3.2. See Section 5, "Known Issues".
  1. Start all database instances running from the Oracle home. (For more information, see Oracle Database Administrator's Guide.)
  2. For each database instance running out of the ORACLE_HOME, connect to the database using SQL*Plus as SYSDBA and run the rollback script as follows:
    cd $ORACLE_HOME/rdbms/admin
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> STARTUP
    SQL> @catbundle_PSU_<database SID>_ROLLBACK.sql
    SQL> QUIT
    
    In a RAC environment, the name of the rollback script will have the format catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql.
  3. Check the log file for any errors. The log file is found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, refer to Section 5, "Known Issues".

4.3 Patch Deinstallation Instructions for a RAC Environment

Follow these steps for each node in the cluster, one node at a time:

Note:
A known issue exists if 11.2.0.3.1 is deinstalled after deinstalling 11.2.0.3.2. See Section 5, "Known Issues".
  1. Shut down the instance on the node.
  2. Run the OPatch utility specifying the rollback argument as follows.
    opatch rollback -id 16056266
    
    If there are errors, refer to Section 5, "Known Issues".
  3. Start the instance on the node as follows:
    srvctl start instance
    

4.4 Patch Post-Deinstallation Instructions for a RAC Environment

Follow the instructions listed in Section Section 4.2, "Patch Post-Deinstallation Instructions for a Non-RAC Environment" only on the node for which the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" were executed during the patch application.
All other instances can be started and accessed as usual while you are executing the deinstallation steps.

5 Known Issues

For information about OPatch issues, see My Oracle Support Document 293369.1 OPatch documentation list.
For issues documented after the release of this PSU, see My Oracle Support Document 1523829.1 Oracle Database Patch Set Update 11.2.0.3.6 Known Issues.
Other known issues are as follows.
Issue 1   
The following ignorable errors may be encountered while running the catbundle.sql script or its rollback script:
ORA-29809: cannot drop an operator with dependent objects
ORA-29931: specified association does not exist
ORA-29830: operator does not exist
ORA-00942: table or view does not exist
ORA-00955: name is already used by an existing object
ORA-01430: column being added already exists in table
ORA-01432: public synonym to be dropped does not exist
ORA-01434: private synonym to be dropped does not exist
ORA-01435: user does not exist
ORA-01917: user or role 'XDB' does not exist
ORA-01920: user name '<user-name>' conflicts with another user or role name
ORA-01921: role name '<role name>' conflicts with another user or role name
ORA-01952: system privileges not granted to 'WKSYS'
ORA-02303: cannot drop or replace a type with type or table dependents
ORA-02443: Cannot drop constraint - nonexistent constraint
ORA-04043: object <object-name> does not exist
ORA-29832: cannot drop or replace an indextype with dependent indexes
ORA-29844: duplicate operator name specified 
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
ORA-06512: at line <line number>. If this error follow any of above errors, then can be safely ignored.
ORA-01927: cannot REVOKE privileges you did not grant
Issue 2   
If 11.2.0.3.1 is deinstalled after deinstalling 11.2.0.3.2, the deinstallation process inserts a row in the registry$history with the wrong version.
For example you might see the following:
20-MAR-12 11.37.18.860659 AM 2 ROLLBACK 11.2.0.3 PSU 11.2.0.3.2
20-MAR-12 11.42.27.015400 AM 2 ROLLBACK 11.2.0.3 PSU 11.2.0.3.2
The last row showing ROLLBACK 11.2.0.3 PSU 11.2.0.3.2 should be referencing 11.2.0.3.1.
As this is only a historical entry into registry$hisory, this has no impact and can be ignored.
This will be addressed in a future PSU release.

6 References

The following documents are references for this patch.
Document 293369.1 OPatch documentation list
Document 360870.1 Impact of Java Security Vulnerabilities on Oracle Products
Document 468959.1 Enterprise Manager Grid Control Known Issues
Document 16056266.8 Database 11.2.0.3.6 Patch Set Update (PSU)
Document 1449750.1 11.2.0.3 Patch Set Updates - List of Fixes in each PSU

7 Bugs Fixed by This Patch

This patch includes the following bug fixes.

7.1 CPU Molecules

CPU molecules in PSU 11.2.0.3.6:
PSU 11.2.0.3.6 contains all molecules previously released in PSU 11.2.0.3.5 and the following new PSU 11.2.0.3.6 molecules:

16314466 - DB-11.2.0.3-MOLECULE-033-CPUAPR2013

16314467 - DB-11.2.0.3-MOLECULE-034-CPUAPR2013

16314468 - DB-11.2.0.3-MOLECULE-035-CPUAPR2013

16314469 - DB-11.2.0.3-MOLECULE-036-CPUAPR2013

16314470 - DB-11.2.0.3-MOLECULE-037-CPUAPR2013

7.2 Bug Fixes

See My Oracle Support Document 1449750.1 that documents all the non-security bugs fixed in each 11.2.0.3 Patch Set Update (PSU).
PSU 11.2.0.3.6 contains the following new fixes:
Automatic Storage Management

16231699 - ADDING A NEW DISK ON ODA APPLIANCE HITS ORA-00600 [KFGPSET3] ASSERT

16299830 - CREATE DISKGROUP RECO/REDO ONLY DISCOVER 2 FAILGROUPS

13098318 - CTRL-C OR A SESSION KILL DURING DML INVOLVING TEMP BLOCKS LEADS TO ORA-600[6856]
Buffer Cache Management

13098318 - CTRL-C OR A SESSION KILL DURING DML INVOLVING TEMP BLOCKS LEADS TO ORA-600[6856]
Enterprise Manager Database Control

14273397 - Fix for bug 14273397

14459552 - Fix for bug 14459552
Generic

8547978 - DROP USER GIVES ORA-00600[KQD-OBJERROR$] AFTER ONLINE REDEFINITION OF TABLE

10242202 - ORA-22992 WHEN CREATING MATERIALIZED VIEW WITH REMOTE LOB COLUMN

13496884 - MERGE STMT CONTAINING BIND VARIABLES SOMETIMES FAILS DUE TO ORA-600 [QCSFBDNP:1]

13582702 - ORA-600 [KKMMCTBF:BAD INTCOLN] MAY BE SEEN WHILE EXECUTING DELETE

13584130 - ORA-7445 COMPILING LIBRARY UNIT WITH _LOAD_WITHOUT_COMPILE IN NON-BASE EDITION

13616375 - SQL TUNING FOR SELECT QUERY WITH FUNC-INDEX MAY FAIL DUE TO ORA-600 QKAFFSINDEX5

13786142 - DROP TRIGGER IN EDITIONING ENVIRONMENT COULD FAIL WITH ORA-4045/ORA-4098

13810393 - HANGING DUE TO 'LIBRARY CACHE: MUTEX X' DURING SHARED CURSOR STRESS TEST

13812031 - POSSIBLE WRONG RESULTS FROM QUERIES ON PARTITIONED TABLES

13860201 - INTERMITTENT COREDUMP IN KKSPBD0() DUE TO OBSOLETE CURSOR REFERENCED FROM PLSQL

13911821 - INSTANCE TERMINATION DUE A CRASH HIT BY PMON IN SHARED CURSORS CODE

14110275 - PARSE OF QUERY WITH TABLE THAT HAD UNDERGONE ADD COLUMN MAY RAISE INTERNAL ERROR

14226599 - 'LATCH: ROW CACHE OBJECTS' CONTENTION FOR DC_ROLLBACK_SEGS : ADD HASH BUCKETS

14644185 - DISABLE DEADLOCK DETECTION FOR CURSOR BUILD LOCKS

16175381 - PROCESS HUNG SPINNING IN KKSCSSEARCHCHILDLIST() -> KKSHGETNEXTCHILD()

16344871 - MISMATCH IN CURSOR SHAREABILITY (KKS LAYER) WITH VPD/RLS POLICY

14841812 - Fix for bug 14841812
High Availability

9706792 - ORA-600 [KCRPDV_NOENT] IN CRASH RECOVERY WITH PARALLELISM

11715084 - ACTIVE DUPLICATE SHOULD WORK WHEN CONNECTED TO STANDBY AS SOURCE DB

12983611 - RARELY ASYNC PROCESS CAN READ THE LOG ENTRY WHILE LGWR IS MODIFYING IT

13632809 - RMAN BZ2 COMPRESSION BACKUP HANGS

13680405 - PGA CONSUMPTION KEEP GROWING BY DIA0

14088346 - LMS DIED BECAUSE OF ORA-600 [KJBRWRDONE:SC3]
Oracle Security

13596521 - Fix for bug 13596521
Oracle Space Management

13910420 - ORA-8103 DURING UPDATE OF BASICFILE CLOB IN ASSM SEGMENT USING SPACE SEARCH CACH

13913630 - COMPRESSION OLTP: INSERT ... SELECT DOESN'T COMPRESS SOME ROWS

13958038 - EXCESS SPACE USAGE DURING UPDATE

14176879 - EXTENSIVE GROWTH OF SECUREFILES SEGMENTS UNDERGOING UPDATES

14207163 - FAILED TO CREATE EHCC TBS ON ZFS POOL STORAGE

14472647 - WRONG RESULTS ON IOT SECONDARY INDEX

14589750 - TRUNCATE TABLE HANG IN RAC AFTER APPLICATION OF PATCH OF 14144283
Oracle Spatial

13561951 - Fix for bug 13561951
Oracle Virtual Operating System Services

13914613 - DATABASE CRASHED DUE TO ORA-240 AND ORA-15064
SQL*Net

14841558 - Fix for bug 14841558
Workspace Manager

16368108 - RUNNING OWMV1120.PLB IN PSU 112036 GIVING ORA-00955

14220725 - Fix for bug 14220725

8 Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/us/corporate/accessibility/index.html.
Access to Oracle Support
Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/support/contact.html or visit http://www.oracle.com/accessibility/support.html if you are hearing impaired.

Patch 16056266 - 11.2.0.3.6 Patch Set Update Release 11.2.0.3.6 for UNIX
Copyright © 2006, 2013, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark licensed through X/Open Company, Ltd.
This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.