Steps To Migrate / Move a Database From Non-ASM to ASM And Vice-Versa [ID 252219.1

2010-05-14  来源:本站原创  分类:Database  人气:162 

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.7
Information in this document applies to any platform.

Purpose

This article describes the steps to migrate a database from Non-ASM to ASM and vice-versa.

To setup ASM, please follow

Note 452924.1 - How to Prepare Storage for ASM
Note 265633.1 - ASM Technical Best Practices
Note 249992.1 - New Feature on ASM (Automatic Storage Manager).

Scope and Application

A scheduled downtime is needed.

Steps To Migrate / Move a Database From Non-ASM to ASM And Vice-Versa

Step 1: Edit the pfile / spfile of DB to point the new control_file location on ASM

Eg: if your disk group name is '+ DATA'

control_files = '+ DATA / <dbid> / control01.ctl'

The setting here is actually an alias for the controlfile.

For 10gR1 or you don't want to use an alias for controlfile, please set control_files = '+ DATA' and use the following note to update the parameter again in the pfile / spfile after the controlfile is created at step # 3.

Note 468458.1 - How To Move Controlfile To ASM

If you later want to duplicate an extra copy of control file, please see

Note 345180.1 - How to duplicate a controlfile when ASM is involved

Step 2: Startup the database in nomount state

SQL> Startup nomount

Step 3: From RMAN session, copy the control file from old location to new location

RMAN> CONNECT TARGET

RMAN> RESTORE CONTROLFILE FROM '/ u01/TST/control01.ctl';

Here / u01/TST/control01.ctl is the old location of control file.

Step 4: From SQL session, mount the database

SQL> ALTER DATABASE MOUNT;

Step 5: Using RMAN, copy the datafile from NON-ASM to ASM

RMAN> BACKUP AS COPY DATABASE FORMAT '+ DATA';

Step 6: Using RMAN, rename the datafile, using the following command

RMAN> SWITCH DATABASE TO COPY;

Step 7: Switch tempfile and open database.

RMAN> run (
set newname for tempfile 1 to '+ DATA';
set newname for tempfile 2 to '+ DATA';
...
switch tempfile all;
)

RMAN> ALTER DATABASE OPEN;

Step 8: Do the following maintenance

SQL> SELECT a.group #, b.member, a.status FROM v $ log a, v $ logfile b WHERE a.group # = b.group #;
SQL> ALTER DATABASE ADD LOGFILE MEMBER '+ ASM_Disk_group' TO GROUP 1;
SQL> ALTER DATABASE ADD LOGFILE MEMBER '+ ASM_Disk_group' TO GROUP 2;
SQL> ALTER DATABASE DROP LOGFILE MEMBER'';
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER DATABASE DROP LOGFILE MEMBER'';
SQL> ALTER SYSTEM SWITCH LOGFILE;

... Repeat for * all * online redo log members.
A redo log member can only be dropped after being archived and being in INACTIVE mode. If needed, switch logfile multiple times until the logfile is ready for dropping.

STEP of MIGRATION from ASM to NON-ASM

1. Start your database with ASM.

2. Create pfile from spfile.

3. Edit pfile / spfile to reflect controlfile name in file system location.

4. Startup nomount the DB.

SQL> Startup nomount

5. Use RMAN to copy the control file from ASM to NON-ASM.

RMAN> RESTORE CONTROLFILE FROM'';

6. Mount the DB.

SQL> alter database mount;

7. Use RMAN to copy the database from ASM to NON-ASM.

RMAN> BACKUP AS COPY DATABASE format '/ u01/oradata/nonasmdb/datafile /% U';

8. From RMAN.

RMAN> SWITCH DATABASE TO COPY;

9. Recreate the tempfile and redo logs as before. See step 7 and 8 above.

相关文章
  • Steps To Migrate / Move a Database From Non-ASM to ASM And Vice-Versa [ID 252219.1 2010-05-14

    Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.7 Information in this document applies to any platform. Purpose This article describes the steps to migrate a database from Non-ASM to ASM and vice-versa. To setup ASM, plea

  • rails3.0.1 migrate to mysql database from sqlite3 2010-10-21

    rails3.0.1 migrate to mysql database from sqlite3 Error: d: \ ror \ myapp> rake db: migrate (In d: / ror / myapp) rake aborted! !!! Missing the mysql gem. Add it to your Gemfile: gem 'mysql', '2 .8.1 ' - Obviously installed mysql Reasons: rails3 mana

  • David Mytton Why migrate from MySQL database to MongoDB 2010-08-27

    Inscription: Quit work, at home idle is idle, studied under non-relational database, and happened to see the robbin write Big Brother "NOSQL database of" we urgently want to study, the aware MongoDB some basic knowledge, the went to look up unde

  • To grasp the steps to restart the Oracle database 2011-05-09

    In practical applications, sometimes working to restart the database . This article describes a special practical steps, we want to help . 1. Stop the application layer of the various procedures 2. Stop the monitoring process Oralce $ lsnrctl stop 3.

  • Database into the data to return the primary key ID value of the current method with the mind 2011-09-05

    When we insert a data, we often want to immediately get back the current into the primary key to do it with. We usually practice the following categories: 1 First select max (id) +1, then +1 as the primary key value after insert the database; (2) use

  • Ruby on Rails command reference 2010-03-03

    1.1.Rails 1.1 Create a Rails application $ Rails app_name Options: -D, database = xxx specify the installation of a database (mysql oracle postgresql sqlite2 sqlite3), default is the database -R, ruby-path = specify the Ruby installation path, if not

  • Rails command Daquan 2010-03-11

    1, create a Rails application $ Rails app_name Options: -D, database = xxx specify the installation of a database (mysql oracle postgresql sqlite2 sqlite3), default is the database -R, ruby-path = specify the Ruby installation path, if not specified,

  • A simple rails application development process 2010-07-03

    Basic environment: rails2.3.8 ruby1.9.1 netbeans for ruby 6.8 webrick windows xp Reference: http://netbeans.org/download/flash/jruby_on_rails/jruby_on_rails.html "Application of Agile Web Development rails third edition" Originally not wanted to

  • "RUBY QUIZ - The Solitaire Cipher" 2009-03-13

    This will begin a long process of translation, the initial translation, the translation is incorrect, please point out ... ... do not understand the look of the original look. RUBY QUIZ I will translate some testing, and RUBY language to explore and

  • 30 best jQuery form plugin 2010-05-09

    The emergence of jQuery for our development work has brought great convenience, but many on the emergence of jQuery Plug-ins on as if we install in Firefox, but never bored with the same sorts of plug-in, leave you with today is carefully selected fo

  • How to Copy Archivelog Files From ASM to Filesystem and vice versa [ID 944831.1] 2010-05-14

    Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.3 to 11.1.0.7 Information in this document applies to any platform. Goal This note will guide a DBA in copying archivelog files currently located in a ASM diskgroup to a file system. Th

  • [转载做哈笔记]single sign-on 2014-11-28

    Single Sign-On Jani Hursti Department of Computer Science Helsinki University of Technology 1997-11-19 [email protected] Abstract Single Sign-On systems consist of the methods designed for securely and easily authenticating users in a heterogeneous

  • Steps to create a database manually Oracle 2010-05-13

    In addition to native Oracle DBCA to create a database that, there is another way to create, is to manually create the database, but also as a DBA must be mastered. To introduce the following steps to manually create the database: Manually create a d

  • Oracle database, several major steps to manually create 2010-09-16

    http://database.51cto.com/art/201002/184885.htm Manually create a database usually contains the following steps : 1. Determine the new database name and the instance name : 2. Determine the database administrator authentication method : 3. Creating i

  • Query the database using JDBC 2010-04-21

    JDBC API's core components: 1.DriverManager categories: term tracking of available JDBC driver and create a database connection. 2.Connection interface: access database information, generate a database statement, and manage the database transaction.

  • Oracle Database issue summary (part of the switched network) 2010-06-03

    1.Oracle basic types of databases that when you create a data table in the database, you need to define the type of all fields in the table. ORACLE There are many kinds of data types to meet your needs. Some data types are divided into: character, nu

  • Records: Mobile Oracle database tablespace files 2010-07-30

    Move Oracle database table space file. Objective: to oracle tablespace files move from one place to another place. Cause: The current instance of the table space file and the file system table space on a hard disk on the whole, resulting in IO to inc

  • SQL SERVER 2000 Data Recovery (attach separate database + Database) 2010-09-15

    An isolated database SQL Server 2000 database to allow separation of data and transaction log files, and then re-attached to the same or another server. Separate database from SQL Server to delete the database, so when click on the "separation of the

  • [Android2D game development Thirteen] (save game data [below]) Detailed SQLite storage, and the SQLite database file is stored in the SD card!!! 2011-01-04

    Shoes with you on a SharedPreference and File stream introduced how to store data, and recommended FileOutputStream / FileInputStream to store game data we, then this article is to introduce another as data storage for the way the game: SQLite light

  • Lightweight SQLite database 2011-01-05

    SQLite is a lightweight database that is designed to embedded, and it takes very little resources, in embedded devices, only a few hundred KB !!!!! SQLite features: Lightweight only need to use SQLite with a dynamic library, you can enjoy its full fu