Friday, July 10, 2020

10.2.0.4 to 11.2.0.4 upgrade Manually


Take a full backup of the database.

E:\oracle\product\10.2.0\db_1\BIN\expdp.exe ldbo\bold@apx1213srv full=Y dumpfile=apx1213expdp.dmp logfile=apx1213expdp.log



Install 11.2.0.3 into a separate E:\app\Administrator\product\11.2.0\dbhome_1.


After Installing 11.2.0.3 , Go to 10.2.0.4 database and run :

Connect as sys
spool e:\temp\pre_upgrade.log
@E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\utlu112i.sql
spool off 


To check Data Dictionary 
Connect as sys
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
Note: Ignore if dbms_stats.gather_dictionary_stats was run once.


To Fix invalid Object in the database :

connect as sys
SQL> @E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\utlrp.sql



Run pre-upgrade diagnostic utility dbupgradiag.sql

sqlplus "\ as sysdba"
SQL> spool e:\temp\pre_dbupgdiag.log
SQL>@@E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\dbupgdiag.sql
SQL>spool off  


if the dbupgdiag.sql script reports any invalid objects, 
run @E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\utlrp.sql  



Configure the 10.2.0.4 database environment for 11.2.0.3 Upgrade 


Copy the following Files to New Home 11.2.0.3 :
Spfile\Pfile\initapx1213.ora
orapwd
tnsnames.ora
Listener.ora
OC4J Home (E:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\OC4J_DBConsole_) Only if you have enterprise manager



Set The environment to 11.2.0.3

export E:\app\Administrator\product\11.2.0\dbhome_1\u01\app\oracle\prouct\11.2.0.3
export ORACLE_SID=apx1314

Note : Replace the Path , LD_Library_Path to new Home .


-------------------
E:\oracle\product\10.2.0\db_1\BIN\oradim.exe -delete -sid apx1213

e:\app\Administrator\product\11.2.0\dbhome_1\BIN\oradim.exe -new -sid apx1213 -SRVC OracleServiceapx1213 -intpwd oracle -MAXUSERS 5 -STARTMODE auto -PFILE E:\app\Administrator\product\11.2.0\dbhome_1\database\initapx1213.ora

mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\alert
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\cdump
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\hm
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\incident
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\incpkg
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\ir
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\lck
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\metadata
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\stage
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\sweep
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\trace
mkdir E:\app\Administrator\admin\apx1213\adump


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

Upgrade 10.2.0.4 database to 11.2.0.3

sqlplus  \ as sysdba
spool e:\temp\upgrade.log
startup upgrade
set echo on
@E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\catupgrd.sql;
spool off
shutdown immediate
startup

@E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\utlu112s.sql;
@E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\catuppst.sql;
@E:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\utlrp.sql;
select comp_name,version,status from dba_registry;
select owner,count(*) from dba_objects where status != 'VALID' group by owner;

SQL> shutdown immediate;
SQL> startup;

select * from v$version;
select * from dba_registry;
select version from v$timezone_file;


And Please Make Sure the listener has been started from the new home not the old one .


--------------------XML Installation

shutdown immediate;
startup upgrade;

spool e:\app\install_xml_db.log
@e:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\admin\catqm.SQL xdb sysaux temporary YES

shutdown immediate;
startup;
@e:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\admin\utlrp.sql



-------------------------Manual

You need to perform an out of place upgrade.
1. Install 11.2.0.3 on a different home
2. run the pre-upgrade tool on the existing 10.2.0.4 database
3. peform the pre-requisities mentioned
4. Bring down the database from 10.2.0.4 and start the database in upgrade mode from 11.2.0.3 home by copying the pfile\spfile of 10.2.0.4 database to $11.2.0.3_HOME\dbs path 
5. startup upgrade and run the catupgrd.sql

Make sure you look out for the invalid objects.

Refer *Complete checklist for out-of-place manual upgrade from previous 11.2.0.N version to the latest 11.2.0.N patchset. [ID 1276368.1]*



E:\oracle\product\10.2.0\db_1\BIN\oradim.exe -delete -sid apx1213

e:\app\Administrator\product\11.2.0\dbhome_1\BIN\oradim.exe -new -sid apx1213 -SRVC OracleServiceapx1213 -intpwd oracle -MAXUSERS 5 -STARTMODE auto -PFILE E:\app\Administrator\product\11.2.0\dbhome_1\database\initapx1213.ora

mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\alert
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\cdump
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\hm
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\incident
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\incpkg
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\ir
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\lck
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\metadata
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\stage
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\sweep
mkdir E:\app\Administrator\diag\rdbms\apx1213\apx1213\trace
mkdir E:\app\Administrator\admin\apx1213\adump


select * from v$version;
select * from dba_registry;
select version from v$timezone_file;


No comments:

Post a Comment

Followers