Oracle Clone Tutorial: How to Clone a Large Oracle Database, Really, Really Fast!

Oracle Clone Tutorial

Take the pain out of cloning! Take the time out of cloning!

Learn how to duplicate (copy) an Oracle database in minutes – no matter how large – with Oracle DNFS.

Do you need to provide read-write clone databases for testing or development? Do you need to do it fast, simply, and with minimal disc space? This free Oracle Database Clone Tutorial will show you how.

Cloning databases can be slow, painful, and requires lots of disc space. Not any more. We can use copy-on-write technology to create as many independent clones as you want, all based on one backup of the source database. Creating a clone takes minutes, no matter how big the database is. The space used by each clone is only the space needed to record changes made within the clone (so initially, zero.) As far as your users are concerned, each clone is an independent database. They will have no idea that they are all sharing a common source.

This facility (based on Oracle’s Direct NFS technology) was introduced in release and formally documented in 12.1.x.

Presented by Oracle Certified Master John Watson, SkillBuilders’ Director of Oracle Database Services.

This free tutorial is segmented into several separate lessons:

  1. Introduction to John Watson, SkillBuilders Director of Oracle Database Services (1:32)
  2. Agenda (1:19)
  3. Clones, Clones and More Clones. Too Many Clones? (6:19)
    John explains the reasons for creating clones and demonstrates DBMS_WM, the Oracle supplied Workspace Manager package, in the hopes of demonstrating a technique for creating *less clones*.
  4. Cloning the Old Way (1:36)
    John explains the three traditional cloning techniques: manual scripting, Data Guard and RMAN.
  5. Cloning Issues and Sample Script (3:41)
    John demonstrates (examples) cloning via a script we wrote to clone databases daily.
  6. Introducing DNFS Copy on Update to Clone (8:16) (click on video below)
    John explains a new technique for cloning : using Direct Network File System (DNFS) Copy-on-Update
  7. DNFS Cloning Technique and Demonstration (19:06)
    John demonstrates (examples) the new technique for cloning : using Direct Network File System (DNFS) Copy-on-Update
  8. Demo Creating Additional Clones ( In 2 Minutes! ) (3:40)
    In 2 minutes and 11 seconds, John demonstrates creating an additional clone – of any size!
  9. Review Technique and Limitations (3:23)

Date: Aug 14, 2013

NOTE: Some corporate firewalls will not allow videos hosted by YouTube.


Introducing DNFS Copy on Update to Clone

Lightning Fast Cloning of Oracle Databases


Session 6




>> John:  That’s using Oracle’s direct NFS drivers. The direct NFS drivers were introduced in version 11 and with later releases and actual facility was just slotted in to what you could do with direct NFS.




The ability that was introduced in was a copy on update capability. So when you get through your data files through the direct NFS driver, we have the capability to point the database instance towards in effect two copies of the data files. One copy is a read-only, totally static version of the data files. The other copy of the data files, stored-only changes.


So in normal operation end users connect to the clone and all their queries will be operating against the read-only frozen back-up of the data files. Whenever they do DML in the background, the direct NFS driver will copy just the changed blocks to a copy of the data file that’s specific for the clone.




So what is that mean? You back up your source database once only – a one-off backup. Then you create as many clones as you want – one clone, two clone, three clones, four clones, as many clones as you want instantaneously – virtually instantaneously because they’re all be reading from that original copy.


They can be on different machines or they can be on the same machine. The copy can be on a local machine or the copy can be on a remote machine. But one way or another, the clones will be instances reading from a copy and whenever they do DML, the changed blocks will be written to storage local and specific to each clone. So each clone requires minimal extra storage.


The clones appear to to users to be completely independent. You can do anything with them – DML, DDL, queries, anything at all. The end result of this is that a multi terabyte clone can be created in just a couple of minutes and the multi terabyte clone will take up in effect zero disk space until you start doing a lot of DML against it.




Now this is introduced in and with 12c, it’s been formalized. It’s been formalized quite nicely and Oracle’s even providing a script to [2:24 inaudible] tend to use that makes it easier. With earlier releases it’s a bit tricky to setup whereas it’s a pretty straight forward now.


Notes, it’s does rely on using direct NFS but you do not need and NFS server. The way I’m going to demonstrate it now is all going to be on one machine. I’ll create an NFS shared but it will just loop back to a local file system. Yes, we’re using the direct NFS client but we are not in fact using any networking capabilities.



Copyright 2017

Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!