Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

How to Upgrade

Oracle Software and


Database from Oracle
Version 11.2.0.3 to
11.2.0.4
CONFIDENTIAL INFORMATION
The information herein is the property of Ex Libris Ltd. or its affiliates and any misuse or abuse 
will result in economic loss. DO NOT COPY UNLESS YOU HAVE BEEN GIVEN SPECIFIC 
WRITTEN AUTHORIZATION FROM EX LIBRIS LTD.
This document is provided for limited and restricted purposes in accordance with a binding 
contract with Ex Libris Ltd. or an affiliate. The information herein includes trade secrets and is 
confidential

DISCLAIMER
The information in this document will be subject to periodic change and updating. Please confirm 
that you have the most current documentation. There are no warranties of any kind, express or 
implied, provided in this documentation, other than those expressly agreed upon in the 
applicable Ex Libris contract. This information is provided AS IS. Unless otherwise agreed, Ex 
Libris shall not be liable for any damages for use of this document, including, without limitation, 
consequential, punitive, indirect or direct damages.
Any references in this document to third‐party material (including third‐party Web sites) are 
provided for convenience only and do not in any manner serve as an endorsement of that third‐
party material or those Web sites. The third‐party materials are not part of the materials for this Ex 
Libris product and Ex Libris has no liability for such materials.

TRADEMARKS
ʺEx Libris,ʺ the Ex Libris Bridge to Knowledge , Primo, Aleph, Voyager, SFX, MetaLib, Verde, 
DigiTool,  Rosetta, bX, URM, Alma , and other marks are trademarks or registered trademarks of 
Ex Libris Ltd. or its affiliates. 
The absence of a name or logo in this list does not constitute a waiver of any and all intellectual 
property rights that Ex Libris Ltd. or its affiliates have established in any of its products, features, 
or service names or logos. 
Trademarks of various third‐party products, which may include the following, are referenced in 
this documentation. Ex Libris does not claim any rights in these trademarks. Use of these marks 
does not imply endorsement by Ex Libris of these third‐party products, or endorsement by these 
third parties of Ex Libris products.
Oracle is a registered trademark of Oracle Corporation.
UNIX is a registered trademark in the United States and other countries, licensed exclusively 
through X/Open Company Ltd.
Microsoft, the Microsoft logo, MS, MS‐DOS, Microsoft PowerPoint, Visual Basic, Visual C++, 
Win32, Microsoft Windows, the Windows logo, Microsoft Notepad, Microsoft Windows Explorer, 
Microsoft Internet Explorer, and Windows NT are registered trademarks and ActiveX is a 
trademark of the Microsoft Corporation in the United States and/or other countries.
Unicode and the Unicode logo are registered trademarks of Unicode, Inc.
Google is a registered trademark of Google, Inc.

Copyright Ex Libris Limited, 2014. All rights reserved.
Document released: May 13, 2014

Web address: http://www.exlibrisgroup.com
Table of Contents
Chapter 1 Pre‐Upgrade Activities.............................................................................. 5
Upgrade Prerequisites ............................................................................... 5
Quick Upgrade Package Contents ........................................................... 6
Extracting the New Software from the Ex Libris FTP Server............... 6
Terminology Used in the Upgrade .......................................................... 8
Pre‐Upgrade Information Tools ............................................................... 8
Check and Update the Timezone Version ............................................ 13
Copying the Configuration Files to the New ORACLE_HOME ....... 18
Chapter 2 Upgrading the Database ......................................................................... 19
Chapter 3 Post‐Upgrade Activities .......................................................................... 23
Appendix A Troubleshooting....................................................................................... 29
Resource Limits  ......................................................................................29
Component Status ..................................................................................30
Rerunning the Upgrade  .........................................................................31
Appendix B Configuration Files.................................................................................. 33
Appendix C Post‐Upgrade Status Tool....................................................................... 35
Appendix D Upgrade Information Tool ..................................................................... 37
Database  .................................................................................................37
Tablespaces  .............................................................................................37
Rollback Segments ..................................................................................38
Flashback  ................................................................................................38
Update Parameters  .................................................................................39
Renamed Parameters ..............................................................................39
Obsolete/Deprecated Parameters ............................................................39
Components ............................................................................................39
Miscellaneous Warnings ........................................................................39
Recommendations ...................................................................................40

May 13, 2014 3


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

4 May 13, 2014


1
Pre-Upgrade Activities
This section lists the prerequisites for upgrading, provides an overview of the 
quick upgrade package, and describes the pre and post‐upgrade procedures 
that you should perform.

This section includes:
 Upgrade Prerequisites on page 5
 Quick Upgrade Package Contents on page 6
 Extracting the New Software from the Ex Libris FTP Server on page 6
 Terminology Used in the Upgrade on page 8
 Pre‐Upgrade Information Tools on page 8
 Copying the Configuration Files to the New ORACLE_HOME on 
page 18

