I had a question from one of my customers about the available fast cloning options for Oracle databases. This customer has a supercluster on the production site and another supercluster on the DR site.
The client requirement is to be able to prepare a new Test/Dev database in minutes , not hours for their large databases.
So, I prepared the following valid cloning options and presented them for my client. This is a very high level explanation for these options and you may need to drill down if one option is interested to you.
Also, I’m sure that there may be some other options that I’m not aware of, please let me know if you have other fast cloning options.
Option #1 Using Data Guard
If you just need a database for query/reporting, you may use the standby database to fulfill this without any extra license. The only drawback of this is that the synchronization between the primary and the standby databases will stop while you are using the database for reporting.
Option #2 Using Active Data Guard
It is the same as option #1, but you can use the standby database for query and at the same time synchronize the primary and standby databases. This requires additional license for the Active data guard.
Option #3 Using Data Guard with Snapshot Database
In this option, you will be able to open the standby database for read/write and whatever testing you want. When you finish testing you will convert the database back to normal standby database and resume synchronizing with the primary database.
Option #4 Using Exadata Snapshot Clone (Sparse Clone)
Exadata Snapshots are ideal for creating space-efficient read-only or read-write clones of an Oracle database that you can use for development, testing, or other non-production purposes, and when multiple clones are required because of disk space and time savings.
The following image depicts the space required for an Exadata Snapshot.
An Exadata Snapshot is based on a test master, which is a full clone of the source database. The test master is the only full copy of the source database. From a single test master you can create multiple Exadata Snapshots with minimal additional storage and minimal effort. Each Exadata Snapshot uses a small fraction of the disk space required for the test master and can be created or dropped in seconds. Each Exadata Snapshot is a logical copy of the test master.
Before creating Exadata Snapshots from the test master, you can modify the data in the test master, if required. For example, you can delete or mask sensitive data in the test master before making it available to non-privileged users.
Multiple users can create independent snapshots from the same test master. This enables multiple development and test environments to share space while maintaining independent databases for each user. The following image shows an Exadata environment with three Exadata Snapshots that use the same test master.
In addition to space and time savings, Exadata snapshots provide cost-effective development, quality assurance and test environments on Exadata. Exadata snapshots can be used by developers and testers who need to validate functionality, and practice maintenance and operational steps in a fully functional Exadata environment (for example, Exadata smart flash, smart scan, hybrid columnar compression).
==> This option requires database version 188.8.131.52 or higher
Option #5 Using the ASM ACFS Snapshots
Oracle ASM Cluster file system (ACFS) is a general-purpose POSIX, X/OPEN and Windows compliant file system designed for single node and cluster configurations. An Oracle ACFS snapshot is an online, point-in-time copy of an Oracle ACFS file system. ACFS snapshots based on Copy on Write capability are available on the Exadata platform when using Grid Infrastructure 184.108.40.206 or later.
Oracle ACFS supports all database files and general purpose files on Oracle Exadata Database Machine running Oracle Linux on database servers. Though the primary purpose of ACFS is to store general purpose files, it also supports storing database files. On Exadata Database Machine, Oracle ACFS supports the following database versions: Oracle Database 10g Rel. 2 (10.2.0.4 and 10.2.0.5), Oracle Database 11g (220.127.116.11 and higher) and Oracle Database 12c (18.104.22.168 and higher)
Oracle ACFS is managed using native operating system commands as well as the Oracle ACFS command line tool, acfsutil. Oracle ACFS is also fully integrated with Oracle Enterprise Manager Cloud Control.
Option #6 Using CloneDB
CloneDB feature can be used for creating storage efficient copies of Exadata database if the database backups are stored on an NFS share mounted on Exadata compute nodes. The Direct NFS Client (dNFS) CloneDB feature utilizes CoW technology and was introduced in Oracle Database 11g Release 1.dNFS is an implementation of the NFS client that runs as part of the Oracle Database engine. Through this integration, Oracle Database optimizes the I/O access path to the NFS server to provide improved performance, scalability, and reliability. By tuning the protocol to match typical database I/O, dNFS provides faster performance than can be provided by the operating system’s NFS driver. The CloneDB feature makes it possible to instantly clone an existing backup of a database mounted over dNFS. The clone process uses Copy on Write technology; so only the changed data file blocks need to be stored separately; the unmodified data is referenced directly from the backup files. Exadata’s native backup solution is to back up Oracle databases to the Fast Recovery Area (FRA). When Exadata is connected to network attached storage, the customer can choose to back up Oracle databases to an NFS share mounted on the compute node. In this scenario, the dNFS CloneDB feature can be used to create storage efficient copies of Oracle databases. Use of this feature will also mean that database clones will be using non-ASM file storage.
Option #7 Using EM’s Snap Clone
Enterprise Manager Snap Clone functionality is built on top of the Enterprise Manager 12c Storage Management Framework (SMF) plug-in. The SMF plug-in provides a layer of abstraction to shield DBAs and users from the nuances of the different storage systems. At the storage level, Snap Clone accesses underlying storage technologies, such as Copy On Write or similar technologies, to perform the required tasks. Snap Clone functionality can use either a hardware specific or hardware agnostic solution:
- Hardware vendor specific solution requires customers to connect a storage subsystem with Exadata and license clone and snapshot capabilities from the storage vendor. This method, currently certified for ZFS Storage appliances and NetApp Storage appliances, enables storage administrators to register storage appliances with Enterprise Manager, which then connects directly to the storage appliance to perform all required snapshot and clone operations. A major advantage of using ZFS Storage Appliance is the ability to support HCC seamlessly with Exadata. No other vendor offers this. This approach requires you to license the relevant options on the storage appliance, but it is the easiest, most efficient and fault tolerant approach.
- Vendor agnostic software solution requires Solaris 11 file system (ZFS) on physical or virtual server as a pre-requisite: This method connects to the storage via an intermediate (ZFS) file system. This is a storage vendor agnostic solution and can be used by any storage vendor, NAS or SAN. To configure this solution the storage administrator mounts the volumes to a Solaris server and formats it with ZFS file system. The ZFS file system then controls all snapshots and clone operations. The benefit of this approach is that it does not require thin cloning options to be licensed on the storage since ZFS file system provides these required capabilities.
è Cloud Management Pack for 12c
Option #8 Oracle Database 12c Multi-Tenancy Snap Clone
With the Multitenant Option in Oracle 12c a second approach exists for cloning pluggable databases. Snapshot clones of PDBs can be created instantaneously if the storage is supporting C.O.W. The command is pretty simple:
CREATE PLUGGABLE DATABASE <pdbnew> FROM <sourceDB> SNAPSHOT CLONE;
Great command but what about the “storage supporting C.O.W.”? Do you need again an ZFS or another more or less expensive storage. Not at all: you can simply use ACFS – the Oracle Automatic Storage Management Cluster Filesystem. With Oracle 12c it is supported to use ACFS as filesystem for Oracle data files and this storage supports C.O.W. So even simpler as with the Oracle 11g CloneDB you should now be able to setup as many PDBs in one CDB as you like (up to the current max of 252).
Option #9 Using SMU Utility
The Oracle Snap Management Utility for Oracle Database simplifies, accelerates, and automates the process of copying, cloning, and protecting Oracle databases. It allows DBAs to do their jobs more effectively in less time, with greater flexibility and less dependence on storage administrators. By doing so, it helps reduce the company’s risk profile, speed up development and test efforts, and cut OpEx—without impacting performance.
The Oracle Snap Management Utility for Oracle Database is a standalone management tool specifically engineered to work with Oracle ZFS Storage Appliances. It provides:
- A simple, fast, efficient way to create and manage snapshot-based copies and clones of Oracle databases stored on Oracle ZFS Storage Appliances—all through the DBA’s console
- Support for any Oracle 10g or 11g database deployed on an Oracle ZFS Storage Appliance
- Support for Oracle Solaris, Linux, and Windows clients and database hosts, for databases configured for NAS or SAN storage types
- Support for Oracle Real Application Clusters (RAC)
The Snap Management Utility combines the underlying snapshot, clone, and rollback capabilities of the Oracle ZFS Storage Appliance with standard host-side processing so all operations are consistent. With the Snap Management Utility, DBAs no longer need to be dependent on IT personnel to backup, restore, recover, or clone databases, allowing both DBAs and storage administrators to focus on their specialty while unburdening IT of time-consuming tasks.
- This option requires license for the SMU utility + additional ZFS storage.
Option #10 Using Oracle Solaris Zone Clone
Following an Oracle RMAN–based backup. The cloneEnv.sh command will automatically create and instantiate independent Oracle Solaris Zones, perform the database cloning, and start all the zones and database instances in only a few minutes. The cloneEnv.sh script requires only the names of the Oracle Solaris Zones to be provisioned and their respective IP addresses to execute successfully. After the cloneEnv.sh script finishes execution, all the new zones are all up and running, including the cloned databases running inside them.
Donate to support our blogging work