SlideShare a Scribd company logo
Generic Database Clone “onecommand Automation Tool”
gDBClone 3.0.x
Oracle Product Development Architect
RACPack/MAA, Cloud Innovation and Solution Engineering Team
Ruggero Citton
@RuggeroCitton
https://www.linkedin.com/in/ruggerocitton
https://www.slideshare.net/RuggeroCitton
Ruggero Citton
• 20+ Years at Oracle
• 2 years in Support “local“ organization at Oracle Italy,
• 3 years in Global Support as EMEA Competency Team Leader
• 6 years in EMEA PLatforms - Bug Diagnosis & Escalations (PL-BDE) as Tech Manager
• Technical Lead for Oracle Unbreakable Linux support program phase I
• EMEA lead for JETs (Joint Escalation Team) with partners like: EMC2, IBM, Novell/Suse, Netapp, HP, RedHat, …
• EMEA lead for VOS (The VERITAS, Oracle, Sun Joint Escalation Center)
• Mission Critical Oracle member of TSANet (Technical Support Alliance Network)
• Since 9 years in (RACPack/MAA) Oracle Product Development, latest 3 years as Architect
• Working with development teams on new features, functionalities and Innovations
• Supporting Strategical Customers (RACPack SCP) and field teams
• Best Practices, Whitepapers, Technical Articles, Prototypes, Utilities&Tools, …
2 Copyright © 2020, Oracle and/or its affiliates |
Safe harbor statement
The following is intended to outline our general product direction. It is intended for information
purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be relied upon in making purchasing decisions. The
development, release, timing, and pricing of any features or functionality described for Oracle’s
products may change and remains at the sole discretion of Oracle Corporation.
3 Copyright © 2020, Oracle and/or its affiliates |
Program Agenda
4 Copyright © 2020, Oracle and/or its affiliates |
 Purpose of Database Duplication
 Database clone ASM/ACFS/snapshot
 DB Clone ASM/ACFS/snapshot - Creation Time Example
 DB Clone Clone/Snap - Local vs Remote
 DB Clone - Database Type
 gDBClone onecommand
o gDBClone clone/snap
o gDBClone listdbs & deldb
o gDBClone listsnaps & delsnap
 gDBClone Consideration & Limitations
 gDBClone What’s next
Purpose of Database Duplication
5 Copyright © 2020, Oracle and/or its affiliates |
• A duplicate database is useful for a variety of purposes, most of which involve testing &
upgrade
• You can perform the following tasks in a duplicate database:
 Test backup and recovery procedures
 Test an upgrade to a new release of Oracle Database
 Test the effect of applications on database performance
 Create a standby database (Dataguard) with DG Broker (3.0.2-77)
 Leverage on Transient Logical Standby to perform an upgrade
 Generate reports