Upgrade Prerequisites
The upgrade of your Oracle software and databases must be performed by a 
local DBA only.
Before starting an upgrade, a full backup of all Oracle 11 software and databases 
is absolutely necessary.
For information as to whether the application and application version with 
which you are working supports Oracle 11g2, refer to the documentation for 
your application.
After the upgrade is completed, download Oracle 11.2.0.4 software to all Ex 
Libris product application servers using the procedure described in Extracting 
the New Software from the Ex Libris FTP Server on page 6. Afterward, be sure 
to set the application environment accordingly. For instructions, refer to the 
documentation of the application.

May 13, 2014 5


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

NOTE:
Before implementing the instructions in this document, verify with your 
local Ex Libris office that your Ex Libris application supports Oracle 
11.2.0.4.

Quick Upgrade Package Contents


The package contains Oracle 11.2.0.4 software and has been pre‐built by Ex 
Libris. 

Extracting the New Software from the Ex Libris


FTP Server
Before you upgrade, you must perform the following procedure.

To extract the software from the Ex Libris FTP Server:

1 Log on to the Oracle server as an Oracle user (typically oracle).
2 Type the following command to determine which operating system is 
installed on the Oracle server:

uname

NOTE:
The upgrade packages on the Ex Libris FTP server (ftp.exlibris.co.il) are 
compatible with the Linux, Sun Solaris, and AIX operating systems. 

3 Download the appropriate upgrade package from the /oracle/11.2.0.4/
<platform>/quick directory on the Ex Libris FTP server.
4 Place the upgrade package in a temporary directory, such as /exlibris/
ftp_from_exlibris.
5 Extract the package using the following:
 The tar utility, if your Oracle server is running on a Linux platform. The 
tar utility is available with your operating system installation.
 The gnu_tar utility, if your Oracle server is running on a Sun Solaris 
platform. 

6 May 13, 2014


Chapter 1: Pre-Upgrade Activities

 The gnu_tar_aix utility, if your Oracle server is running on an AIX 
platform.
The gnu_tar and gnu_tar_aix utilities are available on the FTP server, 
along with the Oracle packages. If you are working with the gnu_tar_aix 
utility, you must rename it to gnu_tar after downloading it. If you are 
working with either gnu_tar utility, you must change permissions after 
downloading the utility. To do so, type the following:

cd /exlibris/ftp_from_exlibris
chmod +x gnu_tar*

6 Extract the Oracle 11.2.0.4 quick upgrade package from the temporary 
directory in which you placed it to the /exlibris/app/oracle/product 
directory:

cd /exlibris/app/oracle/product

 Rename the 11.2.0.3 software:

mv 11r2 11r2.old

 For Sun Solaris platforms:

cat /exlibris/<ftp_from_exlibris>/
ora11.2.0.4solaris_x86.tar.gz_* | gnu_tar
-xzvf -

 For Linux platforms:

cat /exlibris/<ftp_from_exlibris>/
ora11.2.0.4_linux64.tar.gz_*| tar -xzvf -

7 Change permissions for the Oracle binary files as the new user:

chmod +s $ORACLE_HOME/bin/oracle
cd $ORACLE_HOME
find . -type d | xargs chmod +x

8 Make sure that the oraInst.loc file resides on the Oracle server in the /
var/opt/oracle directory for a Sun Solaris OS and in the /etc directory 
for a Linux OS. The contents of the oraInst.loc file are as follows:

inventory_loc=/exlibris/app/oracle/product/11r2/oraInventory
inst_group=dba

9 Verify that the oratab file (which resides on the Oracle server in the 
/var/opt/oracle directory for Sun Solaris operating systems and in the

May 13, 2014 7


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

/etc directory for a Linux operating systems) contains an update to the 
$ORACLE_HOME. For example:

prm4:/exlibris/app/oracle/product/11r2:Y

Terminology Used in the Upgrade


The following terminology is used in this upgrade:
  <ORACLE_SID> – refers to the Oracle instance name as defined in the 
environment variable ORACLE_SID. 
 <Oracle11 $ORACLE_HOME> – refers to the path defined in the environment 
variable $ORACLE_HOME that is defined for the oracle11 user. This is 
usually: /exlibris/app/oracle/product/11r2.

Pre-Upgrade Information Tools


Analyze the database before upgrading it to the new release. This is done by 
running the Pre‐Upgrade Information Tool. The Pre‐Upgrade Information Tool 
is a SQL script that ships with Oracle Database 11g and must be copied to and 
run from the environment of the database being upgraded.

To run the Pre-Upgrade Information Tool and the dbupgdiag.sql script:

1 Log on to the system as the owner of the Oracle Database 11g Oracle home 
directory.
2 Copy the Pre‐Upgrade Information Tool (utlu112i.sql) from the Oracle 
Database 11g Release 1 (11.2.0.4) ORACLE_HOME/rdbms/admin directory to a 
directory outside of the Oracle home, such as the temporary directory on 
your system. For example:

