Alejandro Vargas' Blog

  • July 5, 2007

RAC on ASM replication using an NFS mounted File System

Alejandro Vargas
Technical Leader, ACS Global Delivery, Infrastructure & BigData

One of the RAC environments I'm working with is a very critical production database, there are several development, test and training clones of it, and from time to time a new clone needs to be created.

The main backup strategy we are using is based on EMC snapshots, so we can easily create clones from snapshots.

Still sometimes you get not standard requirements, or find circumstances that require creative solutions.

The special request was:

  • Replicate the 64 bit prod database to a 32 bit training environment
  • Production is ASM based, training will be File System based
  • There is no, and cannot be communication between Prod and Train
The workaround I did use has several steps but worked fine:
  1. Open read-only a prod snapshot on a recovery server. In my case I did use a server where we automatically open read only the prod snapshots for backup verification.
  2. Mount NFS the data File System of the training server on the recovery server
  3. Generate a create controlfile script using :

             alter database backup controlfile to trace;

  4. Find the trace on user_dump_destination, rename it to CRCTL.sql and move it to the NFS mounted File System
  5. Backup the database using rman backup as copy. You will get files named like:


  6. Once the backup finish make a list of the file names order according the FNO-# ; from FNO-1 until the last file
  7. Optionally you may rename the files to a more simple name, like :

    mv data_D-PRODDB_I-2123417810_TS-UNDOTBS2_FNO-21_g5il8cge UNDOTBS2_01.dbf

  8. Edit the create controlfile script, change the database name using the 'set database ' clause. Replace the datafile names on the CRCTL.sql script you generated on step 3 with the names of the datafiles you got from Rman (or you renamed on step 7) take care to order them according their File Number: FNO-1, FNO-2 etc.
  9. If this is the first time you clone a database in this server you will need to create the init.ora, and set the bdump, udump, cdump and archived log destinations
  10. Recreate the controlfile using the CRCTL.sql and open the database with resetlogs.
  11. Shutdown the database and open it in migrate mode:

              startup migrate;

  12. Execute utlirp.sql to change the word size from 64 to 32 bits


  13. Shutdown immediate
  14. Startup normal
The database I worked with was a 500GB database, I did use a 2 CPU Linux box to open it read only and backed it up using 8 channels. The throughput was of 1GB per minute.

This is the rman script:

echo `date` >start.backup

# Environment Variables
# ---------------------
export ORACLE_SID=proddb
export ORACLE_BASE=/u01/app01/oracle
export ORACLE_HOME=/u01/app01/oracle/product/

# Path Variables
# --------------
export BASE_PATH=/u01/app01/oracle/scripts/general:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/u01/app01/oracle/scripts



# Backup database
# ---------------
rman target / nocatalog <<EOF
run {
allocate channel backup_disk1 type disk format '$v_bdest/%U';
allocate channel backup_disk2 type disk format '$v_bdest/%U';
allocate channel backup_disk3 type disk format '$v_bdest/%U';
allocate channel backup_disk4 type disk format '$v_bdest/%U';
allocate channel backup_disk5 type disk format '$v_bdest/%U';
allocate channel backup_disk6 type disk format '$v_bdest/%U';
allocate channel backup_disk7 type disk format '$v_bdest/%U';
allocate channel backup_disk8 type disk format '$v_bdest/%U';
backup as COPY database include current controlfile;
release channel backup_disk1;
release channel backup_disk2;
release channel backup_disk3;
release channel backup_disk4;
release channel backup_disk5;
release channel backup_disk6;
release channel backup_disk7;
release channel backup_disk8;

echo `date` >end.backup
# EOF backup_to_fs

Join the discussion

Comments ( 1 )
  • Tony van Esch Friday, August 10, 2007
    HI Alejandro,
    very interesting how you solved this issue. But if it were a different platform aswell? In 10.2 there is the option of using 'convert database' with rman.
    regards, Tony van Esch
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.