oracle database 12c - oracle | integrated cloud … · oracle multitenant self-service provisioning...

Click here to load reader

Post on 15-Apr-2018

226 views

Category:

Documents

3 download

Embed Size (px)

TRANSCRIPT

  • An Oracle White Paper

    April 2014

    Oracle Database 12c

    Multitenant Snapshot Clones Using Oracle CloudFS 12.1.0.1

  • [*20. Header_2] Title of White Paper Here

    Executive Overview ........................................................................... 2

    Oracle Multitenant Architecture ......................................................... 3

    Oracle CloudFS Architecture ............................................................. 4

    Oracle ASM Dynamic Volume Manager (ADVM) ........................... 4

    Oracle ASM Cluster File System (ACFS) ....................................... 4

    Oracle Cloud File System Snapshot Overview .............................. 6

    Oracle Multitenant Snapshot Clones ................................................. 6

    Considerations .............................................................................. 6

    Requirements ................................................................................ 7

    Storage credentials ........................................................................ 7

    OMF or non-OMF compliance ....................................................... 7

    File Locations and Name Conversions .......................................... 8

    Creating Pluggable Database Snapshot Clones ................................ 8

    Scope ............................................................................................ 8

    Demo Environment ........................................................................ 9

    Step-by-Step ............................................................................... 10

    Oracle Multitenant Self-Service Provisioning .................................. 21

    Conclusion ...................................................................................... 25

  • [*20. Header_2] Title of White Paper Here

    2

    Executive Overview

    The growing volume of data and the cost associated with storing, managing and provisioning this data is an increasing concern in IT management today. IDC cites managing storage growth as the biggest pain point for IT managers and estimates exponential growth in capacity-optimized storage for 2013-20161. A significant portion of that data growth is attributed to copy data - copies of production data used for application development, testing, reporting, compliance, analytics and multi-user access. Oracle Multitenant in-database virtualization is an innovative consolidation solution for the Oracle RDBMS. Multiple pluggable databases are fully functional Oracle databases hosted in a container root database which provides database infrastructure for shared database operations. Oracle Multitenant works seamlessly with the Oracle Cloud File System (Oracle CloudFS is the 'umbrella' suite of ASM storage features and products) to provide a highly scalable, capacity-optimized database storage management solution. Leveraging copy-on-write storage technology, Oracle Multitenant pluggable databases are provisioned in seconds, an operation that would normally take days to weeks to complete. The integration of Oracle CloudFS and Oracle Multitenant allows database administrators to rapidly provision databases using a simple SQL command, thus eliminating the over-head currently required for these tasks. Application development teams for the respective lines of business are now empowered to provision and manage their own databases, independent from the production environment and from each other. Using the free Oracle Multitenant Self-Service provisioning application, database administrators, developers and analytics engineers can quickly provision new databases and/or database clones at the click of a button. This empowers lines of business to be more responsive and innovative in application development by provisioning and managing their own development data sets. This paper describes the advantages of Oracle Multitenant snapshot cloning using Oracle CloudFS, and offers a brief description of the Oracle Multitenant architecture, Oracle CloudFS architecture and a step-by-step walk through of pluggable database thin provisioning using snapshot cloning. This illustrates the complete integration of the two technologies, which together offer:

    a cost-effective storage and consolidation solution

    a fully integrated, agile data management solution

    a self-service database provisioning environment

    1 The copy data phenomenon was described in a blog by Ashish Nadkarni, IDC, June 7, 2013. It has been discussed before and after by various other storage blogs and online IT trade journals.

  • [*20. Header_2] Title of White Paper Here

    3

    Oracle Multitenant Architecture

    The Oracle Multitenant option for Oracle Database 12c is an innovative in-database virtualization solution for consolidation of Oracle 12c databases2. As shown in figure 1, the innovation is driven by the efficient use of the container database (CDB) memory and background processes to provide measurable efficiencies and greater consolidation density of distinct pluggable databases (PDBs).

    Figure 1.

    Each PDB is a self-contained database with schemas, objects, roles, privileges, and metadata stored in the PDBs system, sysaux and user tablespaces. Each PDB has its own set of data files independent of other containers in the CDB. This distinction allows for agile data mobility and management through PDB unplug/plug operations and rapid, thin provisioning of PDBs through snapshot clones. The new architecture that allows for this level of segregation, PDB data and metadata segregation from Oracle metadata, may be thought of as in-database virtualization. Oracle Multitenant features a horizontally partitioned data dictionary (see figure 2). Oracle database metadata is stored in the Root metadata dictionary and user data and metadata is stored in the

    2 For a complete description of Oracle Database 12c and Multitenant and the returns on CAPEX/OPEX, please see http://oracle.com/goto/multitenant.

  • [*20. Header_2] Title of White Paper Here

    4

    PDBs metadata dictionary. User metadata dependencies on Oracle metadata are resolved through metadata and object reference links.

    Figure 2. Horizontally partitioned Data Dictionary segregating user data/metadata from Oracle

    metadata with dependencies resolved through metadata and object reference links

    It is this level of segregated data and metadata that allows for independent snapshot copies of a PDB distinct from the host container (CDB).

    Oracle CloudFS Architecture

    The Oracle Cloud File System (CloudFS) provides unprecedented simplicity in storage management, automation and storage consolidation for general purpose volumes and files. CloudFS enables private storage cloud deployments with resource pooling, network accessibility, rapid elasticity and provisioning, that are the key cloud computing requirements. The CloudFS architecture, depicted in figure 2, includes the following components:

    Oracle ASM Dynamic Volume Manager (ADVM)

    ADVM provides common volume management services and a standard device driver interface for system administrators to manage volumes across different platforms. A device file is created automatically when a volume is created in an ASM disk group. This allows ASM Cluster File System (ACFS) and 3rd party file systems to use this device interface to create and manage file systems on ADVM Dynamic Volumes.

    Oracle ASM Cluster File System (ACFS)

    Oracle ACFS is a general-purpose POSIX, X/OPEN and Windows compliant file system designed for single node and cluster configurations. 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. ACFS supports

  • [*20. Header_2] Title of White Paper Here

    5

    advanced value-added data services including read-write, copy-on-write snapshots, asynchronous file system replication, Tagging as well as file system security and encryption.

    Figure 3. Oracle CloudFS components and Multitenant storage options for ASM or ACFS3

    As shown in Figure 3, when using ASM, database files for the various containers in a

    multitenant configuration (CDB$Root and the various PDBs) can be stored in ASM or, when

    configured, ACFS. For snapshot cloning of PDBs, only ACFS is supported.4

    3 In the following step-by-step exercise, the CDB is stored in ASM and the snapshot clones are stored in ACFS.

    4 Oracle Multitenant supports snapshot copy provisioning on ACFS, ZFSSA and NetApp. This paper focuses solely on ACFS support.

  • [*20. Header_2] Title of White Paper Here

    6

    Oracle Cloud File System Snapshot Overview

    An Oracle ACFS snapshot is an online, point-in-time copy of an Oracle ACFS file system. It may be read-only or read-writeable. The snapshot copy is space-efficient, using copy-on-write storage technology. Before an Oracle ACFS file extent is modified or deleted, its current value is copied to the snapshot to maintain the point-in-time view of the file system. Oracle ACFS snapshots are immediately available for use after they are created. The snapshots are created in the .ACFS/snaps/ directory of the ACFS file system. They are always online and available while the file system is mounted. In the event of data loss, an Oracle ACFS snapshot can support the online recovery of files inadvertently modified or deleted from a file system by using the snapshot version for recovery.

    Oracle ACFS supports up to a total of 63 read-only, read-write, or combination of read-only and read-write snapshot views per file system. An Oracle ACFS snapshot can also be used as the source of a file system or database backup, as it can be created on demand to deliver a current, consistent, online view of an active file system.

    You can create a snapshot from an existing snapshot in the same Oracle ACFS file system. In addition, you can convert a snapshot between read-only and read-write formats. To create snapshots, the disk group compatibility attribute for ADVM must be set to 12.1 or higher.

    Oracle ACFS snapshot storage is maintained within the file system, eliminating the management of separate storage pools for file systems and snapshots. Oracle ACFS file systems can be dynamically resized to accommodate additional file and snapshot storage requirements.

    For more information on Oracle ACFS refer to the Oracle Automatic Storage Management

    Administrator's Guide 12c Release 1 (12.1.) E17612020.

    Oracle Multitenant leverages the underlying ACFS snapshot capability, allowing DBAs to create snapshot clones of PDBs from the SQL command line. PDB snapshots are managed using SQL through CREATE, DROP, and ALTER commands. Although the ACFS command line tool acfstuil can be used to manage snapshots in the snapshot file system. All snapshots related to PDB cloning must use SQL, Oracle Enterprise Manager or the Oracle Multitenant Self-Service Provisioning Application. Do not use acfsutil to manage snapshot clone PDBs.

    Oracle Multitenant Snapshot Clones

    Considerations

    Oracle Multitenant provides two cloning modes for PDBs - full clones and snapshot clones. A full clones is a complete copy of the source PDB data files. This is the default if you do not explicitly invoke the SNAPSHOT COPY clause in the CREATE PLUGGABLE DATABASE statement. The statement CREATE PLUGGABLE DATABASE will create a full-copy clone of the PDB$SEED, a pre-seeded database present in each CDB.

  • [*20. Header_2] Title of White Paper Here

    7

    The SNAPSHOT COPY clause in the CREATE PLUGGABLE DATABASE statement leverages the underlying ACFS Copy-on-Write (COW) storage snapshot capability.

    Requirements

    The following requirements must be met to use the SNAPSHOT COPY clause:

    All of the pluggable data files of the source PDB must be stored on ACFS.

    The source PDB cannot be in a remote CDB.5

    The source PDB must be in read-only mode.

    If the PDB is created with the SNAPSHOT COPY clause, you can issue the drop pluggable database command on the parent PDB, e.g. source PDB for snapshot copy, with the INCLUDING DATAFILES clause, however, with ACFS, as the files are still in use by dependent snapshots, the files will have to be manually removed when the snapshot dependencies are removed.

    Storage credentials

    ACFS is tightly integrated with the Oracle RDBMS, the Oracle Grid Infrastructure and ASM volume management. For this reason, there is no requirement for separate storage credential key management and authentication.

    OMF or non-OMF compliance

    Oracle Managed Files (OMF) is a service that automates naming, location, creation and deletion of database files. Oracle Multitenant is fully OMF compliant for both ASM and ACFS data file storage. A globally unique identifier (GUID) will be automatically generated and embedded in the data file pathname for snapshot clones and OMF data files will have an OMF generated file name.

    Alternatively, Oracle Multitenant supports non-OMF directory naming conventions. It is possible to snapshot clone between the different directory naming conventions, however, file name or directory name conversion is required.

    5 This restriction is lifted in Oracle Database 12c, version 12.1.0.2.

  • [*20. Header_2] Title of White Paper Here

    8

    File Locations and Name Conversions6

    DB_FILE_CREATE_DEST

    The DB_CREATE_FILE_DEST is the session or system level parameter used to configure the default location for the creation of the operating system files for data files and temp files. If set, PDB data files will be created in this directory using OMF convention. If not set, the FILE_NAME_CONVERT clause must be used. FILE_NAME_CONVERT

    The FILE_NAME_CONVERT clause determines how the database generates the absolute path names of the data files for the PDB. The Oracle database will substitute the absolute path name for the target PDB directory. If you omit this clause, the default is OMF generated file names. If OMF is not used, the database will attempt to use the session or system parameter PDB_FILE_NAME_CONVERT.

    PDB_FILE_NAME_CONVERT

    If OMF is not used, the PDB_FILE_NAME_CONVERT session or system parameter is a one-to-one mapping of file name conversion from source to target. It is pattern replacement of the existing file name in the source for the renamed file name in the target.

    PATH_PREFIX

    The PATH_PREFIX clause of the CREATE PLUGGABLE DATABASE statement ensures that all relative directory object paths associated with the PDB are restricted to the specified directory and subdirectories. This is clause is used when relative path names are defined in the FILE_NAME_CONVERT clause. If OMF is used, this clause is ignored.

    Creating Pluggable Database Snapshot Clones

    Scope

    The following step-by-step PDB snapshot cloning assumes that the Oracle Grid Infrastructure with ASM is installed, configured and operational following the guidelines described in the Oracle Grid Infrastructure Installation Guide 12c Release 1 (12.1). The step-

    6 For a complete description and examples of these and other file name conversion clauses for PDB creation, please see the Oracle Database SQL Language Reference 12c Release 1 (12.1.) and/or the Oracle Database Administrators Guide 12c Release 1 (12.1) Chapter 38.

  • [*20. Header_2] Title of White Paper Here

    9

    by-step instructions also assume that an Oracle Multitenant Container Database (CDB) has been deployed and configured correctly.

    Demo Environment

    1 x4470 Server with 4 Intel Xeon 8-core processors @ 2.27GHz 512GB Memory 6 Front-end LSI SAS-2 HDDs 2.6.39-400.17.1.el6uek.x86_64 Oracle Database 12.1.0.1 OMF naming conventions used The ASM disks configured are the following: NAME PATH TOTAL_MB

    --------------- --------------- ----------

    DATA_0004 /dev/sdf 285148

    DATA_0003 /dev/sde 285148

    DATA_0002 /dev/sdd 285148

    DATA_0001 /dev/sdc 285148

    DATA_0000 /dev/sdb 285148

    An Oracle Multitenant Container Database (CDB) with the CDB$ROOT and PDB$SEED is configured in ASM storage7. The file system for snapshot cloning is a 1TB ACFS volume and file system created from the common +DATA disk group and mounted on /snapclones.

    7 The choice to segregate the CDB$ROOT and PDB$SEED by configuring them on ASM rather than ACFS is to provide isolation from the snapshot environment. Further isolation can be achieved by configuring a separate disk group mapped to a separate controller.

  • [*20. Header_2] Title of White Paper Here

    10

    Step-by-Step

    Executed by the GRID ADMIN or CDB ADMIN: ASM Disk Group configuration:

    ASM Disk Group Management, Volume and ACFS creation can be executed either on the command line or using the ASM Configuration Assistant, asmca, found in the $GRID_HOME/bin directory. This step-by-step instruction uses the asmca utility so that the work flow is clearly illustrated.

  • [*20. Header_2] Title of White Paper Here

    11

    Edit 12.1.0.0.0 Attributes for the +DATA Disk Group:

    Create Configure and Enable ASM Volume/dev/asm /snapclones-248:

  • [*20. Header_2] Title of White Paper Here

    12

    Enable the ASM Volume:

    Create 1TB ASM Cluter File System:

  • [*20. Header_2] Title of White Paper Here

    13

    Run ACFS Script:

    The acfs_script.sh simply mounts the ACFS file system as type ACFS and sets the correct ownership and permissions: #!/bin/sh

    /bin/mount -t acfs /dev/asm/snapclones-248 /snapclones

    if [ $? = "0" ]; then

    chown oracle:oinstall /snapclones

    chmod 775 /snapclones

    exit 0

    fi

    Confirm /snapclone access: [[email protected]: /]# mount |grep snapclones

    /dev/asm/snapclones-248 on /snapclones type acfs (rw)

    [[email protected]: /]# df -h /snapclones

    Filesystem Size Used Avail Use% Mounted on

    /dev/asm/snapclones-248 1.0T 2.1G 1022G 1% /snapclones

    [[email protected]: /]# ls -ld /snapclones

    drwxrwxr-x 4 oracle oinstall 4096 Apr 11 17:56 /snapclones

  • [*20. Header_2] Title of White Paper Here

    14

    Review the ACFS /snapclones file system from acfsutil:

    [[email protected]: /snapclones]$ acfsutil info fs /snapclones

    /snapclones

    ACFS Version: 12.1.0.2.0

    on-disk version: 39.0

    flags: MountPoint,Available

    mount time: Fri Apr 11 17:56:51 2014

    allocation unit: 4096

    volumes: 1

    total size: 1099511627776 ( 1.00 TB )

    total free: 1097290489856 ( 1021.93 GB )

    file entry table allocation: 32768

    primary volume: /dev/asm/snapclones-248

    label:

    state: Available

    major, minor: 250, 126977

    size: 1099511627776 ( 1.00 TB )

    free: 1097290489856 ( 1021.93 GB )

    ADVM diskgroup DATA

    ADVM resize increment: 67108864

    ADVM redundancy: unprotected

    ADVM stripe columns: 8

    ADVM stripe width: 1048576

    number of snapshots: 0

    snapshot space usage: 0 ( 0.00 )

    replication status: DISABLED

    The ACFS file system is ready for hosting PDB snapshot clone data files. The production database is stored in the ASM disks. For this exercise a full copy clone of the production database is copied to /snapclones/gold_image and plugged in to the container database for snapshot provisioning for test, dev, UAT, analytics and reporting environments. Plug-in PROD_DB in ASM from a backup copy of the PDB8: SQL> alter session set db_create_file_dest='+DATA';

    Session altered.

    SQL> set timing on

    SQL> set time on

    10:05:49 SQL> create pluggable database prod_db using

    '/snapclones/gold_image/gold_image.xml';

    Pluggable database created.

    Elapsed: 00:56:36.03

    11:03:10 SQL>

    8 In this exercise the PROD_DB was recovered from a backup. Had the PROD_DB PDB existed in this environment, a full copy clone to the /snapclones ACFS file system, as in the step below, would be executed.

  • [*20. Header_2] Title of White Paper Here

    15

    Review size:

    SQL> alter session set container=prod_db;

    Session altered.

    SQL> @size

    Database size in GB

    -------------------

    315.791138

    Review data files: DATABASE: FILE_NAME

    --------------------------------------------------------------------------------

    +DATA/ORCL/F3FCB399D04FCA84E043C88E810A091F/DATAFILE/soe.280.844682795

    +DATA/ORCL/F3FCB399D04FCA84E043C88E810A091F/DATAFILE/users.281.844682795

    +DATA/ORCL/F3FCB399D04FCA84E043C88E810A091F/DATAFILE/sysaux.275.844682795

    +DATA/ORCL/F3FCB399D04FCA84E043C88E810A091F/DATAFILE/system.282.844682795

    ASM: ASMCMD> ls -l

    Type Redund Striped Time Sys Name

    DATAFILE UNPROT COARSE APR 12 12:00:00 Y SOE.280.844682795

    DATAFILE UNPROT COARSE APR 12 12:00:00 Y SYSAUX.275.844682795

    DATAFILE UNPROT COARSE APR 12 12:00:00 Y SYSTEM.282.844682795

    DATAFILE UNPROT COARSE APR 12 12:00:00 Y USERS.281.844682795

    ASMCMD> pwd

    +DATA/ORCL/F3FCB399D04FCA84E043C88E810A091F/DATAFILE

    Create full copy clone of prod_db as gold_image in /snapclones/gold_image: Check size before the full clone: [[email protected] /]$ du -h /snapclones

    64K /snapclones/lost+found

    16K /snapclones/ORCL

    84K /snapclones

    [[email protected] /]$ df -h /snapclones

    Filesystem Size Used Avail Use% Mounted on

    /dev/asm/snapclones-248 1.0T 2.1G 1022G 1% /snapclones

  • [*20. Header_2] Title of White Paper Here

    16

    Create full copy clone of prod_db: SQL> alter session set db_create_file_dest='/snapclones';

    Session altered.

    SQL> set time on

    12:01:41 SQL> set timing on

    12:01:48 SQL> create pluggable database gold_image from prod_db;

    Pluggable database created.

    Elapsed: 00:34:56.98

    12:38:00 SQL>

    Review size: 12:45:52 SQL> show con_name

    CON_NAME

    ------------------------------

    GOLD_IMAGE

    12:46:00 SQL> @size

    Database size in GB

    -------------------

    315.791138

    Review files: DATABASE: 12:46:03 SQL> select file_name from dba_data_files;

    FILE_NAME

    --------------------------------------------------------------------------------

    /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB/datafile/o1_mf_system_9nm3hjdk

    _.dbf

    /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB/datafile/o1_mf_sysaux_9nm3hjh7

    _.dbf

    /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB/datafile/o1_mf_users_9nm3hjjb_

    .dbf

    /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB/datafile/o1_mf_soe_9nm3hjkc_.d

    bf

  • [*20. Header_2] Title of White Paper Here

    17

    ACFS file system space use: [[email protected] /]$ df -h /snapclones

    Filesystem Size Used Avail Use% Mounted on

    /dev/asm/snapclones-248 1.0T 318G 707G 32% /snapclones

    [[email protected] /]$ du -h /snapclones

    64K /snapclones/lost+found

    316G /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB/datafile

    316G /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB

    316G /snapclones/ORCL

    316G /snapclones

    [[email protected] /]$ acfsutil info fs /snapclones

    /snapclones

    ACFS Version: 12.1.0.2.0

    on-disk version: 42.0

    flags: MountPoint,Available

    mount time: Fri Apr 11 17:56:51 2014

    allocation unit: 4096

    volumes: 1

    total size: 1099511627776 ( 1.00 TB )

    total free: 758372974592 ( 706.28 GB )

    file entry table allocation: 2129920

    primary volume: /dev/asm/snapclones-248

    label:

    state: Available

    major, minor: 250, 126977

    size: 1099511627776 ( 1.00 TB )

    free: 758372974592 ( 706.28 GB )

    ADVM diskgroup DATA

    ADVM resize increment: 67108864

    ADVM redundancy: unprotected

    ADVM stripe columns: 8

    ADVM stripe width: 1048576

    number of snapshots: 0

    snapshot space usage: 0 ( 0.00 )

    replication status: DISABLED

    No snapshot clones; no space consumed

    ~316GB consumed by GOLD_IMAGE database

  • [*20. Header_2] Title of White Paper Here

    18

    Ready for snapshots: 13:03:37 SQL> show pdbs

    CON_ID CON_NAME OPEN MODE RESTRICTED

    ---------- ------------------------------ ---------- ----------

    2 PDB$SEED READ ONLY NO

    3 PROD_DB READ WRITE NO

    4 GOLD_IMAGE READ ONLY NO

    Create snapshot copy of dev_201404012 and Check time: SQL> alter session set db_create_file_dest='/snapclones';

    Session altered.

    SQL> set time on

    15:02:23 SQL> set timing on

    15:02:28 SQL> create pluggable database dev_20141012 from gold_image snapshot

    copy;

    Pluggable database created.

    Elapsed: 00:00:12.70

    Review size: GOLD IMAGE DATABASE: 15:12:47 SQL> show con_name

    CON_NAME

    ------------------------------

    GOLD_IMAGE 15:12:54 SQL> @size

    Database size in GB

    -------------------

    315.791138

    Elapsed: 00:00:00.03

    DEV_20141012 DATABASE: 15:12:57 SQL> alter session set container=dev_20141012;

    Session altered.

    Elapsed: 00:00:00.00

    15:13:13 SQL> show con_name

    CON_NAME

    ------------------------------

    DEV_20141012

    ~315GB database in less than 13 seconds seconds.

  • [*20. Header_2] Title of White Paper Here

    19

    15:13:18 SQL> @size

    Database size in GB

    -------------------

    315.791138

    Check OS sizes: [[email protected] bin]$ df -h /snapclones Filesystem Size Used Avail Use% Mounted on

    /dev/asm/snapclones-248 1.0T 318G 707G 32% /snapclones

    [[email protected] bin]$ du -h /snapclones

    du: cannot read directory `/snapclones/lost+found': Permission denied

    64K /snapclones/lost+found

    316G /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB/datafile

    316G /snapclones/ORCL/F6DE198B113F07B8E043C88E810A9BDB

    21M /snapclones/ORCL/F6E09DAD63871D0FE043C88E810A1E3D/datafile

    21M /snapclones/ORCL/F6E09DAD63871D0FE043C88E810A1E3D

    316G /snapclones/ORCL

    316G /snapclones

    SQL> select file_name from dba_data_files;

    FILE_NAME

    --------------------------------------------------------------------------------

    /snapclones/ORCL/F6E09DAD63871D0FE043C88E810A1E3D/datafile/o1_mf_soe_9nmg1517_.d

    bf

    /snapclones/ORCL/F6E09DAD63871D0FE043C88E810A1E3D/datafile/o1_mf_users_9nmg1512_

    .dbf

    /snapclones/ORCL/F6E09DAD63871D0FE043C88E810A1E3D/datafile/o1_mf_sysaux_9nmg150v

    _.dbf

    /snapclones/ORCL/F6E09DAD63871D0FE043C88E810A1E3D/datafile/o1_mf_system_9nmg150l

    _.dbf

    Check acfsutil: [[email protected] bin]$ acfsutil info fs /snapclones

    /snapclones

    ACFS Version: 12.1.0.2.0

    on-disk version: 43.0

    flags: MountPoint,Available

    mount time: Fri Apr 11 17:56:51 2014

    allocation unit: 4096

    volumes: 1

    total size: 1099511627776 ( 1.00 TB )

    total free: 758131781632 ( 706.06 GB )

    file entry table allocation: 2129920

    primary volume: /dev/asm/snapclones-248

    label:

    state: Available

    major, minor: 250, 126977

    size: 1099511627776 ( 1.00 TB )

    free: 758131781632 ( 706.06 GB )

    ADVM diskgroup DATA

  • [*20. Header_2] Title of White Paper Here

    20

    ADVM resize increment: 67108864

    ADVM redundancy: unprotected

    ADVM stripe columns: 8

    ADVM stripe width: 1048576

    number of snapshots: 1

    snapshot space usage: 184889344 ( 176.32 MB )

    replication status: DISABLED

    Check /snapclones/.ACFS/snaps: [[email protected] datafile]$ pwd

    /snapclones/.ACFS/snaps/F6E09DAD63871D0FE043C88E810A1E3D/ORCL/F6DE198B113F07B8E0

    43C88E810A9BDB/datafile

    [[email protected] datafile]$ ls -l

    total 330959912

    -rw-r----- 1 oracle oinstall 337691811840 Apr 12 15:05 o1_mf_soe_9nm3hjkc_.dbf

    -rw-r----- 1 oracle oinstall 901783552 Apr 12 15:09

    o1_mf_sysaux_9nm3hjh7_.dbf

    -rw-r----- 1 oracle oinstall 283123712 Apr 12 15:18

    o1_mf_system_9nm3hjdk_.dbf

    -rw-r----- 1 oracle oinstall 20979712 Apr 12 12:50 o1_mf_temp_9nm3hjj8_.dbf

    -rw-r----- 1 oracle oinstall 5251072 Apr 12 15:05 o1_mf_users_9nm3hjjb_.dbf

    [[email protected] datafile]$ pwd

    /snapclones/ORCL/F6E09DAD63871D0FE043C88E810A1E3D/datafile

    [[email protected] datafile]$ ls -l

    total 20504

    lrwxrwxrwx 1 oracle oinstall 127 Apr 12 15:03 o1_mf_soe_9nmg1517_.dbf ->

    /snapclones/.ACFS/snaps/F6E09DAD63871D0FE043C88E810A1E3D/ORCL/F6DE198B113F07B8E0

    43C88E810A9BDB/datafile/o1_mf_soe_9nm3hjkc_.dbf

    lrwxrwxrwx 1 oracle oinstall 130 Apr 12 15:03 o1_mf_sysaux_9nmg150v_.dbf ->

    /snapclones/.ACFS/snaps/F6E09DAD63871D0FE043C88E810A1E3D/ORCL/F6DE198B113F07B8E0

    43C88E810A9BDB/datafile/o1_mf_sysaux_9nm3hjh7_.dbf

    lrwxrwxrwx 1 oracle oinstall 130 Apr 12 15:03 o1_mf_system_9nmg150l_.dbf ->

    /snapclones/.ACFS/snaps/F6E09DAD63871D0FE043C88E810A1E3D/ORCL/F6DE198B113F07B8E0

    43C88E810A9BDB/datafile/o1_mf_system_9nm3hjdk_.dbf

    -rw-r----- 1 oracle oinstall 20979712 Apr 12 15:03 o1_mf_temp_9nmg1510_.dbf

    lrwxrwxrwx 1 oracle oinstall 129 Apr 12 15:03 o1_mf_users_9nmg1512_.dbf ->

    /snapclones/.ACFS/snaps/F6E09DAD63871D0FE043C88E810A1E3D/ORCL/F6DE198B113F07B8E0

    43C88E810A9BDB/datafile/o1_mf_users_9nm3hjjb_.dbf

    Note that ACFS Copy-on-Write creates pointers for the snapshot which point back to the primary file system files. The above sequence of commands identifies the PDB DEV_20141012 data files and pointers back to the source file system files. Open PDB for use: SQL> alter pluggable database dev_20141012 open;

    ~176 MB space consumed for initial snapshot of 316GB

    GOLD_IMAGE database.

  • [*20. Header_2] Title of White Paper Here

    21

    SQL> show pdbs

    CON_ID CON_NAME OPEN MODE RESTRICTED

    ---------- ------------------------------ ---------- ----------

    2 PDB$SEED READ ONLY NO

    3 PROD_DB READ WRITE NO

    4 GOLD_IMAGE READ ONLY NO

    5 DEV_20141012 READ WRITE NO

    The PDB is open in READ WRITE mode and is client accessible.

    Oracle Multitenant Self-Service Provisioning

    Oracle provides a free, Self-Service provisioning application for Pluggable Database as a

    Service (PDBaaS). A full range of pluggable database provisioning functionality is supported

    through an easy-to-use APEX-based self-service interface. The application can be

    downloaded from: http://oracle.com/goto/multitenant.

    Self-Service Login and Account Management:

  • [*20. Header_2] Title of White Paper Here

    22

    Registration is through the APEX-based self-service interface. The account and notification is managed by the CDB Administrator. Role delegation for PDB Administrative privileges can be assigned by the CDB Administrator to registered users. Choose From Available PDBs:

    PDBs can be defined as 'clonable' in the management interface. PDB Administrators may be

    granted the ability to define access, roles, quotas and other aspect of management of the

    PDBs that they control.

  • [*20. Header_2] Title of White Paper Here

    23

    Snapshot Clone Option for Gold_Image:

    When PDBs are defined 'clonable' in the PDB attribute page, a 'clonable' PDB may be used

    as a source of either full clones or snapshot clones as specified in the provisioning page.

    PDB snapshot clone from

    the GOLD_IMAGE PDB

  • [*20. Header_2] Title of White Paper Here

    24

    Complete Administration Capabilities:

    The Oracle Multitenant Self-Service application is a complete provisioning interface offering

    PDB management, notification services, user management, quotas, and administrative

    delegation.

  • [*20. Header_2] Title of White Paper Here

    25

    Conclusion

    Data growth and data management are unquestionably a main concern for IT managers. There

    are expensive point solutions on the market that tout database virtualization and agile data

    management, but such solutions are segmented and lack end-to-end integration with the Oracle

    database stack. Oracle Multitenant, coupled with Oracle CloudFS, offers complete, integrated

    database virtualization with storage snapshot clones driven through SQL or the Oracle Multitenant

    self-service application.

    As demonstrated in the working examples above, a full copy clone of the 315GB PROD_DB

    copied in to ASM storage took 56 minutes. A subsequent full copy clone of this database as a gold

    image from ASM to ACFS storage took 34 minutes. A snapshot copy of the full copy clone gold

    image on ACFS took 12 seconds, on the described hardware, and consumed only an additional

    176MB of storage.

    A database provisioning task that normally takes days to weeks to complete is provisioned in

    seconds, without impacting the source database with disruptive I/O and excessive space

    consumption. More than this, individual Lines of Business are empowered to manage their own

    data sets. Using the Multitenant database self-service provisioning app, available for free

    download on the Oracle Technical Network (OTN), developers, support, QA and other users, as

    'subscribers' to the data, are enabled to clone, archive their clones, clone from their clones, and/or

    drop their individual clones completely autonomous to the source data.

    Oracle Multitenant PDB snapshot cloning using ACFS is a fast, cost-effective solution to

    address data growth management.

  • [*20. Header_2] Title of White Paper Here

    26

  • White Paper Title

    January 2014

    Author: John P. McHugh

    Contributing Authors:

    Oracle Corporation

    World Headquarters

    500 Oracle Parkway

    Redwood Shores, CA 94065

    U.S.A.

    Worldwide Inquiries:

    Phone: +1.650.506.7000

    Fax: +1.650.506.7200

    oracle.com

    Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    This document is provided for information purposes only, and the contents hereof are subject to change

    without notice. This document is not warranted to be error-free, nor subject to any other warranties or

    conditions, whether expressed orally or implied in law, including implied warranties and conditions of

    merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this

    document, and no contractual obligations are formed either directly or indirectly by this document. This

    document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for

    any purpose, without our prior written permission.

    Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of

    their respective owners.

    Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are

    used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron,

    the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro

    Devices. UNIX is a registered trademark of The Open Group. 0113