Converting 10gR2 non ASM database to 11gR2 ASM

The goal is to upgrade 10gR2 Database(non ASM) running on RHEL 5 to 11gR2 Restart Environment on another RHEL 5 system.

The steps for 10g database:

1- Run the utlu112i.sql Pre-upgrade script. You can find this script under @$ORACLE_HOME/rdbms/admin/. It must be copied from the 11g database software.

    SQL> @$ORACLE_HOME/rdbms/admin/utlu112i.sql

This script adds a column named tz_version to table named registry$database. Pre-upgrade script updates this column with the value of the following query.

    SQL> select version from v$timezone_file;

So it performs following operation.

    SQL> ALTER TABLE registry$database ADD (tz_version NUMBER);
    SQL> UPDATE registry$database set tz_version =4;

    SQL> ALTER  PACKAGE “SYS”.”DBMS_REGISTRY”  COMPILE BODY;
    SQL> ALTER VIEW “SYS”.”DBA_REGISTRY_DATABASE”  COMPILE;

2- Connect to 10g database and take RMAN full backup.

    #rman target /
    RMAN> backup as backupset database;

3- Copy 10g database backup files and archive files to 11g database server.


Install and Configure Standalone Grid infrastructure and mount the ASM DISK(+DATA)
Install the 11.2.0.3 Software alone.

The steps for 11g database:

1- Create temporary pfile in $ORACLE_HOME/dbs

*.audit_file_dest=’/oracle/admin/orcl/adump’
*.compatible=’10.2.0.0.0′----->if you want change to 11.2.0.0.0 or can change later
*.control_files=’+DATA/orcl/controlfile/current.1′,’+DATA/orcl/controlfile/current.2′
*.db_block_size=8192
*.db_create_file_dest=’+DATA’
*.db_create_online_log_dest_1=’+RECO’
*.db_name=’ORCL’
*.diagnostic_dest=’/oracle’
*.job_queue_processes=0
*.open_cursors=300
*.pga_aggregate_target=1G
*.processes=150
*.remote_login_passwordfile=’EXCLUSIVE’
*.sga_target=2G
*.undo_tablespace=’UNDOTBS1′

2- Open the database in NOMOUNT state.

    # rman target /

    RMAN> startup nomount;

3- Restore controlfile from backup.
    RMAN>LIST BACKUP OF CONTROLFILE

    RMAN> restore controlfile from ‘<backup piece name>′;

4- Open the database in MOUNT state.

    RMAN> alter database mount;

5- Catalog RMAN backup files and archive log files.(Ensure you have restored the backup copy)

    RMAN> catalog start with ‘/oracle/ora11g/orcl/backup’;
    RMAN> catalog start with ‘/oracle/ora11g/orcl/archive’;

6- Restore 10g database backup to +DATA diskgroup and perform incomplete recovery.

    RMAN> run
    {
    allocate channel c1 device type disk;
    SET NEWNAME FOR DATAFILE 1 TO ‘+DATA’;
    SET NEWNAME FOR DATAFILE 2 TO ‘+DATA’;
    SET NEWNAME FOR DATAFILE 3 TO ‘+DATA’;
    SET NEWNAME FOR DATAFILE 4 TO ‘+DATA’;
    restore database until sequence 4;
    switch datafile all;
    recover database until sequence 4;
    }


    ###shutdown the  database
    asmcmd>cd DATA/ControlFile

    Get the control file name,edit the pfile and update the control file name and start the database in mount.

7-  Open the database with RESETLOGS UPGRADE.

    # sqlplus / as sysdba
    SQL> alter database open resetlogs upgrade;
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Robin is a Senior support Analyst in global database support

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today