+ All Categories
Home > Documents > sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL...

sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL...

Date post: 09-May-2018
Category:
Upload: dangdung
View: 219 times
Download: 0 times
Share this document with a friend
36
Upgrade oracle 10.2.0.4 to 11.2.0.1 Database name : ora10gdb01 (database to be upgraded) Current version : 10.2.0.4 I am installing 11.2.0.1 in a different location and different home. My oracle 10g binaries are installed in /u01/app/oracle/product/10.2.0.1/db01 which I upgraded to 10.2.0.4 mkdir -p /u02/app/oracle/product/11.2.0/dbhome1 Download the software from www.oracle.com Unzip the software unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip [oracle@db10g database]$ ./runInstaller
Transcript
Page 1: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Upgrade oracle 10.2.0.4 to 11.2.0.1

Database name : ora10gdb01 (database to be upgraded)Current version : 10.2.0.4

I am installing 11.2.0.1 in a different location and different home. My oracle 10g binaries are installed in /u01/app/oracle/product/10.2.0.1/db01 which I upgraded to 10.2.0.4

mkdir -p /u02/app/oracle/product/11.2.0/dbhome1

Download the software from www.oracle.com

Unzip the software

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

[oracle@db10g database]$ ./runInstaller

Page 2: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Untick I wish to receive security updates via my oracle support and click on next.

Page 3: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Click yes

Page 4: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Click on install database software only

Page 5: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Click Single instance database installation

Page 6: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Keep it default and click on next

Page 7: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Click on Enterprise Edition and click on next

Page 8: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

ORACLE_BASE = /u02/app/oracle

Software binaries (ORACLE_HOME) = /u02/app/oracle/product/11.2.0/dbhome1

And click on next

Page 9: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

As we already have dba and oinstall group click on next.

Page 10: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Click on Fix & check again it will ask you to execute as below to fix kernel parameters

/tmp/CVU_11.2.0.1.0_oracle

execute

./runfixup.sh

In my case only four packages where required to be downloaded. I downloaded all the four packages and installed using rpm –ivh package name.

And click on check again and click next.

Page 11: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

All the pre requisites condition is succeeded. Click on next

Page 12: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Click on finish.

Page 13: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

After finishing it will ask you to re root.sh

Before running root.sh backup your coraenv, oraenv & dbhome files from /usr/local/bin location

mv coraenv coraenv10204

mv oraenv oraenv10204

mv dbhome dbhome10204

As root.sh will overwrite the files.

cp /u02/app/oracle/product/11.2.0/dbhome1/rdbms/admin/utlu112i.sql /tmp

SQL> spool pre_upgrade11g_ora10gdb01.log

SQL> @/tmp/utlu112i.sql

Page 14: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Oracle Database 11.2 Pre-Upgrade Information Tool 07-22-2014 18:52:19

.

**********************************************************************

Database:

**********************************************************************

--> name: ORA10GDB

--> version: 10.2.0.4.0

--> compatible: 10.2.0.1.0

--> blocksize: 8192

--> platform: Linux x86 64-bit

--> timezone file: V4

.

**********************************************************************

Tablespaces: [make adjustments in the current environment]

**********************************************************************

--> SYSTEM tablespace is adequate for the upgrade.

.... minimum required size: 747 MB

.... AUTOEXTEND additional space required: 247 MB

--> UNDOTBS1 tablespace is adequate for the upgrade.

Page 15: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

.... minimum required size: 529 MB

--> SYSAUX tablespace is adequate for the upgrade.

.... minimum required size: 481 MB

.... AUTOEXTEND additional space required: 211 MB

--> TEMP tablespace is adequate for the upgrade.

.... minimum required size: 61 MB

.... AUTOEXTEND additional space required: 32 MB

.

**********************************************************************

Flashback: OFF

**********************************************************************

**********************************************************************

Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]

**********************************************************************

WARNING: --> "java_pool_size" needs to be increased to at least 128 MB

.

**********************************************************************

Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]

Page 16: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

**********************************************************************

-- No renamed parameters found. No changes are required.

.

**********************************************************************

Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]

**********************************************************************

--> background_dump_dest 11.1 DEPRECATED replaced by

"diagnostic_dest"

--> user_dump_dest 11.1 DEPRECATED replaced by

"diagnostic_dest"

--> core_dump_dest 11.1 DEPRECATED replaced by

"diagnostic_dest"

.

**********************************************************************

Components: [The following database components will be upgraded or installed]

**********************************************************************

--> Oracle Catalog Views [upgrade] VALID

--> Oracle Packages and Types [upgrade] VALID

Page 17: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

--> 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] VALID

--> Spatial [upgrade] VALID

--> Data Mining [upgrade] VALID