• or example, you can duplicate the production database on host1 to host2, and then use
the duplicate database on host2 to practice restoring and recovering this database while
the production database on host1 operates as usual.
gDBClone
Database Clone ASM/ACFS / snapshot
6 Copyright © 2020, Oracle and/or its affiliates |
ASM/FileSystem/
RMAN full bck
Rapid Space efficient
Database
provisioning
from a gold Database
Image
ACFS
…/.ACFS/snap/<db snap 01>
…/.ACFS/snap/<db snap 02>
…/.ACFS/snap/<db snap xx>
…/.ACFS/snap/<db snap 02>
An Oracle ACFS snapshot is an online,
read only or read write, point in time
copy of an Oracle ACFS file system. The
snapshot copy is space efficient and
uses Copy On Write functionality. Before
an Oracle ACFS file extent is modified or
deleted, its current value is preserved in
the snapshot to maintain the point in
time view of the file system. Oracle
ACFS supports 1023 snapshots per file
system
Fast Databases clone
RMAN Duplicate
Database
(physical copy)
Database
Gold Image
Starting with 12c
ACFS is supporting all Database
files
…
Database Clone ASM/ACFS/snapshot (creation time)
7 Copyright © 2020, Oracle and/or its affiliates |
ACFS
…/.ACFS/snap/<db snap 01>
…/.ACFS/snap/<db snap 02>
…/.ACFS/snap/<db snap xx>
ACFS Snapshot
(Copy On Write)
… …/.ACFS/snap/<db snap>
ASM/FileSystem/
RMAN full bck
Database
Gold Image
RMAN Duplicate
Database
(physical copy)
Fast Databases clone
3Gb Database Clone Creation Time:
real 7m20.185s
user 0m22.181s
sys 0m2.571s
60Gb Database Clone Creation Time:
real 113m5.63s
user 0m22.849s
sys 0m3.326s
3Gb Database Clone Creation Time:
real 7m28.923s
user 1m6.842s
sys 0m13.564s
60Gb Database Clone Creation Time:
real 6m55.560s
user 1m0.655s
sys 0m14.428s
Database Clone/Snap – Remote source DB vs Local source DB
8 Copyright © 2020, Oracle and/or its affiliates |
ASM/FS ASM
LocalRemote
Remote ASM/File System  Local ASM
ASM/FS ACFS
LocalRemote
Remote to Local (clone)
Remote ASM/File System  Local ACFS
ASM Local ASM  Local ASM
(clone)
ACFS
Local ASM  Local ACFS (clone)
ACFS
Local ACFS  Local ACFS (snap)
SNAP1
SNAP2
SNAP n
Rapid
Space efficient
DB provisioning
ASM
SNAP x
Local to Local
(clone or snap)
DB Clone/Snap – Database Type Support
9 Copyright © 2020, Oracle and/or its affiliates |
Single Instance
RACOne Node
RAC
Source
Single Instance
RACOne Node
RAC
Clone/Snap Target
gDBClone
DB Clone/Snap – Override source pfile parameters
10 Copyright © 2020, Oracle and/or its affiliates |
• if you need to decrease/increase the SGA footprint
• if your target local system cannot accommodate the source SGA
you can leverage on
• “-sga_max_size” and “-sga_target
• “-pfile” option
aq_tm_processes
archive_lag_target
bitmap_merge_area_size
create_bitmap_area_size
db_block_checking
db_block_checksum
db_file_multiblock_read_count
db_files
db_lost_write_protect
fast_start_parallel_rollback
hash_area_size
job_queue_processes
log_archive_format
log_archive_max_processes
log_archive_trace
open_cursors
parallel_execution_message_size
parallel_max_servers
pga_aggregate_target
processes
recovery_parallelism
remote_login_passwordfile
sec_case_sensitive_logon
session_cached_cursors
sessions
sga_max_size
sga_target
shared_pool_reserved_size
shared_pool_size
shared_servers
sort_area_retained_size
sort_area_size
undo_management
undo_retention
Managing gDBClone Privileges and Security with SUDO
11 Copyright © 2020, Oracle and/or its affiliates |
• gDBClone command-line utility requires root system privileges for most
actions.
• You may want to use SUDO as part of your system auditing and security
policy.
12 Copyright © 2020, Oracle and/or its affiliates |
gDBClone
Clone Option
Usage:
gDBClone clone -sdbname <source DB name>
-sdbscan <source DB Host SCAN name>
| -sbckloc '<backup location path>' [-time <DD-MON-YYYY_HH24:MI:SS>]
-tdbname <Target Database Name> -tdbhome <Target Database Home Name>
{ -dataacfs <acfs mount point> [-redoacfs <acfs mount point>] [-recoacfs <acfs mount point>] } |
{ -datadg <asm data diskgroup> [ -redodg <asm redo diskgroup> ] [-recodg <asm reco diskgroup>] }
[ -sga_max_size <size Mb> ] [ -sga_target <size Mb> ] | [ -pfile ]
[ -channels <RMAN channels number> ] [ -ssize <size Mb> ] [ -cbset ]
[ -sdbport <Source DB SCAN Listener Port> ] [ -tdbport <Target DB SCAN Listener Port> ]
[ -standby [-pmode maxperf|maxavail|maxprot] [-activedg] [-rtapply]
[ -dgbroker [-dgbpath1 <dgb config path>][-dgbpath2 <dgb config path>]] ]
[ -racmod <db type> ]
[ -opc ] [ -noping ]
[ -resume ]
[ -syspwf <sys password file> ]
gDBClone
Clone option
Copyright © 2020, Oracle and/or its affiliates |13
# ./gDBClone clone -sdbname ORCL 
-sdbscan oda1.it.oracle.com -sdbport 15210 
-tdbname MYDB -racmod 2 
[-datadg <dgname>][-redodg <dgname>][-recodg <dgname>]
gDBClone clone command options:
Local default ASM diskgroup:
+DATA, +REDO, +RECO
Local ASM diskgroup override:
-datadg <dgname>, -redo <dgname>, -recodg <dgname>
Working
but undocumented
Feature
ASM/FS ASM
LocalRemote
Remote ASM/File System  Local ASM
gDBClone clone onecommand examples
Clone a database to local ASM and convert to RAC
Copyright © 2020, Oracle and/or its affiliates |14
# ./gDBClone clone -sdbname ORCL -sdbhost oda1.it.oracle.com 
-tdbname GOLD 
-dataacfs /data –redoacfs /redo –recoacfs /reco
gDBClone clone command options:
ASM/FS
ACFS Database
Gold Image
Remote/Local
Local
RMAN Duplicate from
Active Database
(physical copy)
gDBClone clone onecommand examples
Clone a Remote/Local database to ACFS (Gold-Image)
Copyright © 2020, Oracle and/or its affiliates |15
# ./gDBClone clone -sdbname ORCL –sdbscan myscan -tdbname GOLD -dataacfs /cloudfs
gDBClone clone command options:
RMAN Duplicate from
Active Database
(physical copy)
gDBClone clone onecommand examples
Clone a CDB to ACFS
Remote/Local
Container
Database
Single Instance
RAC one
RAC
Single Instance
RAC one
RAC
ACFS Standby
RealTimeApply
ActiveStandby
ACFS
Container Clone
Master Database
Local
Copyright © 2020, Oracle and/or its affiliates |16
• Avoid source production database connections
• Clone from a given RMAN full backup location
• The RMAN full backup can be on NFS
GOLD
RMAN full backup
on NFS mount point
RMAN full backup  Local ASM/ACFS
Example of RMAN full backup command:
RUN
{
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/mnt/backup/<SOURCE_DB>/%U';
BACKUP DATABASE PLUS ARCHIVELOG;
BACKUP AS COPY CURRENT CONTROLFILE FORMAT '/mnt/backup/<SOURCE_DB>/control_%U';
BACKUP SPFILE FORMAT '/mnt/backup/<SOURCE_DB>/spfile_%U';
}
Note:
due to Bug 16740594
– 12.1 requires backend nfs server to export the FS with the 'insecure' option
i.e.:
# cat /etc/exportfs
/mnt/backup 10.208.166.10(rw,sync,insecure)
gDBClone
Database Clone from RMAN full backup
Copyright © 2020, Oracle and/or its affiliates |17
• Avoid source production database connections
• Clone from Tape RMAN backup
• Clone from Zero Data Loss Recovery Appliance
Example of gDBClone command:
gDBClone clone -sdbname ORCL -tdbname CAT -tdbhome OraDb12201_home1 
-dataacfs /u02/app/oracle/oradata/datastore 
-redoacfs /u01/app/oracle/oradata/datastore 
-recoacfs /u01/app/oracle/fast_recovery_area/datastore 
-catuser rman -cstring slcac458-scan/CATALOG -scn 413062 -dbid 1508953252 
-sbt
“SBT_LIBRARY=/u01/oracle/product/12.1.0.2/dbhome_1/lib/libra.so,ENV=(RA_WALLET=location=file:/u01/oracle/product/12.1.0.2/dbhome_1/db
s/racredential_alias=ra-scan:1521/zdlra5:dedicated)"
gDBClone
Database Clone using RMAN catalog (3.0.2-81)
Copyright © 2020, Oracle and/or its affiliates |18
# ./gDBClone clone -sdbname ORCL –sdbscan myscan
-sbckloc /NFS/backup/ORCL 
-tdbname GOLD
-dataacfs /cloudfs
–standby
gDBClone clone command options:
gDBClone clone onecommand examples
Clone a database from an RMAN full backup to ACFS as standby DB
RMAN full backup
on NFS mount point
gDBClone clone -standby
Source
Standby
Clone Master
Database
Production
Database
Single Instance
RAC one
RAC
Clone/Snap Target
Standby
RealTimeApply
ActiveStandby
ACFS
Copyright © 2020, Oracle and/or its affiliates |19
gDBClone
Clone Master Database as Standby
RMAN full backup
on NFS mount point
gDBClone
Source Standby
Clone Master
DatabaseProduction
Database
Single Instance
RAC one
RAC
Snap DB1
Single Instance
RAC one
RAC
Snap DB2
Single Instance
RAC one
RAC
Snap DBn
Single Instance
RAC one
RAC
Clone/Snap Target
ACFS
ACFS
ACFS
ACFS
Standby
RealTimeApply
ActiveStandby
(DG Broker
setup, since
3.0.2-77)
Copyright © 2020, Oracle and/or its affiliates |20
gDBClone
Multiple Target ACFS/ASM for data,redo,reco
RMAN full backup
on NFS mount point
gDBClone
Source
Clone Master
DatabaseProduction
Database
Single Instance
RAC one
RAC
dataACFS
Clone/Snap Target
ACFS
redoACFS ACFS
recoACFS ACFS
gDBClone clone -sdbname ORCL -sdbscan oda1-scan -tdbname GCLONE 
-dataacfs /data -redoacfs /redo -recoacfs /reco
gDBClone clone -sdbname ORCL -sdbscan oda1-scan -tdbname GCLONE 
-datadg +DATA -redodg +REDO -recodg +RECO
Copyright © 2020, Oracle and/or its affiliates |21
gDBClone
Clone a Standby Database
Source
Standby
Database
Single Instance
RAC one
RAC
ActiveStandby
Standby
RealTimeApply
Target
Database
Single Instance
RAC one
RAC
gDBClone snap
Production
Database
gDBClone
clone as standby
Copyright © 2020, Oracle and/or its affiliates |22
gDBClone
Summary
Source
Container Clone
Master Database
Container
Database
Single Instance
RAC one
RAC
Clone/Snap Target
ACF
S
Single Instance
RAC one
RAC
gDBClone clone
Database
Single Instance
RAC one
RAC
Clone Master
Database
Single Instance
RAC one
RAC
ACFS/AS
M
RMAN full backup on
NFS mount point
or
Oracle Database
Backup Cloud Storage
ActiveStandby
Standby
RealTimeApply
ActiveStandby
Standby
RealTimeApply
Clone Master
Database
Upgrade
Single Instance
RAC one
RAC
ACFS/ASM
ACFS/ASM
Copyright © 2020, Oracle and/or its affiliates |23
24 Copyright © 2020, Oracle and/or its affiliates |
gDBClone
Snap Option
gDBClone snap -sdbname <source DB name> -tdbname <Target Database Name>
[ -tdbhome <Target Database Home Name> ]
[ -sga_max_size <size Mb> ] [ -sga_target <size Mb> ] | [ -pfile ]
[ -standby [-pmode maxperf|maxavail|maxprot] [-activedg] [-rtapply] [-dgbroker] ]
[ -sdbport <SCAN Listener Port> ]
[ -racmod <db type> ]
gDBClone
Snap option
Copyright © 2020, Oracle and/or its affiliates |25
gDBClone clone command options:
# ./gDBClone snap -sdbname GOLD -tdbname CS0 –racmod 2 -standby
Note:
the target database name is also the ACFS snapshot name
gDBClone
Cloning a local database from ACFS to ACFS snapshot
Snap DB2 ACFS
Clone
Master-Gold
Database
Single Instance
RAC one
RAC
Snap DB1
SI/RACOne/RAC
ACFS
ACFSgDBClone snap
ActiveStandby
Standby
RealTimeApply
Snap DBn ACFS
gDBClone snap
gDBClone snap
SI/RACOne/RAC
SI/RACOne/RAC
Standby
Standby
Standby
Copyright © 2020, Oracle and/or its affiliates |26
gDBClone clone command options:
# ./gDBClone snap -sdbname GOLD -tdbname CS0 –racmod 2
Note:
the target database name is also the ACFS snapshot name
gDBClone
Create a snapshot RAC database from local standby database
Standby
Clone Master
Database
Single Instance
RAC one
RAC
Standby
RealTimeApply
ActiveStandby
ACFS
SnapDB
Single Instance
RAC one
RAC
ACFSgDBClone snap
Copyright © 2020, Oracle and/or its affiliates |27
gDBClone clone command options:
# ./gDBClone snap -sdbname GOLD -tdbname CS0
gDBClone
Database upgrade using Transient Logical Standby
Production
11g Database
Single Instance
RAC one
RAC
Snap
Standby
Single Instance
RAC one
RAC
ACFS
gDBClone snap -standby Standby
DBUATLS1
2 3
4
Production
12c Database
ACFS
ACFS
Copyright © 2020, Oracle and/or its affiliates |28
29 Copyright © 2020, Oracle and/or its affiliates |
gDBClone
Convert Option
gDBClone convert -sdbname <source noCDB name>
-racmod <1|2> | -tdbname <target CDB name> [-check] {[-copy] [-path <path>]}
[ -syspwf <sys password file>] [ -tsyspwf <sys password file>]
gDBClone
Convert option
• Convert to RAC or RACOne (*)
• Convert a non CDB to a PDB of a given CDB
(*)Undocumented “-rconfing” option: to force the “rconfig” tool to make a RAC/RACOne conversion
Copyright © 2020, Oracle and/or its affiliates |30
31 Copyright © 2020, Oracle and/or its affiliates |
gDBClone
listhomes, listdbs & deldb Options
 gDBClone listdbs [ -tree ] | [ -verbose ]
