ORACLE11G Database Upgrade Database upgrades

Source: Internet
Author: User
Tags sqlplus

Oracle is also the same for its own products, for its own products at different times, the strength of the support is not the same.
Broadly, the strength of the support is divided into three levels: Premier support (highest priority), Extended support (medium-priority), Sustaining support (lowest priority)

1.5-year standard support service period from product release-premier

2. The subsequent 3-year Extended Support service period---------extended

3. Next enter the durable support Service--------------sustaining

However, depending on the cycle, Oracle's support costs will be different, in the extension of the server, the first year will be charged 10% of the cost of support, the second year to receive 20% of the cost of support, the third year is a 20% increase in the cost of support.

With the introduction of oracle11g database, the upgrade of Oracle database becomes inevitable. The upgrade includes both the database software upgrade and the database upgrade.

Upgrade Roadmap

Approximate upgrade steps:

(1) Backing Up the database

(2) running Patchset, upgrading Oracle Software

(3) Prepare a new oracle_home

(4) Run Dbua or script upgrade instance

(5) Check for upgraded version information and invalid objects

Upgrade Patch Pack Selection

Metalink document id:1922396.1 will update the required patch numbers

Upgrade Method Selection

There are a lot of methods, each has its own characteristics, according to the characteristics of choosing the appropriate upgrade method.

You can choose to refer to document IDs 1674333.1 and 1602485.1 respectively for 9i and 11g upgrades to the latest 11GR2

1th Step
======
Download 11.2.0.2 or a later version of the RDBMS software.

2nd Step
======
Install the latest 11.2 RDBMS software into the new oracle_home.

Run the Patchset Runinstaller.

./runinstaller

It is important to note that we have previously talked about 11GR2 's patchset can be used directly for installation. In this interface can choose the type of operation, this function is more convenient, which also led to patchset more and more large, we choose upgrade an existing database here.

Note the installation location here, my previous installation directory is 11.2.0. Here I changed to a 11.2.0.4. Oracle installation to other locations reduces downtime and is a recommended approach for Oracle.

3rd Step
======
After installing the latest 11.2 RDBMS software, start the 11.2.0.1 instance in the previous Oracle_home and execute the 11.2.0.2 $oracle_home/rdbms/admin/for the previous instance that is running Utlu112i.sql the script and spool the output to a file. The original directory executes the new script.
Whether you are using Dbua or manual upgrade, you must run the pre-upgrade information Tool. Otherwise you may encounter an error:

1. Log in to the system as theowner of the environment of the database being upgraded.

Important:

The pre-upgradeinformation Tool must is copied to and must is run from the environment of thedatabase being upgraded.

Note that the new Oracle_home script must be called here.

2. Start Sql*plus.

3. Connect to the databaseinstance as a user with SYSDBA privileges.

4. Set the system to spool resultsto a log file for later analysis:

Sql> SPOOL Upgrade_info.log

5. Run the pre-upgrade informationtool:

Sql>@/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/admin/utlu112i.sql

6. Turn off the spooling of Scriptresults to the log file:

Sql> SPOOL OFF

4th step
======
Run the Dbupgdiag.sql script in the following My Oracle support article to verify that all components in Dba_registry are valid and that there are no invalid data dictionary objects in dba_objects.

If the Dbupgdiag.sql script reports any invalid objects, run $oracle_home/rdbms/admin/utlrp.sql (which may take multiple times) to make the invalid objects in the database valid until the number of invalid objects does not change.

5th step
=====
Disable all batch and cron jobs, and then perform a full backup of the database.

1. Login to RMAN:
Rman "Target/nocatalog"
2. Run the following RMAN command:
RUN
{
ALLOCATE CHANNEL chan_name TYPE DISK;
BACKUP DATABASE FORMAT ' some_backup_directory%u ' TAG before_upgrade;
BACKUP current Controlfile FORMAT ' controlfile location and name ';
}

6th step
=======
Clean shut down the database.

Operation Steps:

7th Step (Windows platform only)
========================
1) Set the environment variable oracle_home to point to the 11.2.0.1 installation.
2) Stop the Oracle database service that points to 11.2.0.1 installation.

c:\> NET STOP ORACLESERVICEORCL
3) Remove the 11.2.0.1 ORACLE service using the%oracle_home%\bin\oradim executable.

C:\> Oradim-delete-sid ORCL
4) Set the environment variable oracle_home to point to the 11.2.0.2 installation.

5) Copy the Init.ora/spfile and password files (orapw<sid>.ora) from 11.2.0.1%oracle_home%/database to 11.2.0.2%oracle_home%/database.
6) Copy the network configuration file (Listener.ora, Sqlnet.ora, Tnsnames.ora, etc.) from the 11.2.0.1%oracle_home%\network\admin (or $TNS _admin) location to the 11.2.0.2 %oracle_home%\network\admin (or%tns_admin%) position.
7) If you configure and use DB console/db Control, copy the following two directories and their contents from 11.2.0.1 to 11.2.0.2. (If DB console/db Control is not configured, these directories may not exist.) )
Oracle_home/Oracle_home/oc4j/j2ee/oc4j_dbconsole_8) Use the 11.2.0.2 executable program to create the Oracle 11.2.0.2 service at the command prompt.