cp /exlibris/app/oracle/product/11r2/rdbms/admin/utlu112i.sql
/tmp

3 Make a note of the new location of this file (for example: /tmp).
4 Make sure you are still logged on to the system as the owner of the Oracle 
home directory of the database to be upgraded (11.2.0.3). 
5 Change to the directory to which you copied the files in Step 2.
6 Start SQL*Plus by connecting to the database instance as a user with 
SYSDBA privileges:

sqlplus '/as sysdba'

8 May 13, 2014


Chapter 1: Pre-Upgrade Activities

7 Set the system to spool results to a log file for later analysis:

SQL> SPOOL upgrade_info.log

8 Run the Pre‐Upgrade Information Tool:

SQL> @utlu112i.sql

9 Turn off the spooling of script results to the log file:

SQL> SPOOL OFF

10 Check the output of the Pre‐Upgrade Information Tool in    
upgrade_info.log

May 13, 2014 9


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

The following is an example of the output generated by the Pre‐Upgrade 
Information Tool:

sys@PRM4> @utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 12-12-2011
10:00:36
Script Version: 11.2.0.3.0 Build: 001
.
*************************************************************
Database:
*************************************************************
--> name: PRM4
--> version: 11.2.0.3.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> platform: Linux x86 64-bit
--> timezone file: V14
.
*************************************************************
Tablespaces: [make adjustments in the current environment]
*************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 699 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 741 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
*************************************************************
Flashback: OFF
*************************************************************
*************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or
spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit
database.
*************************************************************
--> If Target Oracle is 32-Bit, refer here for Update
Parameters:
-- No update parameter changes are required.

--> If Target Oracle is 64-Bit, refer here for Update


Parameters:
-- No update parameter changes are required.

10 May 13, 2014


Chapter 1: Pre-Upgrade Activities

*************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or
spfile]
*************************************************************
-- No renamed parameters found. No changes are required.
*************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2
init.ora or spfile]
*************************************************************
-- No obsolete parameters found. No changes are required

*************************************************************
Components: [The following database components will be
upgraded or installed]
*************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] INVALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle Application Express [upgrade] VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API [upgrade] VALID

*************************************************************
Miscellaneous Warnings
*************************************************************
WARNING: --> Database contains schemas with objects dependent
on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to
configure Network ACLs.
.... USER APEX_030200 has dependent objects.

*************************************************************
Recommendations
*************************************************************

May 13, 2014 11


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

Oracle recommends gathering dictionary statistics prior to


upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:

EXECUTE dbms_stats.gather_dictionary_stats;

*************************************************************
Oracle recommends reviewing any defined events prior to
upgrading.

To view existing non-default events execute the following


commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),' ')) FROM
sys.v$parameter2
WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'
Trace Events:
SELECT (translate(value,chr(13)||chr(10),' ')) from
sys.v$parameter2
WHERE UPPER(name) = '_TRACE_EVENTS' AND
isdefault='FALSE'

Changes will need to be made in the init.ora or spfile.

*************************************************************
sys@PRM4> spool off

11 Run the dbupgdiag.sql script found in a text file on the Documentation 
Center as the 11.2.0.3 owner to verify that all of the components in 
dba_registry are valid and that all data dictionary objects are valid in 
dba_objects:

cd <location of the script>


$ sqlplus / as sysdba
sql> alter session set nls_language='American';
sql> @dbupgdiag.sql
sql> exit

12 If the dbupgdiag.sql script reports any invalid objects, run $ORACLE_HOME/
rdbms/admin/utlrp.sql multiple times to validate the invalid objects in 
the database.

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

13 After validating the invalid objects, re‐run dbupgdiag.sql in the database 
again to verify that all objects are valid.

12 May 13, 2014


Chapter 1: Pre-Upgrade Activities

NOTE:
Any invalid SYS/SYSTEM objects found before upgrading the database 
are stored in the table named registry$sys_inv_objs.

14 Recover any files that require media recovery. Enter the following to display 
a list of files that require media recovery:

SQL> SELECT * FROM v$recover_file;

15 If there are any files in backup mode, either wait for the backup to complete 
or abort the backup. Enter the following to display a list of files in backup 
mode:

SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';

See Appendix D: Upgrade Information Tool on page 37 for needed changes.

Check and Update the Timezone Version


To check and update the DB timezone:

1 Check the current version of the file:

SQL> select version from V$TIMEZONE_FILE;


VERSION
----------
11

2 If the version is not 14 or later, as in the example above, continue with the 
following steps:

conn / as sysdba
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
-- check that the output gives
-- PROPERTY_NAME VALUE
-- ------------------------------ ---------------------------
---
-- DST_PRIMARY_TT_VERSION 11
-- DST_SECONDARY_TT_VERSION 0
-- DST_UPGRADE_STATE NONE
-- DST_PRIMARY_TT_VERSION should match the value found when
selecting
alter session set "_with_subquery"=materialize;
exec DBMS_DST.BEGIN_PREPARE14)

