DBA Tips Archive for Oracle
Moving ASM Database Files from one Diskgroup to Another
by Jeff Hunter, Sr. Database Administrator
There are times when it becomes necessary to move Oracle ASM database files from one diskgroup to another. As with most tasks that involve file management in Oracle ASM, RMAN is the easiest and preferred method as ASM files cannot be accessed through normal operating system interfaces. In this article, I will detail the steps required to move Oracle ASM files from one diskgroup to another using RMAN.
The steps used in this article assume the following configuration.
|ASM Disk Groups||+TESTDB_DATA1
|Operating System||Red Hat Linux 3 - (CentOS 3.4)|
|Oracle Release||Oracle Database 10g Release 2 - (10.2.0.2.0)|
This article assumes the database is open and in ARCHIVELOG mode.
The following query lists the available ASM diskgroups and the database files they contain
Now let's take a look at the steps used to move an Oracle ASM database file from one diskgroup to another.
The first step is to identify the Oracle ASM database file(s) that needs to be moved. In this guide, a single file (+TESTDB_DATA2/testdb/datafile/app_data.256.598127837) will be moved from one disk group to another disk group.
Identify the Oracle ASM diskgroup to which the database file will be moved to. There are a total of three ASM diskgroups defined for the example database. For the purpose of this guide, the previously identified database file will be moved from the +TESTDB_DATA2 diskgroup to the +TESTDB_DATA1 diskgroup.
Take the Oracle ASM data file to be moved OFFLINE.
Make a copy the Oracle ASM database file to be moved. There are two methods that can be used to perform the copy operation; however, I will only cover the RMAN method.
After successfully executing the RMAN statement above, you will now have two copies of the Oracle ASM database file.
Now that the file has been copied, update the Oracle data dictionary with the location of the new Oracle ASM database file to use.
After Oracle successfully renames the ASM database file in the data dictionary, it will remove the original ASM database file (+TESTDB_DATA2/testdb/datafile/app_data.256.598127837).
Use RMAN to rename the ASM database file copy.
Recovery the new ASM database file.
Bring the new ASM database file ONLINE.
Verify the new ASM data file location.
Delete the old ASM database file from its original location.
If this step needs to be performed, it will need to be executed from the actual Oracle ASM instance.
Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and an Oracle ACE. Jeff currently works as a Senior Database Administrator for The DBA Zone, Inc. located in Pittsburgh, Pennsylvania. His work includes advanced performance tuning, Java and PL/SQL programming, developing high availability solutions, capacity planning, database security, and physical / logical database design in a UNIX / Linux server environment. Jeff's other interests include mathematical encryption theory, tutoring advanced mathematics, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 20 years and maintains his own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science and Mathematics.
Copyright (c) 1998-2014 Jeffrey M. Hunter. All rights reserved.
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at firstname.lastname@example.org.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.
Last modified on
Tuesday, 17-Jan-2012 20:25:46 EST
Page Count: 93412