Site icon Database Tutorials

How To Transfer a Database in the File System To ASM

 

This article describes how to move a database in the file system into ASM. First, Grid Infrastructure installation is required. We are creating two disk groups named DATA and FRA. The following steps are as follows.

First of all, we close the database and create a pfile from the existing spfile. We need to add new parameters in Pfile.

After these changes, we will need to create spfile in ASM.

 

Add the following parameters to “/tmp/initORCL.ora”.

 

We’re backing up the existing spfile under “$ORACLE_HOME/dbs” and copying the updated pfile to this directory.

 

We create spfile in ASM.

 

We are opening the database in nomount mode for the control file restore operation.

 

We create a copy of the database in + DATA.

 

With the following switch operation, we set the copies in +DATA as the actual files of the database.

 

The database is now running in ASM, and the database files in the file system are marked as copies.

We can begin operations after the switch. First of all, we will create temp tablespace in ASM and drop the current temp tablespace.

 

We complete Redolog operations.

 

If you encounter with an error such as the following when you drop the log file, you can correct it with the redo log switch and checkpoint operations.

 

Finally, we delete the copy in the file system.

 

Subsequent operations are required to automatically open the database and view the correct spfile from the pfile.

 

spfile pfile operations:

Because the spfile is now in the +DATA disk group, the initORCL.ora (pfile) file under dbs must also point to this spfile.

We change the contents of the initORCL.ora file under the $ORACLE_HOME/dbs directory as follows.

In this way, in the next restart process, the database will see the spfile in the +DATA disk group and open it from there.

 

Adding database information to Cluster:

The following operations are required to include our database in the cluster.

 

Our database has started to work in ASM completely.

Exit mobile version