May 13, 2014 13


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

3 Check for Prepare status:

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30)


value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;

The following is an example of the output:

PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 11
DST_SECONDARY_TT_VERSION 14
DST_UPGRADE_STATE PREPARE

Re‐running the prepare statement displays the following error:

SQL> exec DBMS_DST.BEGIN_PREPARE(14);


BEGIN DBMS_DST.BEGIN_PREPARE(14); END;
*
ERROR at line 1:
ORA-56920: a prepare or upgrade window or an on-demand or
datapump-job loading of a secondary time zone data file is in
an active state
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DST", line 1340
ORA-06512: at line 1

4 Truncate the log tables, if they exist:

SQL> TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;


SQL> TRUNCATE TABLE sys.dst$affected_tables;
SQL> TRUNCATE TABLE sys.dst$error_table;

5 Log the affected data:

BEGIN
DBMS_DST.FIND_AFFECTED_TABLES
(affected_tables => 'sys.dst$affected_tables',
log_errors => TRUE,
log_errors_table => 'sys.dst$error_table');
END;
/

6 Query the Affected table to check if there are any affected tables:

SQL> SELECT * FROM sys.dst$affected_tables;

14 May 13, 2014


Chapter 1: Pre-Upgrade Activities

7 If rows are displayed, enter the following to display the problems in those 
rows:

SQL> SELECT * FROM sys.dst$error_table;

A common output is the following:

no rows selected

8 End the Prepare phase:

SQL> EXEC DBMS_DST.END_PREPARE;

9 Check that the Prepare phase has ended:

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30)


value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;

The following is a probable output:

-
- PROPERTY_NAME VALUE
-- ---------------------------- -----------------------------
-
DST_PRIMARY_TT_VERSION 11
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE

10 Start up the database in Upgrade mode:

conn / as sysdba
SQL> shutdown immediate;
startup upgrade;
set serveroutput on

11 Check if previous Prepare window has ended:

SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value


FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;

May 13, 2014 15


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

The following is a probable output:

PROPERTY_NAME VALUE
---------------------------- ------------------------------
DST_PRIMARY_TT_VERSION 11
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE

If DST_UPGRADE_STATE is "PREPARE" then you did not end the 


prepare window in the previous steps)

12 If there are objects containing TSTZ data in recycle bin, purge the bin now or 
dbms_dst.begin_upgrade reports ORA-38301: Can not perform DDL/
DML over objects in Recycle Bin:

QL> purge dba_recyclebin;

13 Clean the used tables:

SQL>TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;


SQL>TRUNCATE TABLE sys.dst$affected_tables;
SQL>TRUNCATE TABLE sys.dst$error_table;
SQL>alter session set "_with_subquery"=materialize;

14 Start the Upgrade window:

SQL>EXEC DBMS_DST.BEGIN_UPGRADE(14);

The following message is displayed:

An upgrade window has been successfully started.

15 Confirm that the file has been upgraded to version 14:

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30)


value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 14
DST_SECONDARY_TT_VERSION 11
DST_UPGRADE_STATE UPGRADE

16 Restart the DB:

shutdown immediate
startup

alter session set "_with_subquery"=materialize;

16 May 13, 2014


Chapter 1: Pre-Upgrade Activities

17 Upgrade the tables that need action:

set serveroutput on
VAR numfail number
BEGIN
DBMS_DST.UPGRADE_DATABASE(:numfail,
parallel => TRUE,
log_errors => TRUE,
log_errors_table => 'SYS.DST$ERROR_TABLE',
log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
error_on_overlap_time => FALSE,
error_on_nonexisting_time => FALSE);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
END;
/

The ouput is a list of tables.
18 If there are no failures, end the upgrade:

VAR fail number


BEGIN
DBMS_DST.END_UPGRADE(:fail);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
END;
/

19 The following message is displayed:

An upgrade window has been successfully ended.


Failures:0

20 Perfom the following last checks:

SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value


FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;

The following is the expected output:

PROPERTY_NAME VALUE
---------------------------- ------------------------------
DST_PRIMARY_TT_VERSION <the new DST version number>
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE

SELECT * FROM v$timezone_file;


FILENAME VERSION
------------------ ----------
timezlrg_14.dat 14

May 13, 2014 17


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

Copying the Configuration Files to the New


ORACLE_HOME
To copy the configuration files from the oracle 11.1 home to the new
home:

1 Copy the tnsnames.ora and listener.ora files from the old 
$ORACLE_HOME/network/admin to the same location in $ORACLE_HOME of 
11.2.0.4 Oracle:

cd network/admin
cp tnsnames.ora <oracle11 $ORACLE_HOME>/network/admin
cp listener.ora <oracle11 $ORACLE_HOME>/network/admin

For example:

cp /exlibris/app/oracle/product/11r2.old/network/admin/
tnsnames.ora /exlibris/app/oracle/product/11r2/network/
admin
cp /exlibris/app/oracle/product/11r2.old/network/admin/
listener.ora /exlibris/app/oracle/product/11r2/network/
admin

