Migrate databases from other storage systems to ASM

Source: Internet
Author: User

Oracle ASM (Automatic Storage Management System) is a database file storage management system officially provided by oracle. Compared with other file storage systems, AMS has specific advantages in load balancing, performance optimization, and redundancy protection. Currently, ORACLE recommends that the database use AMS to store the corresponding files of the database. In 11g RAC mode, you can only use ASM to manage storage or OCFS to manage storage. Bare devices cannot be used as shared storage. In this experiment, the simulation database is migrated from a common file system (data files are directly stored in the operating system) to the oracle asm storage.

Environment:

Disk groups involved in migration:

Sys @ + asm (asm.com)> create diskgroup fra external redundancy disk '/dev/asm * [n-s]';

Sys @ + asm (asm.com)> create diskgroup data external redundancy disk '/dev/asm * [B-m]';

Name of the database to be migrated: szpms

 

I. Preparations

1. Compatibility Parameter validation COMPATIBLE

If the database initialization parameter COMPATIBLE is less than 11.0.0

Tablespace is set to read/write tablespace.

SQL> show parameter compatible

 

NAME TYPE VALUE

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

Compatible string 11.2.0.4.0

 

2. If the database is a physical standby database, stop log application recovery.

The logical standby database is a copy of the primary database and used for disaster recovery. Run the following command to stop log application restoration.

SQL> ALTER DATABASE RECOVERY MANAGED STANDBY DATABASE CANCEL;

Keep this terminal window open.

 

3. Copy the spfile or pfile to the temporary storage location.

$ Cp spfileszpms. ora orig_spfileszpms.ora

 

4. open a new window and connect to the target database using RMAN

$ Rlwrap rman target/

 

5. Back up data files to the ASM disk group

Use Level 0 Incremental backup. Similar to full-database backup, level 0 backup backs up all used data blocks in the database, but full-Database Backup cannot be used as the starting point of Incremental backup.

Backup script:

Run

{

Allocate channel dev1 device type disk;

Allocate channel dev2 device type disk;

Backup as copy incremental level 0 database format' + data 'tag'ora _ asm_migration ';

}

 

6. Check whether the BCT feature is enabled (optional)

If the BCT feature (block change tracking) is enabled, you can perform a level-1 Incremental backup to recover the database later.

{

Allocate channel dev1 device type disk;

Allocate channel dev2 device type disk;

Allocate channel dev3 device type disk;

Allocate channel dev4 device type disk;

BACKUP AS COPY

Incremental level 1

Database foramt '+ data'

TAG 'ora _ ASM_MIGRATION ';

}

 

7. If the archive mode is enabled for the database, use the following command to archive the current redo log

RMAN> SQL "ALTER SYSTEM ARCHIVE LOG CURRENT ";

 

8. If spfile is used by the database, back up the spfile

RMAN> backup as backupset spfile;

9. If BCT is enabled, disable

SQL> select status, filename from v $ block_change_tracking; -- query whether the BCT feature is enabled

RMAN> SQL "ALTER DATABASE DISABLE BLOCK CHANGE TRACKING ";

 

10. If flashback database is enabled, disable and delete all restore points first.

SQL> select FLASHBACK_ON from v $ database; -- check whether the flashback database feature is enabled.

RMAN> SQL "ALTER DATABASE FLASHBACK OFF ";

RMAN> SQL "DROP RESTORE POINT Q106 ";

 

11. Close the database (clean)

RMAN> shutdown immediate;

 

 

Recommended reading:

How to change the password of ASM sys

How to copy data files in ASM to the Operating System

Restoration After all Oracle 11g rac asm disks are lost

Oracle 11g from entry to proficient in PDF + CD source code

Installing Oracle 11g R2 using RHEL6 ASM

Oracle 10g manual creation of the ASM Database

Solutions to various problems after installing Oracle 11gR2 in Ubuntu 12.04 (amd64)

How to change the sys password of Oracle 10g ASM

  • 1
  • 2
  • Next Page

Related Article

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.