provides the ability to list the database and the
storage type ASM, ACFS filesystem, ACFS snapshot
with parent snapshot
# ./gDBClone listdbs -verbose
Database Name Database Type Database HomeLocation Database Version Database Role Location/Parent
------------- ------------- --------------------------------------- ---------------- ---------------- ---------------
SNAP2 RACOneNode /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot GOLD
GOLD RAC /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Master /cloudfs/.ACFS/snaps
SNAP3 RACOneNode /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot SNAP1
SNAP0 SINGLE /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot GOLD
SNAP1 SINGLE /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot SNAP0
ORCL
on ASM
GOLD
on ACFS
SNAP0
ACFS snapshot
SNAP1
ACFS snapshot
SNAP2
ACFS snapshot
clone
snap
snap
snap
Local
Remote/Local
SNAP3
ACFS snapshotsnap
# ./gDBClone listdbs -tree
Parent Child
------ -----
GOLD
SNAP2
SNAP0
SNAP1
SNAP3
gDBClone listdb
Copyright © 2020, Oracle and/or its affiliates |32
# ./gDBClone listdbs
Database Name Database Type Database Role Master/Snaphot Location/Parent
------------- ------------- ------------- --------------- ----------------
SNAP0 SINGLE PRIMARY Snapshot GOLD
lcsnap2 SINGLE PRIMARY Snapshot lcsnap1
SNAP3 RACOneNode PRIMARY Snapshot SNAP1
lcsnap1 SINGLE PRIMARY Snapshot lcgold
SNAP4 SINGLE PRIMARY Snapshot SNAP3
lcsnap0 SINGLE PRIMARY Snapshot lcgold
SNAP2 RACOneNode PRIMARY Snapshot GOLD
SNAP5 SINGLE PRIMARY Snapshot SNAP1
lcgold SINGLE PRIMARY Master /acfs/.ACFS/snaps
GOLD RAC PHYSICAL_STANDBY Master /cloudfs/.ACFS/snaps
SNAP1 SINGLE PRIMARY Snapshot SNAP0 # ./gDBClone listdbs -tree
Parent Child
------ -----
lcgold
lcsnap1
lcsnap2
lcsnap0
Parent Child
------ -----
GOLD
SNAP0
SNAP1
SNAP3
SNAP4
SNAP5
SNAP2
gDBClone listdb a more complex example:
Master Database cloned as Standby database
Copyright © 2020, Oracle and/or its affiliates |33
 gDBClone deldb provides
the ability to delete a
database and if running
on ACFS snapshot, it will
remove the related
snapshot as well
# ./gDBClone deldb
Usage:
gDBClone deldb –tdbname <database name> [ -force ]
Examples:
# ./gDBClone deldb -tdbname SNAP3
You are going to drop the database SNAP3, are you sure (Y/N)? y
Connecting to database
4% complete
9% complete
14% complete
19% complete
23% complete
28% complete
47% complete
Updating network configuration files
52% complete
Deleting instance and datafiles
76% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/SNAP32.log" for further details.
acfsutil snap delete: Snapshot operation is complete.
ACFS snapshot SNAP3 on /cloudfs ACFS file system has been deleted.
gDBClone deldb
Copyright © 2020, Oracle and/or its affiliates |34
35 Copyright © 2020, Oracle and/or its affiliates |
gDBClone
listsnaps & delsnap Options
# ./gDBClone listsnaps
Usage:
gDBClone listsnaps -acfs <acfs_mount_point> [ -tree ]
Examples:
# ./gDBClone listsnaps -acfs /cloudfs
snapshot name: SNAP0
RO snapshot or RW snapshot: RW
parent name: /cloudfs
snapshot creation time: Tue Sep 3 17:00:30 2013
snapshot name: SNAP1
RO snapshot or RW snapshot: RW
parent name: SNAP0
snapshot creation time: Tue Sep 3 17:23:16 2013
snapshot name: SNAP2
RO snapshot or RW snapshot: RW
parent name: /cloudfs
snapshot creation time: Tue Sep 3 18:43:48 2013
number of snapshots: 3
snapshot space usage: 16508289024
 gDBClone listsnaps provides the