2 Open the .cshrc file under /exlibris/app/oracle/product/11r2 and 
correct the ORACE_SID to your oracle SID.
3 Create the DB initialization file as described in Appendix B: Configuration 
Files on page 33.

18 May 13, 2014


2
Upgrading the Database
After preparing the new Oracle home, you can proceed with the manual 
upgrade.

To upgrade the database:

1 Shut down the 11.2.0.3 instance as the previous oracle owner:

Sqlplus '/as sysdba'


SQL> SHUTDOWN IMMEDIATE

2 Stop the Oracle 11.2.0.3 listener:

lsnrctl stop

3 Upgrade the DB:
a Log on to the system as the owner of the 11.2.0.4 Oracle Database.
b At the system prompt, change to the ORACLE_HOME/rdbms/admin 
directory: 

Start SQL*Plus:
sqlplus '/as sysdba'
SQL> set pause off
SQL> STARTUP UPGRADE

NOTE:
The UPGRADE keyword enables you to open a database based on an earlier 
Oracle Database release. It also restricts logons to AS SYSDBA sessions, 
disables system triggers, and performs additional operations that prepare 
the environment for the upgrade.

4 Set the system to spool the results to a log file for later verification of 
success:

SQL> SPOOL upgrade.log

May 13, 2014 19


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

5 Run the catupgrd.sql script:

SQL> @?/rdbms/admin/catupgrd.sql
SQL> spool off

NOTE:
If you did not run the Pre‐Upgrade Information Tool, the catupgrd.sql 
script terminates with one of the following errors: 
 ORA-00942: table or view does not exist
 ORA-00904: "TZ_VERSION": invalid identifier
 ORA-01722: invalid number
If you receive any of these errors, issue the SHUTDOWN ABORT statement, 
revert to the original Oracle home directory, and run the Pre‐Upgrade 
Information Tool (utlu112i.sql) as described in Pre‐Upgrade 
Information Tools on page 8.

6 After the script has finished, restart the instance to reinitialize the system 
parameters for normal operation.

SQL> exit
sqlplus '/as sysdba'
SQL> STARTUP

This restart, following the database shutdown performed as part of the 
catupgrd.sql script, flushes all caches, clears the buffers, and performs other 
housekeeping activities. These measures are an important final step to ensure 
the integrity and consistency of the newly upgraded Oracle Database software.

NOTE:
If you encountered a message listing obsolete initialization parameters 
when you started the database, remove the obsolete initialization 
parameters from the parameter file before restarting.

7 If DB Console is configured and used, copy the following two directories 
and their contents from 11.2.0.3 ORACLE_HOME to 11.2.0.4
ORACLE_HOME. (If the DB Console is not configured, these directories may 
not exist).

ORACLE_HOME/<hostname_dbname>
ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname_dbname>

20 May 13, 2014


Chapter 2: Upgrading the Database

For example:

cp -r OC4J_DBConsole_il-
aleph05.corp.exlibrisgroup.com_aleph /exlibris/app/
oracle/product/11r2/oc4j/j2ee
cp -r il-aleph05.corp.exlibrisgroup.com_aleph ../11r2/

May 13, 2014 21


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

22 May 13, 2014


3
Post-Upgrade Activities
To implement the post-upgrade activities:

1 Run utlu112s.sql, the Post‐Upgrade Status Tool, which provides a 
summary of the upgrade at the end of the spool log. You must run 
utlu112s.sql immediately after running catupgrd.sql. only.

SQL>set pause off


SQL>@rdbms/admin/utlu112s.sql

NOTES:
 If the Post‐Upgrade Status Tool returns errors or shows components 
that are not VALID or not the most recent release, see Appendix A: 
Troubleshooting on page 29 for more information.
 Oracle Multimedia status may appear as INVALID. You can ignore this 
status at this point, since another status check is done at the end of the 
post upgrade activities.

2 Run catuppst.sql, located in the ORACLE_HOME/rdbms/admin directory, to 
perform upgrade actions that do not require the database to be in 
UPGRADE mode:

SQL> @rdbms/admin/catuppst.sql

May 13, 2014 23


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

This may generate the following informational messages:

Generating apply and rollback scripts...


Check the following file for errors:
Apply script: .*
Rollback script: .*
Executing script file...
Updating registry...
Check the following log file for errors:
Generating apply and rollback scripts...
Check the following file for errors:
.../cfgtoollogs/catbundle/catbundle_PSU_*.log
Apply script:
.../rdbms/admin/catbundle_PSU_*_APPLY.sql
Rollback script:
.../rdbms/admin/catbundle_PSU_*_ROLLBACK.sql
Executing script file...
Updating registry...
Check the following log file for errors:
.../cfgtoollogs/catbundle/catbundle_PSU_*.log

3 Check the following log file for errors:

/exlibris/app/oracle/cfgtoollogs/catbundle/
catbundle_PSU_<ORACLE_SID>_APPLY_<date>.log