%oracle_home%\bin\ Oradim
c:\> oradim-new-sid sid-syspwd password-startmode auto-pfile%oracle_home%\database\init<sid>. ORA
For example:

c:\> oradim-new-sid orcl-syspwd pass_with_sysdba_priv-startmode auto-pfile%oracle_home%\database\init<sid . ORA

PASSWORD = password for the new DB instance. This is the password for the user who is connected using the SYSDBA permission. The-SYSPWD option is not required. If this item is not specified, the operating system authentication is used and no password is required
8th Step (Unix and Linux)
=================
Configuration target 11.2.0.2 Oracle_home
1) Ensure that the environment variables oracle_base, Oracle_home, PATH, nls_10, and Library_path are set to point to the 11.2.0.2 installation.
Set Oracle_sid to 11.2.0.1 database name to upgrade.
Modify the/etc/oratab file to point to your 11.2.0.2 oracle_home.
2) Disable Database Vault

Note 453903.1-enabling and disabling Oracle Database Vault in UNIX
3) init.ora/spfile and password files (orapw<sid>.or A) Copy the network configuration file (Listener.ora, Sqlnet.ora, Tnsnames.ora, and so on) from 11.2.0.1 $ORACLE _home/dbs to 11.2.0.2 $ORACLE _home/dbs
4) from 11.2.0.1 $ORACLE _home/network/admin (or $TNS _admin) location copied to 11.2.0.2 $ORACLE _home/network/admin (or $tns_admin) location
5) If you configured and used DB console/db Control, copy the following two directories and their contents from 11.2.0.1 to 11.2.0.2. (If DB console/db Control is not configured, these directories may not exist.)
Oracle_home/ Oracle_home/oc4j/j2ee/oc4j_dbconsole_ Please 6) to ensure that the COMPATIBLE initialization parameters are set correctly for Oracle Database 11g version 2 (11.2). If compatible is not set correctly, the pre-upgrade information Tool displays a warning in the Database section.
7) Adjusts the value of the initialization parameter to at least the minimum value indicated by the pre-upgrade information Tool. For customers with a JVM installed, the java_pool_size and shared_pool_size must be set to at least 250MB before the upgrade, or the JVM upgrade may fail with the following error:

Ora-07445:exception Encountered:core Dump [Qmkmgetconfig () +52] [SIGSEGV] [addr:0x18] [pc:0x103ffec34] [Address not Mapp Ed to Object] []

Specific procedures:

Operation steps: (copy listen, password file)

Editing environment variables

Modify/etc/oratab, there are also oracle_home in this directory

[Email protected] db_1]$ Cat/etc/oratab

If you configured and used DB console/db Control, copy the following two directories and their contents from 11.2.0.1 to 11.2.0.2. (If DB console/db Control is not configured, these directories may not exist.) )
Oracle_home/Oracle_home/oc4j/j2ee/oc4j_dbconsole_

Ensure that the COMPATIBLE initialization parameters are set correctly for Oracle Database 11g version 2 (11.2). If COMPATIBLE is not set correctly, the pre-upgrade information Tool displays a warning in the Database section.

The java_pool_size and shared_pool_size must be set to at least 250MB before the upgrade.

Add parameter:

Create Pfile from SPFile;

modifying parameters

Final Build SPFile

Sql> create SPFile from Pfile;

9th step
======
Manually upgrade the database.
1) Start the Sqlplus and run the Catupgrd.sql script from the newly installed target $ORACLE _home/rdbms/admin

Sqlplus "/As SYSDBA"
Sql> Spool/tmp/upgrade.log
Sql> Startup upgrade
Sql> set echo on
sql> @ $ORACLE _home/rdbms/admin/catupgrd.sql;
Sql> Spool Off
Sql> Shutdown Immediate

This very important step is to ensure the integrity and consistency of the new database software. If you run into an error when you start the database and say that the parameter file contains deprecated initialization parameters, remove the parameters from the initialization parameter file. If necessary, you can convert the SPFile to Pfile after you can edit the pfile and delete the relevant parameters.
Executes the post-upgrade Status Tool $ORACLE _home/rdbms/admin/utlu112s.sql, which provides a summary of the upgrade. It shows the status of each database component after upgrade and the time it takes for each component upgrade. Any errors encountered in the upgrade will also be listed, and these errors must be properly handled.

$ sqlplus "/as sysdba"
Sql> STARTUP
sql> @utlu112s. sql
Run the Catuppst.sql in the $ORACLE _home/rdbms/admin directory to complete other upgrade actions that do not require the database to operate in UPGRADE mode:

sql> @catuppst. sql
This script can be run in parallel with Utlrp.sql. Run Utlrp.sql in another session to recompile the remaining PL/SQL and Java code:

sql> @utlrp. sql
Run the Dbupgdiag.sql obtained from the following document to check the integrity of the upgraded database.