ability to list the available snapshot
for a given ACFS mount point.
# ./gDBClone listsnaps -acfs /cloudfs -tree
/cloudfs RW
SNAP0 RW /cloudfs
SNAP2 RW /cloudfs
SNAP1 RW SNAP0
SNAP3 RW SNAP1
 With ‘-tree’ option will display the
snapshot family tree
gDBClone listsnaps
Copyright © 2020, Oracle and/or its affiliates |36
 gDBClone delsnap
provides the ability to
delete a given snapshot
for a given ACFS mount
point
# ./gDBClone delsnap
Usage:
gDBClone delsnap –snapname <snapshot name> -acfs <acfs_mount_point>
Examples:
# ./gDBClone delsnap -snapname CS0 -acfs /cloudfs
acfsutil snap delete: Snapshot operation is complete.
gDBClone delsnap
Copyright © 2020, Oracle and/or its affiliates |37
38 Copyright © 2020, Oracle and/or its affiliates |
gDBClone
Considerations & Limitations
• gDBClone works on a Grid Infrastructure environment, Oracle Restart (SIHA) is
supported since v. 3.0.2-70
• Source database must be in archivelog mode when cloning/snapshotting as it’s
executed a hot clone/snapshot.
• Multitenant database snapshot is not currently supported if PDB cloned as
snapshots are present
• gDBClone snap needs EE (Enterprise Edition) Databases as the RMAN snapshot
time recovery feature is needed and
• gDBClone needs Grid Infrastructure version 12.1 or above: GI version 11g is not
supported due to missing ACFS snapshot-of-snapshot feature capability.
gDBClone Limitations
Copyright © 2020, Oracle and/or its affiliates |39
gDBClone
On OTN – Latest official version 3.0.2-129 (133)
https://www.oracle.com/downloads/samplecode/gdbclone-samplecode-downloads.html
Reference Guide:
•https://download.oracle.com/otn/samplecode/gDBClone-3.0_ReferenceGuide.pdf
RPM:
•https://download.oracle.com/otn/samplecode/gDBClone-3.0.2-129.noarch.rpm
41 Copyright © 2020, Oracle and/or its affiliates |
42 Copyright © 2020, Oracle and/or its affiliates |
gDBClone
What’s next – not public gDBClone
43 Copyright © 2020, Oracle and/or its affiliates |
gDBClone 3.0.3 (not public)
Clone4Upgrade – Clone from OCIOS
• Avoid source production database connections
• Clone from a given RMAN full backup location
• Upgrade to 12c as part of the cloning process
• Perform a database upgrade in parallel
gDBClone 3.0.3 – Clone4Upgrade
Database Clone from RMAN full backup and upgrade
RMAN full backup
on NFS mount point
gDBClone clone -upgrade
Clone Database
Production
Database
Single Instance
RAC one
RAC
ACFS/ASM
$ sudo /opt/gDBClone/gDBClone clone -sdbname ORCL 
-sbckloc '/NFS/backup/ORCL' 
-tdbname GOLD 
-tdbhome OraDb12102_home1 
-dataacfs /u02/app/oracle/oradata/datastore 
-upgrade -parallel 8 
-racmod 2 
-syspwf /opt/gDBClone/SYSpasswd_file
Copyright © 2020, Oracle and/or its affiliates |44
gDBClone 3.0.3 – CloneFromCloud
Database Clone & Clone as Standby from Oracle Cloud Object Store
Local
RMAN full backup
On
Oracle Cloud Database
Backup Service
RMAN full backup  Local ACFS/ASM
gDBClone clone
$ sudo /opt/gDBClone/gDBClone clone -sdbname lowcase
-sopcbck
-opclib '/opt/bck2cloud/OPC/libopc'
-opcpfile '/opt/bck2cloud/OPC/bck2cloud.conf'
-tdbname lowcase
-tdbhome OraDb11204_home1
-dataacfs /u02/app/oracle/oradata/datastore
-channels 6
-racmod 2
-rmanpwf RMAN.password
-syspwf SYS.passwd_file
Copyright © 2020, Oracle and/or its affiliates |45
gDBClone 3.0.3 – CloneFromCloud
Database Clone & Clone as Standby from Oracle Cloud Object Store
gDBClone clone -standby
Source
Standby
Clone Master
Database
Production
Database
Single Instance
RAC one
RAC
Clone/Snap Target
Standby
RealTimeApply
ActiveStandby
LOCAL
RMAN full backup
On
Oracle Cloud Database
Backup Service
$ sudo /opt/gDBClone/gDBClone clone -sdbname lowcase
-sdbscan oda404-scan
-sopcbck -opclib '/opt/bck2cloud/OPC/libopc'
-opcpfile '/opt/bck2cloud/OPC/bck2cloud.conf'
-tdbname lowcase
-tdbhome OraDb11204_home1
-dataacfs /u02/app/oracle/oradata/datastore
-channels 6
-racmod 2
-standby
-rmanpwf RMAN.password
-syspwf SYS.passwd_file
Copyright © 2020, Oracle and/or its affiliates |46
53 Copyright © 2020, Oracle and/or its affiliates |
Ruggero Citton (Ruggero.Citton@oracle.com)
Oracle Product Development Architect
@RuggeroCitton
https://www.linkedin.com/in/ruggerocitton
https://www.slideshare.net/RuggeroCitton
gDBClone - Database Clone “onecommand Automation Tool”

More Related Content

PDF
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
PDF
Oracle RAC 19c: Best Practices and Secret Internals
PDF
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
PDF
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
PDF
Exadata master series_asm_2020
PPT
PDF
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
PDF
[Oracle DBA & Developer Day 2016] しばちょう先生の特別講義!!ストレージ管理のベストプラクティス ~ASMからExada...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle RAC 19c: Best Practices and Secret Internals
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Exadata master series_asm_2020
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
[Oracle DBA & Developer Day 2016] しばちょう先生の特別講義!!ストレージ管理のベストプラクティス ~ASMからExada...

What's hot (20)

PPTX
Oracle ASM Training
PPTX
Oracle GoldenGate Performance Tuning
PDF
The Oracle RAC Family of Solutions - Presentation
PPT
DataGuard体験記
PDF
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
PPTX
Oracle GoldenGate 21c New Features and Best Practices
PDF
Migration to Oracle Multitenant
PDF
Maximum Availability Architecture - Best Practices for Oracle Database 19c
PDF
しばちょう先生による特別講義! RMANバックアップの運用と高速化チューニング
PPTX
Oracle RAC features on Exadata
PDF
Oracle Database Migration to Oracle Cloud Infrastructure
PDF
Understanding oracle rac internals part 2 - slides
PDF
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
PDF
事例から見る規模別クラウド・データベースの選び方 (Oracle Database) (Oracle Cloudウェビナーシリーズ: 2021年6月30日)
PDF
Oracle RAC Internals - The Cache Fusion Edition
PDF
Enterprise manager 13c
PDF
Oracle GoldenGate FAQ
PPTX
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
PDF
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
PDF
Oracle 12c PDB insights
Oracle ASM Training
Oracle GoldenGate Performance Tuning
The Oracle RAC Family of Solutions - Presentation
DataGuard体験記
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle GoldenGate 21c New Features and Best Practices
Migration to Oracle Multitenant
Maximum Availability Architecture - Best Practices for Oracle Database 19c
しばちょう先生による特別講義! RMANバックアップの運用と高速化チューニング
Oracle RAC features on Exadata
Oracle Database Migration to Oracle Cloud Infrastructure
Understanding oracle rac internals part 2 - slides
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
事例から見る規模別クラウド・データベースの選び方 (Oracle Database) (Oracle Cloudウェビナーシリーズ: 2021年6月30日)
Oracle RAC Internals - The Cache Fusion Edition
Enterprise manager 13c
Oracle GoldenGate FAQ
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
Oracle 12c PDB insights
Ad

