02/04/2015 How to Upgrade a 10.2 Database to an 11.2 Database Oracle Database http://www.oraclewiki.net/startdocshowtoupgradedb102todb112 1/17 Fold Table of Contents Background & Overview Assumptions & PreRequisites Useful Information StepByStep Guide Example Install Example Upgrade File Listings Oracle .profile oratab listener.ora initSID.ora File Systems Known Issues Error ORA06550 During Upgrade. Description Fix ORACLEWIKI.NET How to Upgrade a 10.2 Database to an 11.2 Database Oracle Database » How To Guides » How to Upgrade a 10.2 Database to an 11.2 Database Background & Overview The following documentation provides instructions for upgrading an Oracle 10.2.0.4 database to an Oracle 11.2 database residing on Sun Solaris 10. Assumptions & PreRequisites This document expects and assumes the following: The instructions are carried out by a qualified DBA. Access to the internet is available. All necessary client software, e.g. Telnet and XServer is available. The resultant database will be standalone, i.e. not part of a cluster or failover configuration. All references to SID should be replaced with correct database name as derived using a suitable database naming standard. There is only ONE database installed on the server. Useful Information This section outlines useful information and changes to previous 10g documentation found on this site. Some have been made for cosmetic reasons, others for more practical considerations. A new directory structure exists. See below . A new init.ora parameter called diag_dest has been set and maps to the diag directory in the new directory structure mentioned above. A listener.ora file has a new parameter called ADR_BASE_LISTENER. This maps to the base of the diag directory. There are a number of new maintenance jobs in 11g. These can be turned off as part of this stepbystep guide. Read the Known Issues section below. StepByStep Guide 1. Ensure the new directory structure exists. See below . 2. Download the binaries for the Oracle 11g Database into /u01/app/oracle/SOFTWARE/DATABASE_11G Enterprise Edition for Oracle Solaris Operating System (SPARC) (64bit) solaris.sparc64_11gR2_database_1of2.zip := 1,373,903,591 bytes; cksum 2779246655 solaris.sparc64_11gR2_database_2of2.zip := 1,048,619,225 bytes; cksum 3179998886 3. Unzip the downloaded files using the following commands cd /u01/app/oracle/SOFTWARE/DATABASE_11G unzip solaris.sparc64_11gR2_database_1of2.zip unzip solaris.sparc64_11gR2_database_2of2.zip 4. Unset the ORACLE_HOME and TNS_ADMIN unset ORACLE_HOME unset TNS_ADMIN 5. Start xserver. 6. Start the installer. cd /u01/app/oracle/SOFTWARE/DATABASE_11G/database export DISPLAY= Enter Your IP Address ./runInstaller Oracle Database All things oracle... Home Script & SQL Libraries How to Guides Forums Manuals Contact Other Links Search this site Search Create account or Sign in sitename .wikidot.com Share on Explore »
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
02/04/2015 How to Upgrade a 10.2 Database to an 11.2 Database Oracle Database
File SystemsKnown IssuesError ORA06550 During Upgrade.DescriptionFix
ORACLEWIKI.NET How to Upgrade a 10.2 Database to an 11.2 DatabaseOracle Database » How To Guides » How to Upgrade a 10.2 Database to an 11.2 Database
Background & Overview
The following documentation provides instructions for upgradingan Oracle 10.2.0.4 database to an Oracle 11.2 database residingon Sun Solaris 10.
Assumptions & PreRequisites
This document expects and assumes the following:
The instructions are carried out by a qualified DBA.Access to the internet is available.All necessary client software, e.g. Telnet and XServer isavailable.The resultant database will be standalone, i.e. not part of acluster or failover configuration.All references to SID should be replaced with correctdatabase name as derived using a suitable database namingstandard.There is only ONE database installed on the server.
Useful Information
This section outlines useful information and changes to previous 10g documentation found on this site. Somehave been made for cosmetic reasons, others for more practical considerations.
A new directory structure exists. See below.
A new init.ora parameter called diag_dest has been set and maps to the diag directory in the newdirectory structure mentioned above.
A listener.ora file has a new parameter called ADR_BASE_LISTENER. This maps to the base of thediag directory.
There are a number of new maintenance jobs in 11g. These can be turned off as part of this stepbystepguide.
Read the Known Issues section below.
StepByStep Guide
1. Ensure the new directory structure exists. See below.
2. Download the binaries for the Oracle 11g Database into /u01/app/oracle/SOFTWARE/DATABASE_11G
Enterprise Edition for Oracle Solaris Operating System (SPARC) (64bit)solaris.sparc64_11gR2_database_1of2.zip := 1,373,903,591 bytes; cksum 2779246655solaris.sparc64_11gR2_database_2of2.zip := 1,048,619,225 bytes; cksum 3179998886
3. Unzip the downloaded files using the following commands
cd /u01/app/oracle/SOFTWARE/DATABASE_11Gunzip solaris.sparc64_11gR2_database_1of2.zipunzip solaris.sparc64_11gR2_database_2of2.zip
4. Unset the ORACLE_HOME and TNS_ADMIN
unset ORACLE_HOMEunset TNS_ADMIN
5. Start xserver.
6. Start the installer.
cd /u01/app/oracle/SOFTWARE/DATABASE_11G/databaseexport DISPLAY= Enter Your IP Address./runInstaller
Oracle DatabaseAll things oracle...
Home Script & SQL Libraries How to Guides Forums Manuals Contact Other Links
7. Follow the instructions as demonstrated in the Example Install section below.
Before continuing apply any oneoff patches, patch bundles or CPU patch bundles recommended byOracle or the application vendor. At the time of writing this guide, the following PSU is available:9654983
8. If PSU 11.2.0.1.2 has been applied then patch 9315778 will need to be applied to avoid ORA06550 druingthe upgrade.
9. Ensure all PreUpgrade Requirements are Met.
. oraenvORACLE_SID = [oracle] ? SIDsqlplus '/ as sysdba'SQL> @?/rdbms/admin/utlrpSQL> purge dba_recyclebinSQL> alter database datafile '/u03/oradata/SID/system/d1/system_01.dbf' resize 1000m;
10. Download the Latest Upgrade Check Script from Metalink article 884522.1
11. Perform an upgrade check on the exiting 10g database.
. oraenvORACLE_SID = [oracle] ? SIDsqlplus '/ as sysdba'create pfile='/u01/app/oracle/admin/SID/pfile/initSID.ora' from spfileshutdown immediatequitcd /u01/app/oracle/admin/SID/pfilemv initSID.ora initSID.POST_UPGRADECreate a pfile using the listing below.cd $ORACLE_HOME/dbsrm spfileSID.ora
rm initSID.oraln s /u01/app/oracle/admin/SID/pfile/initSID.orasqlplus '/ as sysdba'startupcreate spfile='/u01/app/oracle/admin/SID/pfile/spfileSID.ora' from pfile;shutdown immediatequitcd $ORACLE_HOME/dbsrm initSID.ordln s /u01/app/oracle/admin/SID/pfile/spfileSID.oracd /u01/app/oracle/admin/SID/pfilerm initSID.orasqlplus '/ as sysdba'startupquit
20. Remove the old binaries
rm rf OLD_ORACLE_HOME
21. Check the database is registered with the listener
lsnrctl status
22. Ensure DST update is not in progress
. oraenvORACLE_SID = [oracle] ? SIDsqlplus '/ as sysdba'SQL> select property_name, substr(property_value, 1, 30) value fromdatabase_properties where property_name like 'DST_%' order by property_name;
NB DST_SECONDARY_TT_VERSION should be set to 0NB DST_UPGRADE_STATE should be set to NONE
NB For 11.2.0.1, the latest version is 11. For 11.2.0.2 the latest version is 14.
24. Ensure the prepare has completed successfully.
. oraenvORACLE_SID = [oracle] ? SIDsqlplus '/ as sysdba'SQL> select property_name, substr(property_value, 1, 30) value fromdatabase_properties where property_name like 'DST_%' order by property_name;
NB DST_SECONDARY_TT_VERSION should be set to the version being upgraded to.E.g. 11NB DST_UPGRADE_STATE should be set to prepare
25. Clear out the DST upgrade logging tables prior to checkinng for affected data
. oraenvORACLE_SID = [oracle] ? SIDsqlplus '/ as sysdba'SQL> EXEC DBMS_DST.END_PREPARE;SQL> select property_name, substr(property_value, 1, 30) value fromdatabase_properties where property_name like 'DST_%' order by property_name;
NB DST_SECONDARY_TT_VERSION should be set to 0NB DST_UPGRADE_STATE should be set to NONE
28. Upgrade the DST timezone.
. oraenvORACLE_SID = [oracle] ? SIDsqlplus '/ as sysdba'SQL> shutdown immediateSQL> startup upgradeSQL> purge dba_recyclebinSQL> truncate table sys.dst$trigger_table;SQL> truncate table sys.dst$affected_tables;SQL> truncate table sys.dst$error_table;SQL> EXEC DBMS_DST.BEGIN_UPGRADE(11);SQL> select property_name, substr(property_value, 1, 30) value fromdatabase_properties where property_name like 'DST_%' order by property_name;SQL> shutdown immediate;SQL> startupSQL> set serveroutput onSQL> VAR numfail numberSQL> 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; /SQL> VAR fail numberSQL> BEGIN DBMS_DST.END_UPGRADE(:fail); DBMS_OUTPUT.PUT_LINE('Failures:'||:fail); END; /SQL> select * from v$timezone_file;
NB This should report the new timezone file version. E.g. 11
29. Check for Depricated, nondefault parameters.
ORACLE_SID = [oracle] ? SIDsqlplus '/ as sysdba'SQL> SELECT name FROM v$parameter WHERE isdeprecated = 'TRUE' andisdefault='FALSE'
NB This should return 0 rows. If not, migrate to a more suitable init.ora.
30. Disable the default 11g maintenance jobs if required.
Ensure Database Administrator (OSDBA) Group is set to dbaEnsure Database Operator (OSOPER) Group is set to dbaClick Next
This page may not be displayed.Review and fix any issues.Click Next
Note: The installer may report a failed check on OS Patch 12486115. Its possible that this failed check can beignored. Review Metalink document 969497.1
Ensure Recompile invalid objects at the end of upgrade is ticked.Turn off archiving if required. Mostly this will not be necessary.Ensure Backup database is NOT ticked.
NB You should backup the database prior to this step using the normal backup method.Click Next.
If you left archiving on, Click Yes to continue.
02/04/2015 How to Upgrade a 10.2 Database to an 11.2 Database Oracle Database
########################################### # System Managed Undo and Rollback Segments ########################################### undo_tablespace='UNDO'
########################################### # Security and Auditing ########################################### audit_trail='db' remote_login_passwordfile='EXCLUSIVE'