Tag: clone

  • Ultra-fast PDB thin clones on Exadata Exascale

    Ultra-fast PDB thin clones on Exadata Exascale

    Want to see how quick it is to create a clone of an Oracle 23ai PDB on Exadata Exascale?

    First a little background information.

    I have a “simple” database in the example, with a PDB – named DEMOPDB1.

    show pdbs
    
    SQL> show pdbs
    
       CON_ID CON_NAME    OPEN MODE     RESTRICTED
    _________ ___________ _____________ _____________
            2 PDB$SEED    READ ONLY     NO
            3 PDB1        READ WRITE    NO
            4 DEMOPDB1    READ WRITE    NO

    It’s approximately 2.4 TB in size (temp excluded).

    SQL> select p.name, sum(f.bytes)/1024/1024/1024 as total_gb
      2  from v$pdbs p, v$datafile f
      3  where p.con_id = f.con_id
      4* group by p.name;
    
    NAME                        TOTAL_GB
    ___________ ________________________
    PDB$SEED          10.625396728515625
    PDB1              14.718536376953125
    DEMOPDB1       2403.8817901611328125

    To create a clone of this PDB on Exascale, all we need to do is

    SQL> set timing on; <- so you can see how fast it is
    
    SQL> create pluggable database demopdb2 from demopdb1 snapshot copy;
    
    Pluggable database DEMOPDB2 created.
    
    Elapsed: 00:00:11.105 <- ~2.4 TB in under 12 seconds!!

    The keywords ‘SNAPSHOT COPY’ are important here. They’re instructing the database to use the space-efficient, thin-provisioned, redirect-on-write capabilities of Exascale to create

    Then, we’ll open it up.

    SQL> alter pluggable database DEMOPDB2 open instances=all;
    
    Pluggable database DEMOPDB2 altered.
    
    Elapsed: 00:00:10.897 <- opening the PDB on 2 instances in this case

    Check the size of the new PDB – spoiler alert, its the same size as the PDB I was cloning!

    SQL> select p.name, sum(f.bytes)/1024/1024/1024 as total_gb
      2  from v$pdbs p, v$datafile f
      3  where p.con_id = f.con_id
      4* group by p.name;
    
    NAME                        TOTAL_GB
    ___________ ________________________
    PDB$SEED          10.625396728515625
    PDB1              14.718536376953125
    DEMOPDB1       2403.8817901611328125
    DEMOPDB2       2403.8817901611328125 <- new PDB!

    And that’s it – less than 30 seconds and you have a thin clone of a PDB.

    How cool, and easy, is that!

  • Autonomous Database Clones

    Autonomous Database Clones

    As of today, you can now clone Autonomous Databases – both ADW and ATP – in Oracle Cloud Infrastructure.

    This was an oft requested feature for the service and its great to see that its now available. 

    You have the choice of having a full clone or metadata only clone created.

    • Full clones are a full clone of the PDB underlying the database – users, stored procs, tables, partitions, indexes, table stats, DATA – the works…
    • Metadata clones are as they sound – all the metadata describing the database, objects, tables, users etc – BUT NO DATA.

    To create a clone, you need a previously created ADW or ATP:

    Heres some I prepared earlier

    Next – hover over the ellipsis (three dots) on the right hand side and select “Create Clone”

    Create Clone

    You’ll then be presented with a familiar dialog box to choose the amount of CPU, Storage the database needs, what the new ADMIN password for the clone will be and what your choice in license (Included or Bring Your Own).

    You can also choose the compartment the clone will be created in.

    Most importantly, you get the choice (right up top) of the kind of clone you want – FULL CLONE or METADATA CLONE

    Full or not full, that is the question

    Once you’ve made you choices, click “Create Autonomous Database Clone” and the platform will go ahead and clone your ADW or ATP just as it would were it provisioning a new Autonomous Database.

    When its done, it’ll act and behave just like the source Autonomous Database it was cloned from. You can scale up/down CPU and storage or stop the CPUs all together.

    Bear in mind the clone is not linked to the source database .. Any changes you make to the source database stay in the source database.

    And there you have it – Autonomous Database Clones!

    For more information, check the following doco pages:

    Autonomous Database New Features – Check March 2019

    Clone Autonomous Database