Professional Documents
Culture Documents
i 1 Vote
within the same or in different servers or with different OS platforms (ex: version 9i to 10g, 10g to 11g, and also the release 10.1 to 10.2, 11.1 to 11.2) to the higher version/release that intern will upgrade the existing physical files state to the newer release/version For upgrading, we will be using startup upgrade command. The startup migrate is deprecated from Oracle 10g for migration (Migration means moving the database from one OS platform to another, or from lower version/release to higer version/release as like upgrade, but the main difference here is we are logically extracting the physical files contents of data and we are loading it back to the higer version/release within the same or across the differnt OS servers, here the physcial files state doesnot change as like upgrade) To know more about Version, release, and patch
(http://naveenkumarsr.files.wordpress.com/2011/02/ver1.png) If you upgrade/migrate the database, the FIRST number and the SECOND number will changes. The FOURTH digit indicate the patchset number, this number will change whenever you apply the patchsets to the database.
Types of upgrading
You can do the upgrading the databases in two methods like 1. Manual Upgrading by running the scripts manually in proper order
nav eenkumarsr.w ordpress.com/2011/02/16/upgrad-oracle/ 2/27
2. Using Database Upgrade Assistant (DBUA) utility, Oracle recommends to go with this
Compatibility Matrix
Minimum Version of the database that can be directly upgraded to Oracle 11g Release 1 Source Database 9.2.0.4.0 OR higher 10.1.0.2.0 OR higher 10.2.0.1.0 OR higher Target Database 11.1.x 11.1.x 11.1.x
Before upgrading
Prior to beginning the migration, you should back up the existing database and database software. If
nav eenkumarsr.w ordpress.com/2011/02/16/upgrad-oracle/ 3/27
the upgrades fails for some reason and you are unable to revert the database or software to its earlier version, you will be able to restore your backup and re-create your database. You should develop and test scripts that will allow you to evaluate the performance and functionality of the database following the upgrade. This evaluation may include the performance of specific database operations or the overall performance of the database under a significant user load. Prior to executing the upgrade process on a production database, you should attempt the upgrade on a test database so that any missing components (such as operating system patches) can be identified and the time required for the upgrade can be measured. Prior to performing a upgrade, you should analyze the data dictionary tables. During the upgrade process to Oracle Database 11g, the data dictionary will be analyzed if it has not been analyzed already, so performing this step in advance will aid the performance of the upgrade.
Manually Upgrading
The manual upgrading the database includes: 1. Run pre-upgrading script utlu111i.sql ; if found problems, fix them
nav eenkumarsr.w ordpress.com/2011/02/16/upgrad-oracle/ 4/27
2. Backup of Oracle10g database 3. Bounce the Oracle11g database to startup upgrade and run catupgrd.sql script 4. Run post-upgrade script utlu111s.sql 5. Change the database from upgrade mode to normal mode by running catuppst.sql 6. Check for invalid objects; if found, run utlrp.sql
$ cat ~/pre_upgrade_info.log SQL> @/tmp/utlu111i.sql Oracle Database 11.1 Pre-Upgrade Information Tool 02-11-2011 16:16:52 . ********************************************************************** Database: ********************************************************************** > name: ORCL > version: 10.2.0.1.0 > compatible: 10.2.0.1.0 > blocksize: 8192 > platform: Linux IA (32-bit) > timezone file: V2 . ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** > SYSTEM tablespace is adequate for the upgrade. . minimum required size: 693 MB . AUTOEXTEND additional space required: 243 MB > UNDOTBS1 tablespace is adequate for the upgrade. . minimum required size: 262 MB . AUTOEXTEND additional space required: 62 MB > SYSAUX tablespace is adequate for the upgrade. . minimum required size: 438 MB
6/27
. AUTOEXTEND additional space required: 178 MB > DEF_TEMP tablespace is adequate for the upgrade. . minimum required size: 61 MB . ********************************************************************** Update Parameters: [Update Oracle Database 11.1 init.ora or spfile] ********************************************************************** No update parameter changes are required. . ********************************************************************** Renamed Parameters: [Update Oracle Database 11.1 init.ora or spfile] ********************************************************************** No renamed parameters found. No changes are required. . ********************************************************************** Obsolete/Deprecated Parameters:[Update Oracle Database11.1 init.ora or spfile] ********************************************************************** > background_dump_dest replaced by diagnostic_dest > user_dump_dest replaced by diagnostic_dest > core_dump_dest replaced by diagnostic_dest . ********************************************************************** Components: [The following database components will be upgraded or installed] ********************************************************************** > Oracle Catalog Views [upgrade] VALID
7/27
> 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] 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 an old timezone file version. . Patch the 10.2.0.1.0 database to timezone file version 4 . BEFORE upgrading the database. Re-run utlu111i.sql after . patching the database to record the new timezone file version. WARNING: > Database contains stale optimizer statistics.
8/27
. Refer to the 11g Upgrade Guide for instructions to update . statistics prior to upgrading the database. . Component Schemas with stale statistics: . SYS . OLAPSYS . SYSMAN WARNING: > Database contains schemas with objects dependent on network packages. . Refer to the 11g Upgrade Guide for instructions to configure Network ACLs. . USER SYSMAN has dependent objects. WARNING: > EM Database Control Repository exists in the database. . Direct downgrade of EM Database Control is not supported. Refer to the . 11g Upgrade Guide for instructions to save the EM data prior to upgrade. . PL/SQL procedure successfully completed. This scripts will generates to check whether all the properties will match during upgradings, Tablespaces: Verifies that the tablespaces are suitable to upgrade, if any problems of space, increase the size of tablespaces Update parameters: Check the update parameters from 10.2.0.1 to 11.1.0.6 Renamed Parameters: Check the renamed parameters in 11.1.0.6 Obsolete/Deprecated parameters: Remove the parameters which are deprecated in the 11.1.0.6 version. More about the deprecated parameters, refer the Oracle 11g documentation Components: Verify all the components are VALID, if they show INVALID, run utlrp.sql from Oracle10gs ORACLE_HOME to make them VALID. Miscellaneous Warnings: The timezone file version should be upgraded from 2 to 4. The remaining miscellaneous warnings can be ignored.
9/27
$ cp -r 5632264/files/oracore/zoneinfo $ORACLE_HOME/oracore/zoneinfo 5. If the new timezone changes has to come to an effect, restart the database and select the timezone SQL> select * from v$timezone_file; FILENAME VERSION timezlrg.dat 4 NOTE: Do not follow this method of applying the patch for all the patch-sets. That will corrupt the ORACLE_HOME path and may need to reinstall the software again. For each individual patch installation, please refer to the Oracle Patchset Documentations
NOTE:
Gather the dictionary statistics by executing DBMS_STATS.GATHER_SCHEMA_STATS for all the users as per the warning.
********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: > Database contains schemas with objects dependent on network packages. . Refer to the 11g Upgrade Guide for instructions to configure Network ACLs. . USER SYSMAN has dependent objects. WARNING: > EM Database Control Repository exists in the database. . Direct downgrade of EM Database Control is not supported. Refer to the . 11g Upgrade Guide for instructions to save the EM data prior to upgrade. .
This will completes the manually upgrading the Oracle database from 10.2.0.1 to 11.1.0.6
16/27
(http://naveenkumarsr.files.wordpress.com/2011/02/01.png) 5. Select the database you want to upgrade from the list of available databases. You can upgrade only one database at a time. For all the list of databases, the database names should be listed in /etc/oratab file (Step 2). Click Next
(http://naveenkumarsr.files.wordpress.com/2011/02/02.png) 6. The dbua utility will check the warnings should be taken care during the upgrading
(http://naveenkumarsr.files.wordpress.com/2011/02/03.png) Here again we need to solve the warning like update the timezone file version as a critical warning, and remaining warning you can skip. If you continue with this screen, at the point of in time the dbua will through an error and the upgrading the database will fail.
17/27
under $ORACLE_HOME/oracore/zoneinfo directory 4. Copy the newly extracted files to the ORACLE_HOME path $ cp -r 5632264/files/oracore/zoneinfo $ORACLE_HOME/oracore/zoneinfo 5. If the new timezone changes has to come to an effect, restart the database and select the timezone SQL> select * from v$timezone_file; FILENAME VERSION timezlrg.dat 4 NOTE: Do not follow this method of applying the patch for all the patch-sets. That will corrupt the ORACLE_HOME path and may need to reinstall the software again. For each individual patch installation, please refer to the Oracle Patchset Documentations
SQL> EXEC DBMS_STATS.GATHER_SCHEMA_STATS(OLAPSYS); PL/SQL procedure successfully completed. SQL> EXEC DBMS_STATS.GATHER_SCHEMA_STATS(SYSMAN); PL/SQL procedure successfully completed.
NOTE:
Gather the dictionary statistics by executing DBMS_STATS.GATHER_SCHEMA_STATS for all the users as per the .warning. This will solve the main warnings that got from the above step, the remaining warning can be ignored. Rerun the dbua utility again and clear the previous steps, now the warnings will be ease to upgrading the database, you can ignore these warnings
(http://naveenkumarsr.files.wordpress.com/2011/02/04.png) Click Yes, this will continue with the further steps of upgrading. 7. The next screen will allow to select the ORACLE_BASE and the Diagnostic Destination, Click Next
20/27
(http://naveenkumarsr.files.wordpress.com/2011/02/05.png) 8. You can then select to have your database files moved during the upgrade process. Click Next
(http://naveenkumarsr.files.wordpress.com/2011/02/08.png) 9. DBUA will then prompt you for a flash recovery area destination for the storage of backup andrecovery-related files. Click Next
(http://naveenkumarsr.files.wordpress.com/2011/02/09.png) 10. DBUA will then prompt you to recompile invalid PL/SQL objects following the upgrade. If you do not recompile these objects after the upgrade, the first user of these objects will be forced to wait while Oracle performs a run-time recompilation. Click Next
nav eenkumarsr.w ordpress.com/2011/02/16/upgrad-oracle/ 21/27
(http://naveenkumarsr.files.wordpress.com/2011/02/10.png) 11. DBUA will prompt for back up the database as part of the upgrade process. If already backed up the database prior to starting DBUA, elect to skip this step. If you choose to have DBUA back up the database, it will shut down the database and perform an offline backup. DBUA will also create a batch file in that directory to automate the restoration of those files to their earlier locations. Click Next
(http://naveenkumarsr.files.wordpress.com/2011/02/11.png) 12. If Oracle detects multiple Oracle Net listeners on the server, you will then be prompted to select a listener for your database, and the network configuration details will be displayed for your review and editing. Click Continue
(http://naveenkumarsr.files.wordpress.com/2011/02/12.png) 13. A final summary screen displays your choices for the upgrade, and the upgrade starts when you accept them. Click Finish
nav eenkumarsr.w ordpress.com/2011/02/16/upgrad-oracle/ 22/27
(http://naveenkumarsr.files.wordpress.com/2011/02/13.png) 14. The DBUA will start upgrading the database, the upgrading logs can be read in the ORACLE_BASE path
(http://naveenkumarsr.files.wordpress.com/2011/02/14.png) 15. The DBUA will complete the upgrading the database, Click OK
(http://naveenkumarsr.files.wordpress.com/2011/02/15.png) 16. After the upgrade has completed, DBUA will display the Upgrade Results screen, showing the steps performed, the related log files, and the status.
23/27
(http://naveenkumarsr.files.wordpress.com/2011/02/16.png) 17. The section of the screen titled Password Management allows you to manage the passwords and the locked/unlocked status of accounts in the upgraded database.
(http://naveenkumarsr.files.wordpress.com/2011/02/17.png) If you are not satisfied with the upgrade results, you can choose the Restore option. If you used DBUA to perform the backup, the restoration will be performed automatically; otherwise, you will need to perform the restoration manually. When you exit DBUA after successfully upgrading the database, DBUA removes the old databases entry in the network listener configuration file, inserts an entry for the upgraded database, and reloads the file.
After Upgrading
nav eenkumarsr.w ordpress.com/2011/02/16/upgrad-oracle/ 24/27
Following the upgrade, you should double-check the configuration and parameter files related to the database, particularly if the instance name changed in the migration process. These files include The tnsnames.ora file The listener.ora file
NOTE:
You will need to manually reload the modified listener.ora file if you are not using DBUA to perform the upgrade. Additional post-upgrade steps should include verifying the values for all environment variables (such as ORACLE_HOME and PATH) and upgrading the recovery catalog. You should review your database initialization parameters to make sure deprecated and obsolete parameters have been removed; these should have been identified during the migration process. Be sure to recompile any programs you have written that rely on the database software libraries. Once the upgrade has completed, perform the functional and performance tests identified before the upgrade began. If there are issues with the database functionality, attempt to identify any parameter settings or missing objects that may be impacting the test results. If the problem cannot be resolved, you may need to revert to the prior release. 7 Comments Posted by Naveen K. SR on February 16, 2011 in Oracle
June 18, 2011 at 12:21 AM what is main difference between patching and upgrading? Reply Naveen K. SR June 18, 2011 at 2:07 PM Hi Patching means in straight-forward resolving or fixing the bugs of the present version. This can be done through applying interim patches or Critical Patches, and even changing the version patching can also be done. If you apply these patches the fourth digit of the version sequence will be changed. Upgrading means having the same physical files, just we are changing the binaries and the libraries of the Oracle Software. So that we can get move on to the new features, flexibilities that will be provided in the new versions or released in the Oracle Software. - Naveen K. SR Reply Anonymous June 29, 2011 at 9:02 PM patching can be done in O/S level or database level? Reply Naveen K. SR June 30, 2011 at 11:59 AM You will get multiple type of patches to apply, the best practice you need to follow before patching is read the README file. You cannot follow same thumb-rule to apply all type of patches. So my recommendation is go through the README file and know about how to apply the patch. There are many types of patches like PSU, CPU, version patch, timezone patch etc Usually these patches will be applied using the Oracle binary, called, opatch in the OS level or using Oracle OUI by running runInstaller that internally applies to the database level. Reply
nav eenkumarsr.w ordpress.com/2011/02/16/upgrad-oracle/ 26/27
3. Perkins March 31, 2011 at 4:49 PM Good article on upgrading. .came to know lot of things good job, I awaiting much more writings from u Naveen.. well done, keep it up Reply 4. Anush February 23, 2011 at 3:11 PM Hi Naveen Nice information on upgrading, after reading ur blog, i came to know the difference between upgrade and migration thanks once again, nice job keep it up Anush Reply
Blog at WordPress.com. Theme: Choco by .css{mayo}. Entries (RSS) and Comments (RSS)
27/27