Orace-ear Oracle Database Upgrade, Migration ... Orace-ear / Oracle Database Upgrade, Migration Transformation

  • View
    3

  • Download
    0

Embed Size (px)

Text of Orace-ear Oracle Database Upgrade, Migration ... Orace-ear / Oracle Database Upgrade, Migration...

  • Oracle-Regular / Oracle Database Upgrade, Migration & Transformation Tips & Techniques / Edward Whalen / 605-0

    Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 5

    Copyright © 2015 by McGraw-Hill Education

    Step Operation Description Done?

    1 Capture database file metadata

    Capture metadata for all database files about to be migrated.

    2 Verify COMPATIBLE setting

    If COMPATIBLE is < 11.0.0.0, then it will be necessary to change any READ ONLY transportable tablespaces to READ WRITE mode.

    3 Create INCREMENTAL LEVEL 0 image copy backups of all datafiles

    Back up all datafiles as INCREMENTAL LEVEL 0 image copy backups, routing them to their eventual ASM disk group(s).

    4 Create INCREMENTAL LEVEL 1 backups of all datafiles

    Create INCREMENTAL LEVEL 1 differential backups for all datafiles.

    CHECKLIST 5-1 Migration Preparation Operations

    Checklist_Chapter 5.indd 1 18/05/15 4:55 PM

  • Oracle-Regular / Oracle Database Upgrade, Migration & Transformation Tips & Techniques / Edward Whalen / 605-0

    Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 5

    Copyright © 2015 by McGraw-Hill Education

    Step Operation Description Done?

    1 Archive online redo log Issue ALTER SYSTEM SWITCH LOGFILE; command to archive the most current online redo log.

    2 Disable unnecessary recovery settings

    Turn off BCT. Turn off Flashback Database logging. Remove any restore points.

    3 Perform consistent database shutdown

    Issue SHUTDOWN IMMEDIATE command to ensure no uncommitted changes remain and that all dirtied database buffers are checkpointed.

    CHECKLIST 5-2 Immediate Pre-Migration Prerequisites

    Checklist_Chapter 5.indd 2 18/05/15 4:55 PM

  • Oracle-Regular / Oracle Database Upgrade, Migration & Transformation Tips & Techniques / Edward Whalen / 605-0

    Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 5

    Copyright © 2015 by McGraw-Hill Education

    Step Operation Description Done?

    1 Migrate modified SPFILE to ASM

    ■ Build a PFILE from the current SPFILE.

    ■ Modify the PFILE’s initialization parameters to point to ASM disk group(s) for all files.

    ■ Test the PFILE.

    ■ Rebuild an ASM-based SPFILE.

    ■ Restart the instance.

    2 Migrate control files to ASM

    Restore the database’s control files to the chosen ASM disk group(s).

    3 Mount the database Mount the database using the newly migrated control files.

    4 Switch to previously migrated datafiles

    Use the SWITCH DATABASE TO COPY; RMAN command to switch all datafiles to ASM-based storage.

    5 Recover the database Perform complete recovery on the migrated datafiles using differential INCREMENTAL LEVEL 1 backups, archived redo logs, and currently online redo logs.

    6 Open the database in RESETLOGS mode

    Issue the ALTER DATABASE OPEN RESETLOGS; command to open the database.

    7 Migrate online redo logs to ASM

    Re-create all members for the online redo log groups on the chosen ASM disk group(s).

    8 Migrate temporary tablespace temp file(s) to ASM

    Create a new temp file for all temporary tablespace(s) on the chosen ASM disk group(s).

    9 Switch FRA to ASM Modify DB_RECOVERY_FILE_DEST to ASM storage.

    10 Restore/rebuild database backups to FRA on ASM

    Optionally, restore any existing backup files to the FRA on its new ASM disk group(s).

    11 Validate the migration Validate that all database files have been successfully migrated per expectations.

    CHECKLIST 5-3 Complete Migration to ASM

    Checklist_Chapter 5.indd 3 18/05/15 4:55 PM

  • Oracle-Regular / Oracle Database Upgrade, Migration & Transformation Tips & Techniques / Edward Whalen / 605-0

    Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 5

    Copyright © 2015 by McGraw-Hill Education

    Step Operation Description Done?

    1 Capture database file metadata

    Capture metadata for all database files about to be migrated.

    2 Verify COMPATIBLE setting

    If COMPATIBLE is < 11.0.0.0, then it will be necessary to change any READ ONLY transportable tablespaces to READ WRITE mode.

    3 Create INCREMENTAL LEVEL 0 image copy backups of datafiles for selected tablespaces

    Back up selected tablespaces as INCREMENTAL LEVEL 0 image copy backups, routing them to their eventual ASM disk group(s).

    4 Create INCREMENTAL LEVEL 1 backups of datafiles for selected tablespaces

    Create INCREMENTAL LEVEL 1 differential backups for selected tablespaces.

    5 Recover selected tablespaces to image copies

    Use the SWITCH TABLESPACE TO COPY; RMAN command to switch all datafiles for selected tablespaces to ASM-based storage.

    6 Move non-ASM mount points to ASM disk groups

    Once all database files have been moved from one or more set(s) of LUNs, those LUNs can be wiped clean of any file system and then added as new ASM disks into an existing ASM disk group. This can also be done from SQL*Plus while connected to the ASM instance via the ALTER DISKGROUP ADD REBALANCE POWER n; command, where n can range from 1 to 1024 in Oracle 11.2.0.2.

    7 Rebalance ASM disk groups

    Once old mount points are added via Step 6 to the ASM disk groups, ASM should automatically rebalance them, thus spreading all ASM AUs across all available ASM disks. This can also be done from SQL*Plus while connected to the ASM instance via the ALTER DISKGROUP REBALANCE POWER n; command.

    CHECKLIST 5-1A Phased Migration from Non-ASM to ASM Storage: Preparations

    Checklist_Chapter 5.indd 4 18/05/15 4:55 PM

  • Oracle-Regular / Oracle Database Upgrade, Migration & Transformation Tips & Techniques / Edward Whalen / 605-0

    Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 5

    Copyright © 2015 by McGraw-Hill Education

    Step Operation Description Done?

    1 Migrate modified SPFILE to ASM

    ■ Build a PFILE from the current SPFILE.

    ■ Modify the PFILE’s initialization parameters to point to ASM disk group(s) for all files.

    ■ Test the PFILE.

    ■ Rebuild an ASM-based SPFILE.

    ■ Restart the instance.

    2 Migrate control files to ASM

    Restore the database’s control files to the chosen ASM disk group(s).

    3 Mount the database Mount the database using the newly migrated control files.

    4 Create INCREMENTAL LEVEL 0 image copy backups of datafiles for remaining tablespaces

    Back up datafiles for any remaining tablespaces—that is, SYSTEM, UNDOTBS, SYSAUX, and any others—as INCREMENTAL LEVEL 0 image copy backups, routing them to their eventual ASM disk group(s).

    5 Switch to remaining datafiles

    Use the SWITCH DATABASE TO COPY; RMAN command to switch all remaining datafiles to ASM- based storage.

    6 Recover the database Perform complete recovery on the migrated datafiles using differential INCREMENTAL LEVEL 1 backups, archived redo logs, and currently online redo logs.

    7 Open database In RESETLOGS mode

    Issue the ALTER DATABASE OPEN RESETLOGS; command to open the database.

    8 Migrate online redo logs to ASM

    Re-create all members for the online redo log groups on the chosen ASM disk group(s).

    CHECKLIST 5-3A Phased Migration from Non-ASM to ASM Storage: Completion

    (Continues)

    Checklist_Chapter 5.indd 5 20/05/15 11:33 AM

  • Oracle-Regular / Oracle Database Upgrade, Migration & Transformation Tips & Techniques / Edward Whalen / 605-0

    Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 5

    Copyright © 2015 by McGraw-Hill Education

    Step Operation Description Done?

    9 Migrate temporary tablespace temp file(s) to ASM

    Create a new temp file for all temporary tablespace(s) on the chosen ASM disk group(s).

    10 Switch FRA to ASM Modify DB_RECOVERY_FILE_ DEST to ASM storage.

    11 Restore/rebuild database backups to FRA on ASM

    Optionally, restore any existing backup files to the FRA on its new ASM disk group(s).

    12 Validate the migration Validate that all database files have been successfully migrated per expectations

    CHECKLIST 5-3A Phased Migration from Non-ASM to ASM Storage: Completion (Continued)

    Checklist_Chapter 5.indd 6 18/05/15 4:55 PM

  • Oracle-Regular / Oracle Database Upgrade, Migration & Transformation Tips & Techniques / Edward Whalen / 605-0

    Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 6

    Copyright © 2015 by McGraw-Hill Education

    Step Operation Description Done?

    1 Determine source and destination platform endianness

    Verify source and platform endianness. If different endianness is detected, decide where the RMAN CONVERT command will be executed.

    2 Verify transportability of selected tablespace set

    Confirm that

    ■ Tablespaces selected are indeed part of self-contained set.

    ■ Database character set is identical (or at least that the destination database’s character set is a superset of the source database).

    3 Create transportability inf