Similar to gDBClone - Database Clone “onecommand Automation Tool” (20)

PPT
Champion Fas Deduplication
PDF
Using Snap Clone with Enterprise Manager 12c
PDF
Testing Delphix: easy data virtualization
PDF
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides
PDF
Oracle RAC 12c Overview
PPTX
Convert single instance to RAC
PDF
Oow14 con7681-rman-1
PDF
Rman 12c new_features
TXT
oracle dba
PDF
ZDLRA in Action
PDF
Oracle RAC 12c Best Practices Sanger OOW13 [CON8805]
PDF
MySQL Scalability and Reliability for Replicated Environment
PDF
Java one 2015 - v1
ODP
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoon
PDF
Ceph Day Shanghai - Hyper Converged PLCloud with Ceph
PDF
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 version
PDF
Java Cloud and Container Ready
PPT
Sun oracle-maa-060407
PDF
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
PDF
New availability features in oracle rac 12c release 2 anair ss
Champion Fas Deduplication
Using Snap Clone with Enterprise Manager 12c
Testing Delphix: easy data virtualization
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Oracle RAC 12c Overview
Convert single instance to RAC
Oow14 con7681-rman-1
Rman 12c new_features
oracle dba
ZDLRA in Action
Oracle RAC 12c Best Practices Sanger OOW13 [CON8805]
MySQL Scalability and Reliability for Replicated Environment
Java one 2015 - v1
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoon
Ceph Day Shanghai - Hyper Converged PLCloud with Ceph
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 version
Java Cloud and Container Ready
Sun oracle-maa-060407
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
New availability features in oracle rac 12c release 2 anair ss
Ad

Recently uploaded (20)

PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
top salesforce developer skills in 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPT
Introduction Database Management System for Course Database
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ai tools demonstartion for schools and inter college
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
L1 - Introduction to python Backend.pptx
PDF
medical staffing services at VALiNTRY
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
Understanding Forklifts - TECH EHS Solution
top salesforce developer skills in 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Online Work Permit System for Fast Permit Processing
Internet Downloader Manager (IDM) Crack 6.42 Build 41
ManageIQ - Sprint 268 Review - Slide Deck
Introduction Database Management System for Course Database
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ai tools demonstartion for schools and inter college
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How to Choose the Right IT Partner for Your Business in Malaysia
L1 - Introduction to python Backend.pptx
medical staffing services at VALiNTRY
Introduction to Artificial Intelligence
Design an Analysis of Algorithms I-SECS-1021-03
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Softaken Excel to vCard Converter Software.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf

gDBClone - Database Clone “onecommand Automation Tool”

  • 1. Generic Database Clone “onecommand Automation Tool” gDBClone 3.0.x Oracle Product Development Architect RACPack/MAA, Cloud Innovation and Solution Engineering Team Ruggero Citton @RuggeroCitton https://www.linkedin.com/in/ruggerocitton https://www.slideshare.net/RuggeroCitton
  • 2. Ruggero Citton • 20+ Years at Oracle • 2 years in Support “local“ organization at Oracle Italy, • 3 years in Global Support as EMEA Competency Team Leader • 6 years in EMEA PLatforms - Bug Diagnosis & Escalations (PL-BDE) as Tech Manager • Technical Lead for Oracle Unbreakable Linux support program phase I • EMEA lead for JETs (Joint Escalation Team) with partners like: EMC2, IBM, Novell/Suse, Netapp, HP, RedHat, … • EMEA lead for VOS (The VERITAS, Oracle, Sun Joint Escalation Center) • Mission Critical Oracle member of TSANet (Technical Support Alliance Network) • Since 9 years in (RACPack/MAA) Oracle Product Development, latest 3 years as Architect • Working with development teams on new features, functionalities and Innovations • Supporting Strategical Customers (RACPack SCP) and field teams • Best Practices, Whitepapers, Technical Articles, Prototypes, Utilities&Tools, … 2 Copyright © 2020, Oracle and/or its affiliates |
  • 3. Safe harbor statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. 3 Copyright © 2020, Oracle and/or its affiliates |
  • 4. Program Agenda 4 Copyright © 2020, Oracle and/or its affiliates |  Purpose of Database Duplication  Database clone ASM/ACFS/snapshot  DB Clone ASM/ACFS/snapshot - Creation Time Example  DB Clone Clone/Snap - Local vs Remote  DB Clone - Database Type  gDBClone onecommand o gDBClone clone/snap o gDBClone listdbs & deldb o gDBClone listsnaps & delsnap  gDBClone Consideration & Limitations  gDBClone What’s next
  • 5. Purpose of Database Duplication 5 Copyright © 2020, Oracle and/or its affiliates | • A duplicate database is useful for a variety of purposes, most of which involve testing & upgrade • You can perform the following tasks in a duplicate database:  Test backup and recovery procedures  Test an upgrade to a new release of Oracle Database  Test the effect of applications on database performance  Create a standby database (Dataguard) with DG Broker (3.0.2-77)  Leverage on Transient Logical Standby to perform an upgrade  Generate reports • or example, you can duplicate the production database on host1 to host2, and then use the duplicate database on host2 to practice restoring and recovering this database while the production database on host1 operates as usual.
  • 6. gDBClone Database Clone ASM/ACFS / snapshot 6 Copyright © 2020, Oracle and/or its affiliates | ASM/FileSystem/ RMAN full bck Rapid Space efficient Database provisioning from a gold Database Image ACFS …/.ACFS/snap/<db snap 01> …/.ACFS/snap/<db snap 02> …/.ACFS/snap/<db snap xx> …/.ACFS/snap/<db snap 02> An Oracle ACFS snapshot is an online, read only or read write, point in time copy of an Oracle ACFS file system. The snapshot copy is space efficient and uses Copy On Write functionality. Before an Oracle ACFS file extent is modified or deleted, its current value is preserved in the snapshot to maintain the point in time view of the file system. Oracle ACFS supports 1023 snapshots per file system Fast Databases clone RMAN Duplicate Database (physical copy) Database Gold Image Starting with 12c ACFS is supporting all Database files …
  • 7. Database Clone ASM/ACFS/snapshot (creation time) 7 Copyright © 2020, Oracle and/or its affiliates | ACFS …/.ACFS/snap/<db snap 01> …/.ACFS/snap/<db snap 02> …/.ACFS/snap/<db snap xx> ACFS Snapshot (Copy On Write) … …/.ACFS/snap/<db snap> ASM/FileSystem/ RMAN full bck Database Gold Image RMAN Duplicate Database (physical copy) Fast Databases clone 3Gb Database Clone Creation Time: real 7m20.185s user 0m22.181s sys 0m2.571s 60Gb Database Clone Creation Time: real 113m5.63s user 0m22.849s sys 0m3.326s 3Gb Database Clone Creation Time: real 7m28.923s user 1m6.842s sys 0m13.564s 60Gb Database Clone Creation Time: real 6m55.560s user 1m0.655s sys 0m14.428s
  • 8. Database Clone/Snap – Remote source DB vs Local source DB 8 Copyright © 2020, Oracle and/or its affiliates | ASM/FS ASM LocalRemote Remote ASM/File System  Local ASM ASM/FS ACFS LocalRemote Remote to Local (clone) Remote ASM/File System  Local ACFS ASM Local ASM  Local ASM (clone) ACFS Local ASM  Local ACFS (clone) ACFS Local ACFS  Local ACFS (snap) SNAP1 SNAP2 SNAP n Rapid Space efficient DB provisioning ASM SNAP x Local to Local (clone or snap)
  • 9. DB Clone/Snap – Database Type Support 9 Copyright © 2020, Oracle and/or its affiliates | Single Instance RACOne Node RAC Source Single Instance RACOne Node RAC Clone/Snap Target gDBClone
  • 10. DB Clone/Snap – Override source pfile parameters 10 Copyright © 2020, Oracle and/or its affiliates | • if you need to decrease/increase the SGA footprint • if your target local system cannot accommodate the source SGA you can leverage on • “-sga_max_size” and “-sga_target • “-pfile” option aq_tm_processes archive_lag_target bitmap_merge_area_size create_bitmap_area_size db_block_checking db_block_checksum db_file_multiblock_read_count db_files db_lost_write_protect fast_start_parallel_rollback hash_area_size job_queue_processes log_archive_format log_archive_max_processes log_archive_trace open_cursors parallel_execution_message_size parallel_max_servers pga_aggregate_target processes recovery_parallelism remote_login_passwordfile sec_case_sensitive_logon session_cached_cursors sessions sga_max_size sga_target shared_pool_reserved_size shared_pool_size shared_servers sort_area_retained_size sort_area_size undo_management undo_retention
  • 11. Managing gDBClone Privileges and Security with SUDO 11 Copyright © 2020, Oracle and/or its affiliates | • gDBClone command-line utility requires root system privileges for most actions. • You may want to use SUDO as part of your system auditing and security policy.
  • 12. 12 Copyright © 2020, Oracle and/or its affiliates | gDBClone Clone Option
  • 13. Usage: gDBClone clone -sdbname <source DB name> -sdbscan <source DB Host SCAN name> | -sbckloc '<backup location path>' [-time <DD-MON-YYYY_HH24:MI:SS>] -tdbname <Target Database Name> -tdbhome <Target Database Home Name> { -dataacfs <acfs mount point> [-redoacfs <acfs mount point>] [-recoacfs <acfs mount point>] } | { -datadg <asm data diskgroup> [ -redodg <asm redo diskgroup> ] [-recodg <asm reco diskgroup>] } [ -sga_max_size <size Mb> ] [ -sga_target <size Mb> ] | [ -pfile ] [ -channels <RMAN channels number> ] [ -ssize <size Mb> ] [ -cbset ] [ -sdbport <Source DB SCAN Listener Port> ] [ -tdbport <Target DB SCAN Listener Port> ] [ -standby [-pmode maxperf|maxavail|maxprot] [-activedg] [-rtapply] [ -dgbroker [-dgbpath1 <dgb config path>][-dgbpath2 <dgb config path>]] ] [ -racmod <db type> ] [ -opc ] [ -noping ] [ -resume ] [ -syspwf <sys password file> ] gDBClone Clone option Copyright © 2020, Oracle and/or its affiliates |13
  • 14. # ./gDBClone clone -sdbname ORCL -sdbscan oda1.it.oracle.com -sdbport 15210 -tdbname MYDB -racmod 2 [-datadg <dgname>][-redodg <dgname>][-recodg <dgname>] gDBClone clone command options: Local default ASM diskgroup: +DATA, +REDO, +RECO Local ASM diskgroup override: -datadg <dgname>, -redo <dgname>, -recodg <dgname> Working but undocumented Feature ASM/FS ASM LocalRemote Remote ASM/File System  Local ASM gDBClone clone onecommand examples Clone a database to local ASM and convert to RAC Copyright © 2020, Oracle and/or its affiliates |14
  • 15. # ./gDBClone clone -sdbname ORCL -sdbhost oda1.it.oracle.com -tdbname GOLD -dataacfs /data –redoacfs /redo –recoacfs /reco gDBClone clone command options: ASM/FS ACFS Database Gold Image Remote/Local Local RMAN Duplicate from Active Database (physical copy) gDBClone clone onecommand examples Clone a Remote/Local database to ACFS (Gold-Image) Copyright © 2020, Oracle and/or its affiliates |15
  • 16. # ./gDBClone clone -sdbname ORCL –sdbscan myscan -tdbname GOLD -dataacfs /cloudfs gDBClone clone command options: RMAN Duplicate from Active Database (physical copy) gDBClone clone onecommand examples Clone a CDB to ACFS Remote/Local Container Database Single Instance RAC one RAC Single Instance RAC one RAC ACFS Standby RealTimeApply ActiveStandby ACFS Container Clone Master Database Local Copyright © 2020, Oracle and/or its affiliates |16
  • 17. • Avoid source production database connections • Clone from a given RMAN full backup location • The RMAN full backup can be on NFS GOLD RMAN full backup on NFS mount point RMAN full backup  Local ASM/ACFS Example of RMAN full backup command: RUN { ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/mnt/backup/<SOURCE_DB>/%U'; BACKUP DATABASE PLUS ARCHIVELOG; BACKUP AS COPY CURRENT CONTROLFILE FORMAT '/mnt/backup/<SOURCE_DB>/control_%U'; BACKUP SPFILE FORMAT '/mnt/backup/<SOURCE_DB>/spfile_%U'; } Note: due to Bug 16740594 – 12.1 requires backend nfs server to export the FS with the 'insecure' option i.e.: # cat /etc/exportfs /mnt/backup 10.208.166.10(rw,sync,insecure) gDBClone Database Clone from RMAN full backup Copyright © 2020, Oracle and/or its affiliates |17
  • 18. • Avoid source production database connections • Clone from Tape RMAN backup • Clone from Zero Data Loss Recovery Appliance Example of gDBClone command: gDBClone clone -sdbname ORCL -tdbname CAT -tdbhome OraDb12201_home1 -dataacfs /u02/app/oracle/oradata/datastore -redoacfs /u01/app/oracle/oradata/datastore -recoacfs /u01/app/oracle/fast_recovery_area/datastore -catuser rman -cstring slcac458-scan/CATALOG -scn 413062 -dbid 1508953252 -sbt “SBT_LIBRARY=/u01/oracle/product/12.1.0.2/dbhome_1/lib/libra.so,ENV=(RA_WALLET=location=file:/u01/oracle/product/12.1.0.2/dbhome_1/db s/racredential_alias=ra-scan:1521/zdlra5:dedicated)" gDBClone Database Clone using RMAN catalog (3.0.2-81) Copyright © 2020, Oracle and/or its affiliates |18
  • 19. # ./gDBClone clone -sdbname ORCL –sdbscan myscan -sbckloc /NFS/backup/ORCL -tdbname GOLD -dataacfs /cloudfs –standby gDBClone clone command options: gDBClone clone onecommand examples Clone a database from an RMAN full backup to ACFS as standby DB RMAN full backup on NFS mount point gDBClone clone -standby Source Standby Clone Master Database Production Database Single Instance RAC one RAC Clone/Snap Target Standby RealTimeApply ActiveStandby ACFS Copyright © 2020, Oracle and/or its affiliates |19
  • 20. gDBClone Clone Master Database as Standby RMAN full backup on NFS mount point gDBClone Source Standby Clone Master DatabaseProduction Database Single Instance RAC one RAC Snap DB1 Single Instance RAC one RAC Snap DB2 Single Instance RAC one RAC Snap DBn Single Instance RAC one RAC Clone/Snap Target ACFS ACFS ACFS ACFS Standby RealTimeApply ActiveStandby (DG Broker setup, since 3.0.2-77) Copyright © 2020, Oracle and/or its affiliates |20
  • 21. gDBClone Multiple Target ACFS/ASM for data,redo,reco RMAN full backup on NFS mount point gDBClone Source Clone Master DatabaseProduction Database Single Instance RAC one RAC dataACFS Clone/Snap Target ACFS redoACFS ACFS recoACFS ACFS gDBClone clone -sdbname ORCL -sdbscan oda1-scan -tdbname GCLONE -dataacfs /data -redoacfs /redo -recoacfs /reco gDBClone clone -sdbname ORCL -sdbscan oda1-scan -tdbname GCLONE -datadg +DATA -redodg +REDO -recodg +RECO Copyright © 2020, Oracle and/or its affiliates |21
  • 22. gDBClone Clone a Standby Database Source Standby Database Single Instance RAC one RAC ActiveStandby Standby RealTimeApply Target Database Single Instance RAC one RAC gDBClone snap Production Database gDBClone clone as standby Copyright © 2020, Oracle and/or its affiliates |22
  • 23. gDBClone Summary Source Container Clone Master Database Container Database Single Instance RAC one RAC Clone/Snap Target ACF S Single Instance RAC one RAC gDBClone clone Database Single Instance RAC one RAC Clone Master Database Single Instance RAC one RAC ACFS/AS M RMAN full backup on NFS mount point or Oracle Database Backup Cloud Storage ActiveStandby Standby RealTimeApply ActiveStandby Standby RealTimeApply Clone Master Database Upgrade Single Instance RAC one RAC ACFS/ASM ACFS/ASM Copyright © 2020, Oracle and/or its affiliates |23
  • 24. 24 Copyright © 2020, Oracle and/or its affiliates | gDBClone Snap Option
  • 25. gDBClone snap -sdbname <source DB name> -tdbname <Target Database Name> [ -tdbhome <Target Database Home Name> ] [ -sga_max_size <size Mb> ] [ -sga_target <size Mb> ] | [ -pfile ] [ -standby [-pmode maxperf|maxavail|maxprot] [-activedg] [-rtapply] [-dgbroker] ] [ -sdbport <SCAN Listener Port> ] [ -racmod <db type> ] gDBClone Snap option Copyright © 2020, Oracle and/or its affiliates |25
  • 26. gDBClone clone command options: # ./gDBClone snap -sdbname GOLD -tdbname CS0 –racmod 2 -standby Note: the target database name is also the ACFS snapshot name gDBClone Cloning a local database from ACFS to ACFS snapshot Snap DB2 ACFS Clone Master-Gold Database Single Instance RAC one RAC Snap DB1 SI/RACOne/RAC ACFS ACFSgDBClone snap ActiveStandby Standby RealTimeApply Snap DBn ACFS gDBClone snap gDBClone snap SI/RACOne/RAC SI/RACOne/RAC Standby Standby Standby Copyright © 2020, Oracle and/or its affiliates |26
  • 27. gDBClone clone command options: # ./gDBClone snap -sdbname GOLD -tdbname CS0 –racmod 2 Note: the target database name is also the ACFS snapshot name gDBClone Create a snapshot RAC database from local standby database Standby Clone Master Database Single Instance RAC one RAC Standby RealTimeApply ActiveStandby ACFS SnapDB Single Instance RAC one RAC ACFSgDBClone snap Copyright © 2020, Oracle and/or its affiliates |27
  • 28. gDBClone clone command options: # ./gDBClone snap -sdbname GOLD -tdbname CS0 gDBClone Database upgrade using Transient Logical Standby Production 11g Database Single Instance RAC one RAC Snap Standby Single Instance RAC one RAC ACFS gDBClone snap -standby Standby DBUATLS1 2 3 4 Production 12c Database ACFS ACFS Copyright © 2020, Oracle and/or its affiliates |28
  • 29. 29 Copyright © 2020, Oracle and/or its affiliates | gDBClone Convert Option
  • 30. gDBClone convert -sdbname <source noCDB name> -racmod <1|2> | -tdbname <target CDB name> [-check] {[-copy] [-path <path>]} [ -syspwf <sys password file>] [ -tsyspwf <sys password file>] gDBClone Convert option • Convert to RAC or RACOne (*) • Convert a non CDB to a PDB of a given CDB (*)Undocumented “-rconfing” option: to force the “rconfig” tool to make a RAC/RACOne conversion Copyright © 2020, Oracle and/or its affiliates |30
  • 31. 31 Copyright © 2020, Oracle and/or its affiliates | gDBClone listhomes, listdbs & deldb Options
  • 32.  gDBClone listdbs [ -tree ] | [ -verbose ] provides the ability to list the database and the storage type ASM, ACFS filesystem, ACFS snapshot with parent snapshot # ./gDBClone listdbs -verbose Database Name Database Type Database HomeLocation Database Version Database Role Location/Parent ------------- ------------- --------------------------------------- ---------------- ---------------- --------------- SNAP2 RACOneNode /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot GOLD GOLD RAC /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Master /cloudfs/.ACFS/snaps SNAP3 RACOneNode /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot SNAP1 SNAP0 SINGLE /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot GOLD SNAP1 SINGLE /u01/app/oracle/product/12.1.0/dbhome_1 12.1.0.1.0 Snapshot SNAP0 ORCL on ASM GOLD on ACFS SNAP0 ACFS snapshot SNAP1 ACFS snapshot SNAP2 ACFS snapshot clone snap snap snap Local Remote/Local SNAP3 ACFS snapshotsnap # ./gDBClone listdbs -tree Parent Child ------ ----- GOLD SNAP2 SNAP0 SNAP1 SNAP3 gDBClone listdb Copyright © 2020, Oracle and/or its affiliates |32
  • 33. # ./gDBClone listdbs Database Name Database Type Database Role Master/Snaphot Location/Parent ------------- ------------- ------------- --------------- ---------------- SNAP0 SINGLE PRIMARY Snapshot GOLD lcsnap2 SINGLE PRIMARY Snapshot lcsnap1 SNAP3 RACOneNode PRIMARY Snapshot SNAP1 lcsnap1 SINGLE PRIMARY Snapshot lcgold SNAP4 SINGLE PRIMARY Snapshot SNAP3 lcsnap0 SINGLE PRIMARY Snapshot lcgold SNAP2 RACOneNode PRIMARY Snapshot GOLD SNAP5 SINGLE PRIMARY Snapshot SNAP1 lcgold SINGLE PRIMARY Master /acfs/.ACFS/snaps GOLD RAC PHYSICAL_STANDBY Master /cloudfs/.ACFS/snaps SNAP1 SINGLE PRIMARY Snapshot SNAP0 # ./gDBClone listdbs -tree Parent Child ------ ----- lcgold lcsnap1 lcsnap2 lcsnap0 Parent Child ------ ----- GOLD SNAP0 SNAP1 SNAP3 SNAP4 SNAP5 SNAP2 gDBClone listdb a more complex example: Master Database cloned as Standby database Copyright © 2020, Oracle and/or its affiliates |33
  • 34.  gDBClone deldb provides the ability to delete a database and if running on ACFS snapshot, it will remove the related snapshot as well # ./gDBClone deldb Usage: gDBClone deldb –tdbname <database name> [ -force ] Examples: # ./gDBClone deldb -tdbname SNAP3 You are going to drop the database SNAP3, are you sure (Y/N)? y Connecting to database 4% complete 9% complete 14% complete 19% complete 23% complete 28% complete 47% complete Updating network configuration files 52% complete Deleting instance and datafiles 76% complete 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/SNAP32.log" for further details. acfsutil snap delete: Snapshot operation is complete. ACFS snapshot SNAP3 on /cloudfs ACFS file system has been deleted. gDBClone deldb Copyright © 2020, Oracle and/or its affiliates |34
  • 35. 35 Copyright © 2020, Oracle and/or its affiliates | gDBClone listsnaps & delsnap Options
  • 36. # ./gDBClone listsnaps Usage: gDBClone listsnaps -acfs <acfs_mount_point> [ -tree ] Examples: # ./gDBClone listsnaps -acfs /cloudfs snapshot name: SNAP0 RO snapshot or RW snapshot: RW parent name: /cloudfs snapshot creation time: Tue Sep 3 17:00:30 2013 snapshot name: SNAP1 RO snapshot or RW snapshot: RW parent name: SNAP0 snapshot creation time: Tue Sep 3 17:23:16 2013 snapshot name: SNAP2 RO snapshot or RW snapshot: RW parent name: /cloudfs snapshot creation time: Tue Sep 3 18:43:48 2013 number of snapshots: 3 snapshot space usage: 16508289024  gDBClone listsnaps provides the ability to list the available snapshot for a given ACFS mount point. # ./gDBClone listsnaps -acfs /cloudfs -tree /cloudfs RW SNAP0 RW /cloudfs SNAP2 RW /cloudfs SNAP1 RW SNAP0 SNAP3 RW SNAP1  With ‘-tree’ option will display the snapshot family tree gDBClone listsnaps Copyright © 2020, Oracle and/or its affiliates |36
  • 37.  gDBClone delsnap provides the ability to delete a given snapshot for a given ACFS mount point # ./gDBClone delsnap Usage: gDBClone delsnap –snapname <snapshot name> -acfs <acfs_mount_point> Examples: # ./gDBClone delsnap -snapname CS0 -acfs /cloudfs acfsutil snap delete: Snapshot operation is complete. gDBClone delsnap Copyright © 2020, Oracle and/or its affiliates |37
  • 38. 38 Copyright © 2020, Oracle and/or its affiliates | gDBClone Considerations & Limitations
  • 39. • gDBClone works on a Grid Infrastructure environment, Oracle Restart (SIHA) is supported since v. 3.0.2-70 • Source database must be in archivelog mode when cloning/snapshotting as it’s executed a hot clone/snapshot. • Multitenant database snapshot is not currently supported if PDB cloned as snapshots are present • gDBClone snap needs EE (Enterprise Edition) Databases as the RMAN snapshot time recovery feature is needed and • gDBClone needs Grid Infrastructure version 12.1 or above: GI version 11g is not supported due to missing ACFS snapshot-of-snapshot feature capability. gDBClone Limitations Copyright © 2020, Oracle and/or its affiliates |39
  • 40. gDBClone On OTN – Latest official version 3.0.2-129 (133) https://www.oracle.com/downloads/samplecode/gdbclone-samplecode-downloads.html Reference Guide: •https://download.oracle.com/otn/samplecode/gDBClone-3.0_ReferenceGuide.pdf RPM: •https://download.oracle.com/otn/samplecode/gDBClone-3.0.2-129.noarch.rpm 41 Copyright © 2020, Oracle and/or its affiliates |
  • 41. 42 Copyright © 2020, Oracle and/or its affiliates | gDBClone What’s next – not public gDBClone
  • 42. 43 Copyright © 2020, Oracle and/or its affiliates | gDBClone 3.0.3 (not public) Clone4Upgrade – Clone from OCIOS
  • 43. • Avoid source production database connections • Clone from a given RMAN full backup location • Upgrade to 12c as part of the cloning process • Perform a database upgrade in parallel gDBClone 3.0.3 – Clone4Upgrade Database Clone from RMAN full backup and upgrade RMAN full backup on NFS mount point gDBClone clone -upgrade Clone Database Production Database Single Instance RAC one RAC ACFS/ASM $ sudo /opt/gDBClone/gDBClone clone -sdbname ORCL -sbckloc '/NFS/backup/ORCL' -tdbname GOLD -tdbhome OraDb12102_home1 -dataacfs /u02/app/oracle/oradata/datastore -upgrade -parallel 8 -racmod 2 -syspwf /opt/gDBClone/SYSpasswd_file Copyright © 2020, Oracle and/or its affiliates |44
  • 44. gDBClone 3.0.3 – CloneFromCloud Database Clone & Clone as Standby from Oracle Cloud Object Store Local RMAN full backup On Oracle Cloud Database Backup Service RMAN full backup  Local ACFS/ASM gDBClone clone $ sudo /opt/gDBClone/gDBClone clone -sdbname lowcase -sopcbck -opclib '/opt/bck2cloud/OPC/libopc' -opcpfile '/opt/bck2cloud/OPC/bck2cloud.conf' -tdbname lowcase -tdbhome OraDb11204_home1 -dataacfs /u02/app/oracle/oradata/datastore -channels 6 -racmod 2 -rmanpwf RMAN.password -syspwf SYS.passwd_file Copyright © 2020, Oracle and/or its affiliates |45
  • 45. gDBClone 3.0.3 – CloneFromCloud Database Clone & Clone as Standby from Oracle Cloud Object Store gDBClone clone -standby Source Standby Clone Master Database Production Database Single Instance RAC one RAC Clone/Snap Target Standby RealTimeApply ActiveStandby LOCAL RMAN full backup On Oracle Cloud Database Backup Service $ sudo /opt/gDBClone/gDBClone clone -sdbname lowcase -sdbscan oda404-scan -sopcbck -opclib '/opt/bck2cloud/OPC/libopc' -opcpfile '/opt/bck2cloud/OPC/bck2cloud.conf' -tdbname lowcase -tdbhome OraDb11204_home1 -dataacfs /u02/app/oracle/oradata/datastore -channels 6 -racmod 2 -standby -rmanpwf RMAN.password -syspwf SYS.passwd_file Copyright © 2020, Oracle and/or its affiliates |46
  • 46. 53 Copyright © 2020, Oracle and/or its affiliates | Ruggero Citton (Ruggero.Citton@oracle.com) Oracle Product Development Architect @RuggeroCitton https://www.linkedin.com/in/ruggerocitton https://www.slideshare.net/RuggeroCitton