NOTE:
For more information on the Post Upgrade Status Tool, see Appendix C: 
Post‐Upgrade Status Tool on page 35.

4 Run utlrp.sql to recompile any remaining stored PL/SQL and Java code.

SQL> @rdbms/admin/utlrp.sql

5 Run the dbupgdiag.sql script as described in Step 9 on page 7 and verify 
that all the components in the dba_registry are valid and that all objects in 
dba_objects are valid.
6 Verify that all expected packages and classes are valid:

SQL> SELECT count(*) FROM dba_invalid_objects;


SQL> SELECT distinct object_name FROM dba_invalid_objects;

NOTE:
If the pre‐upgrade information tool detected invalid objects and 
populated the $sys_inv_objs and $nonsys_inv_objs registry tables, 
execute ORACLE_HOME/rdbms/admin/utluiobj.sql to display only the 
objects that are newly invalid because of the upgrade process. The 
utluiobj.sql script displays only objects that are now invalid but which 
were valid before the upgrade.

24 May 13, 2014


Chapter 3: Post-Upgrade Activities

7 When utlrp.sql is run instead of utl112s.sql to determine the status of a 
component, run the following query: 

SELECT COMP_NAME,VERSION,STATUS FROM DBA_REGISTRY;

This returns the most up‐to‐date information.

May 13, 2014 25


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

26 May 13, 2014


Appendixes
This guide contains the following appendixes:
 Appendix A: Troubleshooting on page 29
 Appendix B: Configuration Files on page 33
 Appendix C: Post‐Upgrade Status Tool on page 35
 Appendix D: Upgrade Information Tool on page 37

May 13, 2014 27


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

28 May 13, 2014


A
Troubleshooting
This section explains what to do if something goes wrong with the upgrade.

This section includes:
 Resource Limits on page 29
 Component Status on page 30
 Rerunning the Upgrade on page 31

Resource Limits
If you run out of resources during the upgrade, do the following:
1 Increase the resource allocation. 
2 Perform a SHUTDOWN ABORT. 
3 Restart the instance (in upgrade mode). 
4 Rerun the catupgrd.sql script or restart DBUA.
The following resources generally require increases for a new Oracle database 
release:
 SYSTEM and SYSAUX tablespaces
Typically you receive one of the following messages during the upgrade if 
your SYSTEM tablespace size is insufficient:
 ORA‐01650 – Unable to extend rollback segment <string> by <string> 
in tablespace <string>
 ORA‐01651 – Unable to extend save undo segment by <string> for 
tablespace <string>
 ORA‐01652 – Unable to extend temp segment by <string> in tablespace 
<string>
 ORA‐01653 – Unable to extend table <string>.<string> by <string> 
in tablespace <string>

May 13, 2014 29


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

 ORA‐01654 – Unable to extend index <string>.<string> by string in 
tablespace <string>
 ORA‐01655 – Unable to extend cluster <string>.<string> by <string> 
in tablespace <string>
 Shared memory
You might require larger shared memory pool sizes in some cases. The error 
message indicates which shared memory initialization parameter must be 
increased.
 ORA‐04031 – Unable to allocate string bytes of shared memory 
(“<string>”,”<string>”,”<string>”,”<string>”)

NOTE:
For more information about shared memory initialization parameters, see 
http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/
toc.htm.

 Rollback Segments
If you are using rollback segments, you must have a single large (100 MB) 
PUBLIC rollback segment online while the upgrade scripts are being run. 
Take offline smaller public rollback segments during the upgrade. Typically, 
you get the following error if your rollback segment size is insufficient:
ORA‐01562: failed to extend rollback segment 
 UNDO tablespace 
 Be sure it is at least 400 MB.
 Flash Recovery Area
If you are using a Flash Recovery Area and it fills up during the upgrade, 
the following error appears in the alert log, followed by suggestions for 
recovering from the problem:
ORA‐19815: WARNING: db_recovery_file_dest_size of <string> bytes 
is 98.99% used and has <string> remaining bytes available.
Identify the root cause of the problem and take appropriate actions to 
proceed with the upgrade. To avoid issues during the upgrade, increase the 
amount of space available in your Flash Recovery Area before starting the 
upgrade.

Component Status
The Post‐Upgrade Status Tool should report a VALID status for all components 
at the end of the upgrade. The following list describes other status values that 
might be displayed:

30 May 13, 2014


Chapter A: Troubleshooting

 NO SCRIPT – The component upgrade script is not found in ORACLE_HOME. 
Check the install logs, install the component software, and then rerun 
catupgrd.sql.
 OPTION OFF – The server option required for the component is not 
installed or is not linked with the server. Check the V$OPTION view as well 
as the install logs. Install the component or relink the server with the 
required option, and rerun catupgrd.sql.
 REMOVED – The component was not upgraded because it has been 
removed from the database.
 INVALID – Some objects for the component were invalid at the completion 