Note 556610.1 Script to Collect DB upgrade/migrate Diagnostic information (dbupgdiag.sql)
If Dbupgdiag.sql discovers some invalid objects, it executes $ORACLE _home/rdbms/admin/utlrp.sql many times to recompile the failed objects until the number of failed objects no longer changes.
After recompiling these failed objects, run Dbupgdiag.sql again to confirm that everything is OK.

Post-Upgrade steps
===================

1) Upgrading the cluster configuration

If you are using an Oracle cluster, you must update the cluster configuration.

Starting with 11.2.0.2, the upgrade command updates the configuration to the version of the software that is running.

You can use the Srvctl command, for example:

SRVCTL Upgrade Database

This command updates the configuration information for the database and its corresponding service to the version of the running software.

The syntax and options are as follows:

Srvctl Upgrade database-d Db_unique_name-o Oracle_home
Table A-161 srvctl Upgrade Database Options
Option description
-D Db_unique_name
Unique name of the database
-O Oracle_home
Path of the Oracle_home

2) Use DBMS_DST to upgrade the time zone to the latest version.

Note 1201253.1
Title:actions for DST Updates when upgrading to Or applying the 11.2.0.2 patchset
3) Upgrade Recovery Catalog
For complete information about upgrading the Recovery catalog and UPGRADE catalog commands, see the topics that describe these procedures in Oracle Database Backup and Recovery User's Guide.
4) Upgrade the Statistics Table created by the Dbms_stats package
If you use Dbms_stats. Create_stat_table you have created statistics table, you can upgrade these tables by running the following command:

EXECUTE Dbms_stats. Upgrade_stat_table (' Scott ', ' stat_table ');
In the example, SCOTT is the owner of the statistics table, and Stat_table is the name of the statistics table. This command is required for each statistics table.
5) Enable Oracle Database Vault and reclaim the Dv_patch_admin role.
If you use Oracle Database Vault and follow the previous instructions to disable it before upgrading, now you need to:
Enable Database Vault.

Note 453903.1-enabling and disabling Oracle Database Vault in UNIX
Reclaim the Database Vault dv_patch_admin role of the SYS user.
Reference Http://download.oracle.com/docs/cd/E11882_01/server.112/e17222.pdf

6). The Oracle Warehouse Builder (OWB) component in the database is not installed during the upgrade process. After the upgrade, there are several steps to upgrade the component.

7) Finally call DBCA rebuild the OEM.

If the DBCA shows that the OEM has been configured, RM drop the following 2 directories, and run again is OK.

Oracle_home/hostname_dbname

Oracle_home/oc4j/j2ee/oc4j_dbconsole_hostname_dbname

Finally, verify the version and status of each component:

Sql> SELECT comp_name, VERSION, STATUS from SYS. Dba_registry

Comp_name VERSION STATUS

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

OWB 11.2.0.1.0 VALID

Oracle Application Express 3.2.1.00.10 VALID

Oracle Enterprise Manager 11.2.0.4.0 VALID

OLAP Catalog 11.2.0.4.0 VALID

Spatial 11.2.0.4.0 VALID

Oracle Multimedia 11.2.0.4.0 VALID

Oracle XML Database 11.2.0.4.0 VALID

Oracle Text 11.2.0.4.0 VALID

Oracle Expression Filter 11.2.0.4.0 VALID

Oracle Rules Manager 11.2.0.4.0 VALID

Oracle Workspace Manager 11.2.0.4.0 VALID

Oracle Database Catalog views 11.2.0.4.0 VALID

Oracle Database Packages and Types 11.2.0.4.0 VALID

Jserver JAVA Virtual Machine 11.2.0.4.0 VALID

Oracle XDK 11.2.0.4.0 VALID

Oracle Database Java Packages 11.2.0.4.0 VALID

OLAP Analytic Workspace 11.2.0.4.0 VALID

Oracle OLAP API 11.2.0.4.0 VALID

Rows selected.

This completes the command upgrade operation.

If you encounter problems during the upgrade process, you can re-execute the upgrade script as follows:

1.Shut down the database as follows:

Sql> shutdownimmediate

2.Restart the Databasein UPGRADE mode:

Sql> STARTUP UPGRADE

3.Set the system to spool results to a logfile for later verification of success:

Sql> SPOOLupgrade.log

4.Rerun Catupgrd.sql:

sql> @catupgrd. sql

Note:

You can rerunthe Catupgrd.sql script as many times as necessary. The first timeyou run the script, there should be no error messages returned. If you rerunthe script and then the ORA-00001 Messageis displayed. You can safely ignore the this message.

5.Rerun Utlu112s.sql:

sql> @utlu112s. sql

Graphical upgrade

A graphical upgrade is easier, and a return to the graphical interface after the upgrade is completed.

Next, it is most important to upgrade the database through Dbua, and then Oui will prompt, upgrade ASM or database, if the database is installed on ASM to upgrade ASM First, then upgrade the database. Finally, the upgrade information is aggregated for confirmation to begin the upgrade. A database upgrade is a patient job, because it can be slow. It is best to have a data guard or RAC environment during the upgrade process, giving priority to service.

ORACLE11G Database Upgrade Database upgrades

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.