--> Expression Filter [upgrade] VALID

--> Rule Manager [upgrade] VALID

--> Oracle OLAP API [upgrade] VALID

.

**********************************************************************

Miscellaneous Warnings

**********************************************************************

WARNING: --> Database is using a timezone file older than version 11.

Page 18: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

.... After the release migration, it is recommended that DBMS_DST package

.... be used to upgrade the 10.2.0.4.0 database timezone version

.... to the latest version which comes with the new release.

WARNING: --> Database contains schemas with stale optimizer statistics.

.... Refer to the Upgrade Guide for instructions to update

.... schema statistics prior to upgrading the database.

.... Component Schemas with stale statistics:

.... SYS

.... WMSYS

.... OLAPSYS

.... SYSMAN

.... CTXSYS

.... XDB

.... MDSYS

WARNING: --> Database contains INVALID objects prior to upgrade.

.... The list of invalid SYS/SYSTEM objects was written to

.... registry$sys_inv_objs.

.... The list of non-SYS/SYSTEM objects was written to

.... registry$nonsys_inv_objs.

.... Use utluiobj.sql after the upgrade to identify any new invalid

.... objects due to the upgrade.

.... USER PUBLIC has 1 INVALID objects.

Page 19: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

.... USER SYS has 2 INVALID objects.

WARNING: --> Database contains schemas with objects dependent on network

packages.

.... Refer to the Upgrade Guide for instructions to configure Network ACLs.

WARNING: --> EM Database Control Repository exists in the database.

.... Direct downgrade of EM Database Control is not supported. Refer to the

.... Upgrade Guide for instructions to save the EM data prior to upgrade.

WARNING:--> recycle bin in use.

.... Your recycle bin is turned on and it contains

.... 22 object(s). It is REQUIRED

.... that the recycle bin is empty prior to upgrading

.... your database.

.... The command: PURGE DBA_RECYCLEBIN

.... must be executed immediately prior to executing your upgrade.

.

PL/SQL procedure successfully completed.

Page 20: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

SQL> show parameter java;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

java_max_sessionspace_size integer 0

java_pool_size big integer 0

java_soft_sessionspace_limit integer 0

SQL> alter system set java_pool_size=200M; scope=spfile;

System altered.

SQL> desc dba_objects;

Name Null? Type

----------------------------------------- -------- ----------------------------

OWNER VARCHAR2(30)

OBJECT_NAME VARCHAR2(128)

SUBOBJECT_NAME VARCHAR2(30)

OBJECT_ID NUMBER

DATA_OBJECT_ID NUMBER

OBJECT_TYPE VARCHAR2(19)

CREATED DATE

Page 21: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

LAST_DDL_TIME DATE

TIMESTAMP VARCHAR2(19)

STATUS VARCHAR2(7)

TEMPORARY VARCHAR2(1)

GENERATED VARCHAR2(1)

SECONDARY VARCHAR2(1)

SQL> select object_name, object_type from dba_objects where owner='PUBLIC' and status='INVALID';

OBJECT_NAME

--------------------------------------------------------------------------------

OBJECT_TYPE

-------------------

DBA_REGISTRY_DATABASE

SYNONYM

SQL> ALTER PACKAGE DBMS_REGISTRY COMPILE BODY;

Package body altered.

Page 22: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

SQL> ALTER VIEW dba_registry_database COMPILE;

View altered.

SQL> ALTER PUBLIC SYNONYM DBA_REGISTRY_DATABASE COMPILE;

Synonym altered.

SQL> select * from v$timezone_file;

FILENAME VERSION

------------ ----------

timezlrg.dat 4

SQL> purge dba_recyclebin;

DBA Recyclebin purged.

SQL> create pfile from spfile;

File created.

Page 23: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Copy pfile and passwordfile from old location to new location dbs directory.

SQL> !

cp initora10gdb01.ora orapwora10gdb /u02/app/oracle/product/11.2.0/dbhome1/dbs

comment *.background_dump_dest, *.core_dump_dest, *.user_dump_dest

and add

*.diagnostic_dest=’/u02/app/oracle

b) Change

*.compatible=’10.2.0.1.0′to

*.compatible=’11.2.0′

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> quit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@db10g ~]$ export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome1

Page 24: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

[oracle@db10g ~]$ export ORACLE_SID=ora10gdb01

[oracle@db10g ~]$ export PATH=$ORACLE_HOME/bin:$PATH