of the upgrade. If there are no errors during the component upgrade, then 
running utlrp.sql might change the status to VALID without rerunning the 
entire upgrade. Check the DBA_REGISTRY view after running utlrp.sql.
 UPGRADING – The component upgrade did not complete. Resolve the 
problem and rerun catupgrd.sql.

NOTE:
For more information on the Post Upgrade Status Tool, see Appendix C: 
Post‐Upgrade Status Tool on page 35.

Rerunning the Upgrade


You can rerun the upgrade with the catupgrd.sql script.

To rerun the upgrade:

1 Shut down the database:

SQL> SHUTDOWN IMMEDIATE

2 Restart the database in UPGRADE mode:

SQL> STARTUP UPGRADE

3 Set the system to spool results to a log file for later verification of success:

SQL> SPOOL upgrade.log

4 Rerun catupgrd.sql:

SQL> @catupgrd.sql

NOTE:
You can rerun the catupgrd.sql script as many times as necessary. The 
first time you run the script, no error messages should be returned. If you 

May 13, 2014 31


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

rerun the script, then the ORA-00001 message is displayed. You can safely 
ignore this message.

5 Rerun utlu111s.sql:

SQL> @utlu111s.sql

32 May 13, 2014


B
Configuration Files
After analyzing the database to be upgraded, complete the following steps to 
prepare the new Oracle home directory.

To create the new Oracle home directory:

1 Copy the configuration files from the Oracle home directory of the database 
being upgraded to the new 11.2 Oracle home directory. By default, Oracle 
looks for the parameter file in the ORACLE_HOME/dbs. The parameter file can 
reside anywhere, but it should not reside in the old environmentʹs Oracle 
home directory after you upgrade.
2 Perform one of the following procedures:
 If you have a server parameter file (SPFILE), you need to create a text file 
(PFILE):
a Log on as previous oracle 11 user:

cd dbs

b Check whether an spfile exists:

ls -l spfile <ORACLE_SID>

c Create the PFILE:

sqlplus '/as sysdba'


SQL> create pfile from spfile;

d Move the file:

mv init<ORACLE_SID>.ora <oracle11 $ORACLE_HOME>/dbs

For example:

mv /exlibris/app/oracle/product/11r2.old/
initaleph0.ora /exlibris/app/oracle/product/11r2/dbs

May 13, 2014 33


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

 If you do not have a server parameter file simply copy the 
init<ORACLE_SID>.ora file to the new dbs directory, as in the example 
above.
3 Open the copied init<SID>.ora file and change the compatible value to the 
new one:

compatible=11.2.0.4.0

4 If you have a password file that resides within the old environmentʹs Oracle 
home directory, move or copy the password file to the new ORACLE_HOME as 
the previous oracle user:

cd dbs
cp orapw<sid> <oracle11 $ORACLE_HOME/dbs

For example:

cp /exlibris/app/oracle/product/11r2.old/dbs/
orapwaleph0/exlibris/app/oracle/product/11r2/dbs

34 May 13, 2014


C
Post-Upgrade Status Tool
The Post‐Upgrade Status Tool, which is the utlu112s.sql script, displays the 
status of the database components in the upgraded database and the time 
required to complete each component upgrade. Any errors that occur during 
the upgrade are listed with each component and must be addressed. The 
utlu112s.sql script must only be run immediately after catupgrd.sql, but 
not after running utlrp.sql. The utlu112s.sql references a STATIC table 
whose contents are only relevant right after the upgrade completes.
The Post‐Upgrade Status Tool displays a report similar to the following output:

Oracle Database 11.2 Post-Upgrade Status Tool 10-18-


2010 22:48:55
.
Component Status Version
HH:MM:SS
.
Oracle Server
. VALID 11.2.0.4.0
00:17:31
JServer JAVA Virtual Machine
. VALID 11.2.0.4.0
00:02:32
Oracle Workspace Manager
. VALID 11.2.0.4.0
00:01:02
Messaging Gateway
. VALID 11.2.0.4.0
00:00:46
OLAP Analytic Workspace
. VALID 11.2.0.4.0
00:03:20
OLAP Catalog
. VALID 11.2.0.4.0
00:05:56

May 13, 2014 35


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

Oracle OLAP API


. VALID 11.2.0.4.0
00:00:48
Oracle Label Security
. VALID 11.2.0.4.0
00:00:37
Oracle Enterprise Manager
. VALID 11.2.0.4.0
00:12:02
Oracle XDK
. VALID 11.2.0.4.0
00:00:42
Oracle Text
. VALID 11.2.0.4.0
00:01:02
Oracle XML Database
. VALID 11.2.0.4.0
00:04:24
Oracle Database Java Packages
. VALID 11.2.0.4.0
00:00:27
Oracle Multimedia
. VALID 11.2.0.4.0
00:05:44
Spatial
. VALID 11.2.0.4.0
00:08:24
Oracle Expression Filter
. VALID 11.2.0.4.0
00:00:38
Oracle Rules Manager
. VALID 11.2.0.4.0
00:00:21
Oracle Application Express
. VALID 3.2.1.00.12
00:23:25
Gathering Statistics
. 00:05:12
Total Upgrade Time: 01:29:03

