Good morning everyone. Today i want to share about cloning ORACLE Database using SAN Storage utility. In database concept, storage are the end location of data. So, technically we can clone one database to the others database by copying the storage. This is current my environment spesification: Oracle Database 11gR1 with ASM running on AIX Server, HP 3PAR Storage.
Step 1: Create Virtual Copy Set from 3PAR
The important thing before we create virtual copy from HP 3PAR system are we need shutdown the source database and asm instance to ensure there in no unexpected block movement from the source. So please shutdown your database and asm instance using sqlplus😛
after that, please open HP 3PAR console management. Go to Provisioning open Virtual Volume Sets and right click until the popup shown and choose “Create Virtual Copy”
and then you can choose some detail option for your virtual copy process.
You can schedule it, or running at that time for virtual copy process. You can setup name for your virtual copy. For database cloning, please choose Read/Write options and click OK and wait for a moment.
you can find your virtual copy disk in “Unexported” location after the storage finish the process. If you dont have Virtual Volume Sets, you can create the virtual copy manually, one by one in “Virtual Volumes” list.
Step 2: Assign Virtual Copy Volume to TheTarget Environment
in this step, you just need to assign the virtual copy disk to the target environment using 3PAR management console. So, we need export that disk to the target server first.
Block all the new virtual copy disk, right click on them and then choose “Export…” option. After that you can choose where target system to be.
then choose your target server
Please check the summary page before completing this step and click “Finish” button.
Step 3: Setup The Disk to be Identify by ASM Instance
My target server are AIX server. So my target server need to be recognize the new additional disk. I use “cfgmgr” tools and run it as root account.
next, you need to configure the new disk name same as the source server. You can check it from source ASM instance using script “select path from v$asm_disk;” on your sqlplus.
After that you can create filesystem node using “mknod” script with same configuration between source and target
after mknod process complete, don’t forget to change owner and change permission the disk to asm disk owner and asm disk permission using “chown” and “chmod 660“. After that you can turn on your asm instance
Step 4: Configure your Target Database
This is very simple step, you just need to copy your source database pfile or spfile to the target database. You can find your pfile on $ORACLE_HOME/dbs/ folder, which the name similar with “init<SID>.ora” prhase. if you using spfile, you can generate your own pfile copy from spfile using “create pfile=’/home/oracle/initDB.ora’ from spfile;‘ on your sqlplus
copy that file to $ORACLE_HOME/dbs folder on target server. And you can start your target database.
Don’t forget to disable archivelog mode because the archive log will consume your virtual copy space rapidly. Thanks