[oracle@db10g dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 22 20:11:49 2014

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

Connected to an idle instance.

SQL> startup upgrade;

ORACLE instance started.

Total System Global Area 1202556928 bytes

Fixed Size 2212816 bytes

Variable Size 553651248 bytes

Database Buffers 637534208 bytes

Redo Buffers 9158656 bytes

Database mounted.

Database opened.

Page 25: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

SQL> spool upgrade11g_ora10gdb01.log

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

[oracle@db10g /]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 22 21:10:30 2014

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 1202556928 bytes

Fixed Size 2212816 bytes

Variable Size 553651248 bytes

Database Buffers 637534208 bytes

Redo Buffers 9158656 bytes

Database mounted.

Database opened.

Page 26: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

SQL> @?/rdbms/admin/utlu112s.sql

.

Oracle Database 11.2 Post-Upgrade Status Tool 07-22-2014 21:14:57

.

Component Status Version HH:MM:SS

.

Oracle Server

. VALID 11.2.0.1.0 00:11:27

JServer JAVA Virtual Machine

. VALID 11.2.0.1.0 00:07:32

Oracle Workspace Manager

. VALID 11.2.0.1.0 00:00:29

OLAP Analytic Workspace

. VALID 11.2.0.1.0 00:00:26

OLAP Catalog

. VALID 11.2.0.1.0 00:00:51

Oracle OLAP API

. VALID 11.2.0.1.0 00:00:36

Oracle Enterprise Manager

. VALID 11.2.0.1.0 00:08:16

Oracle XDK

. VALID 11.2.0.1.0 00:01:44

Page 27: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

Oracle Text

. VALID 11.2.0.1.0 00:01:17

Oracle XML Database

. VALID 11.2.0.1.0 00:03:39

Oracle Database Java Packages

. VALID 11.2.0.1.0 00:00:19

Oracle Multimedia

. VALID 11.2.0.1.0 00:04:36

Spatial

. VALID 11.2.0.1.0 00:04:23

Oracle Expression Filter

. VALID 11.2.0.1.0 00:00:08

Oracle Rule Manager

. VALID 11.2.0.1.0 00:00:07

Gathering Statistics

. 00:04:38

Total Upgrade Time: 00:50:38

PL/SQL procedure successfully completed.

2.5 Perform upgrade actions that do not require the database to be in UPGRADE mode

Page 28: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

SQL>@?/rdbms/admin/catuppst.sql

SQL> spool post_upgrade.log

Compile any invalid object using utlrp.sql

SQL> @?/rdbms/admin/utlrp.sql

create listener using the new oracle 11g home binaries

SQL> desc dba_registry;

Name Null? Type

----------------------------------------- -------- ----------------------------

COMP_ID NOT NULL VARCHAR2(30)

COMP_NAME VARCHAR2(255)

VERSION VARCHAR2(30)

STATUS VARCHAR2(11)

MODIFIED VARCHAR2(20)

NAMESPACE NOT NULL VARCHAR2(30)

CONTROL NOT NULL VARCHAR2(30)

SCHEMA NOT NULL VARCHAR2(30)

PROCEDURE VARCHAR2(61)

STARTUP VARCHAR2(8)

Page 29: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

PARENT_ID VARCHAR2(30)

OTHER_SCHEMAS VARCHAR2(4000)

SQL> column comp_name format a35

SQL> column version format a20

SQL> select comp_name, version, status from dba_registry;

COMP_NAME VERSION STATUS

----------------------------------- -------------------- -----------

Oracle Enterprise Manager 11.2.0.1.0 VALID

OLAP Catalog 11.2.0.1.0 VALID

Spatial 11.2.0.1.0 VALID

Oracle Multimedia 11.2.0.1.0 VALID

Oracle XML Database 11.2.0.1.0 VALID

Oracle Text 11.2.0.1.0 VALID

Oracle Data Mining 11.2.0.1.0 VALID

Oracle Expression Filter 11.2.0.1.0 VALID

Oracle Rule Manager 11.2.0.1.0 VALID

Oracle Workspace Manager 11.2.0.1.0 VALID

Oracle Database Catalog Views 11.2.0.1.0 VALID

COMP_NAME VERSION STATUS

Page 30: sunilthetechfreak.comsunilthetechfreak.com/wp-content/uploads/2014/07/upgrade... · Web viewPL/SQL procedure successfully completed. SQL> show parameter java; NAME TYPE VALUE ...

----------------------------------- -------------------- -----------

Oracle Database Packages and Types 11.2.0.1.0 VALID

JServer JAVA Virtual Machine 11.2.0.1.0 VALID

Oracle XDK 11.2.0.1.0 VALID

Oracle Database Java Packages 11.2.0.1.0 VALID

OLAP Analytic Workspace 11.2.0.1.0 VALID

Oracle OLAP API 11.2.0.1.0 VALID

17 rows selected.

our upgrade is successful

if you have any query please write to me at [email protected]


Recommended