36 May 13, 2014


D
Upgrade Information Tool
You can use the Upgrade Information Tool to evaluate the system components 
before performing the upgrade. The Upgrade Information Tool output is 
composed of the following components:

This section includes:
 Database on page 37
 Tablespaces on page 37
 Rollback Segments on page 38
 Flashback on page 38
 Update Parameters on page 39
 Renamed Parameters on page 39
 Obsolete/Deprecated Parameters on page 39
 Components on page 39
 Miscellaneous Warnings on page 39
 Recommendations on page 40

Database
This section displays global database information about the current database, 
such as the database name, release number (version), compatibility level, 
blocksize, OS platform, and time zone file. A warning is displayed if you must 
adjust the COMPATIBLE initialization parameter before the database is upgraded.

Tablespaces
This section displays a list of tablespaces in the current database. For each 
tablespace, the tablespace name and minimum required size is displayed. In 
addition, a message displays next to each tablespace confirming that the 
tablespace is adequate for the upgrade. If the minimum required size is not met, 
then you must make adjustments, which the tool recommends.

May 13, 2014 37


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

In a manual upgrade using SQL scripts and utilities, space must be added to 
tablespaces that do not have enough free space in the current database. These 
tablespace adjustments must be made before the database is upgraded. 

To resize the tablespace:

1 Log on as the previous oracle 11 user:

sqlplus '/as sysdba

2 Check the file location:

SQL>Col file_name format a80 SQL>Select file_name from


dba_data_files where tablespace_name=<TABLESPACE_NAME>;

For example:

SQL>select file_name from dba_data_files where


tablespace_name='SYSTEM';

3 Resize the tablespace:

SQL>alter database datafile '<full_path>' resize xxx;

For example:

SQL>alter database datafile '/exlibris/oradata/ alephtou/


system_01.dbf' resize 1100m;

If you have more than one datafile per tablespace, you can choose any file 
you want.

Rollback Segments
This section shows the status for rollback segments in the SYSTEM tablespace 
and displays a warning about any adjustments that need to be made before 
performing the upgrade.

Flashback
This section shows whether flashback is ON or OFF and displays warnings 
about pool size and cache size that must be increased. 
For all Exlibris applications, set the flashback to OFF.
The status of undo_management is also displayed with any adjustment that must 
be made.

38 May 13, 2014


Chapter D: Upgrade Information Tool

Update Parameters
This section displays a list of initialization parameters in the parameter file 
(init.ora or spfile) of the current database that must be adjusted before the 
database is upgraded. The adjustments must be made to the parameter file after 
it is copied to the new Oracle Database 11g release. (For more information on 
copy instructions, see Appendix B: Configuration Files on page 33.

Renamed Parameters
This section displays a list of initialization parameters in the parameter file of 
the current database that are renamed in the new Oracle Database 11g release. 
New default values are also given.

Obsolete/Deprecated Parameters
This section displays a list of initialization parameters in the parameter file of 
the current database that are obsolete or deprecated in the new Oracle Database 
11g release. Obsolete initialization parameters must be removed from the 
parameter file before the database is upgraded.

Components
This section displays a list of database components in the database to be 
upgraded or installed when the current database is upgraded to the new Oracle 
Database 11g release.

Miscellaneous Warnings
This section provides warnings about specific situations that require attention 
before or after the upgrade. For example, if the database is using a time zone file 
that is a version older than what is required for the upgrade, a warning is 
displayed with the required action.

Invalid Objects

To compile invalid objects:

1 Run utlrp.sql as the previous oracle 11 user to recompile any remaining 
stored PL/ SQL and Java code.

cd $ORACLE_HOME/rdbms/admin
sqlplus '/as sysdba'
set pause off
SQL> @utlrp.sql

May 13, 2014 39


How to Upgrade Oracle Software and Database from Oracle Version 11.2.0.3 to 11.2.0.4

2 Make sure all objects are valid:

SQL >select owner,status from dba_objects where status <>


'VALID' order by 1;

Timezone file and DBMS_LDAP


You can ignore any DST related sections. There is no need to apply DST patches 
or check for DST issues for the update to Oracle 11.2.0.3. The Oracle 11.2.0.3 
RDBMS DST version after the update to 11.2.0.3 is the same as the 11.2.0.1 
system.
You can ignore the DBMS_LDAP warning.

Recommendations
This section provides Oracle recommendations, including the recommended 
SQL statements and commands, that should be performed before upgrading to 
the new Oracle Database 11g release.

Gathering Dictionary Statistics


To gather dictionary statistics, type the following while connected as SYSDBA:

sqlplus '/as sysdba'


set pause off.
SQL> execute dbms_stats.gather_dictionary_stats;

40 May 13, 2014

You might also like