2012-10-01 06:08 AM - edited 2015-12-18 12:37 AM
I am working on a procedure to automate cloning of Oracle databases, using snapshots created with Snapcreator and snapmirrored to a remote location. The snapmirror destinations should be used
as parents for the flexclone volumes. Snapcreator allows me to create a clone using a vsm secondary volume, which is what I want.
But looking at the way Snapcreator creates the backup of the source database, I have some questions about how to perform a database clone.
For a given database, 2 netapp volumes are used, one for the database datafiles and another one for the archived logs. The SC job takes a snapshot of those 2 volumes, then triggers a VSM update
and a snapvault update as well.
Looking at the logs, to summarize, SC first puts the DB in backup mode, then it takes a snapshot of all the volumes defined in the profile (datafiles + archived logs), then it takes the DB out of backup mode, and finally issues an "alter system archive log current" command which archives the current redo to the archive log volume. The problem I have here is that this very last archive log containing the redo entries created while the DB was in backup mode is not present in the snapshot created on the archive log volume. Because of this, a single SC backup unit (including a consistent snapshot taken at the same time on the datafile and archived log volumes) does not contain all the files I need to clone and start an Oracle database (I am missing the last redo file that will allow me to bring the clone to a consistent state). There are manual workarounds to this, but they're not elegant. Are there ways to use SC the same way SMO works? SMO treats the archived log volume differently from the datafile volumes, because it recognizes the difference between archived log volume and other volumes. So it will take the snapshot of the archived log volume after the "alter system archive log current" command is issued. This makes a SMO backupset complete from a cloning perspective.
I'd like to get guidance on how to use Snapcreator in a way that would really mimic SMO. Should I call the snapshot of the archived log volume as a post command? Can a post command be a snapcreator command itself? How can I use snapcreator to create a snapshot with the same name as the "calling" profile?
Thanks in advance for any comment on this
Solved! SEE THE SOLUTION
2012-10-01 11:34 AM
Short answer yes!
This is what the META_DATA_VOLUMES is for. It was introduced in SC 3.5 but you would specify the logs volume META_DATA_VOLUME=filer1:log_vol VOLUMES=filer1:data_vol,log_vol. You mus have a separate log and data volume to do this.
Another way to do it is to setup two configs one config backs up data files so just data volume and other archive logs volume and then in that config you would use the ARCHIVE_LOG_ONLY=Y option. Then you could run the archive log config right after the data config or even as a post command.
Hope this helps