Tuesday, September 12, 2017

MySQL Source

http://www.datadisk.co.uk/html_docs/mysql/architecture.htm
https://lalitvc.wordpress.com/2016/11/03/mysql-architecture-and-components/
https://thinkingmonster.wordpress.com/database/mysql/mysql-architecture/
http://www.oracle.com/us/corporate/pricing/price-lists/mysql-pricelist-183985.pdf

http://blog.ronenb.com/2011/07/27/mysql-cluster-manager-hands-on/

Percona

Note: How do I completely remove MySQL from a linux installation?
          If they installed it via yum on a RedHat based distribution you can remove with:
          [redhat@redhat ~]$yum remove mysql-server


Swap Space

About Swap Space

Oracle Linux uses swap space when your system does not have enough physical memory to store the text (code) and data pages that the processes are currently using. When your system needs more memory, it writes inactive pages to swap space on disk, freeing up physical memory. However, writing to swap space has a negative impact on system performance, so increasing swap space is not an effective solution to shortage of memory. Swap space is located on disk drives, which have much slower access times than physical memory. If your system often resorts to swapping, you should add more physical memory, not more swap space.
You can configure swap space on a swap file in a file system or on a separate swap partition. A dedicated swap partition is faster, but changing the size of a swap file is easier. Configure a swap partition if you know how much swap space your system requires. Otherwise, start with a swap file and create a swap partition when you know what your system requires.
Viewing Swap Space Usage
To view a system's usage of swap space, examine the contents of /proc/swaps:
# cat /proc/swaps
Filename                Type        Size      Used   Priority
/dev/sda2               partition   4128760   388    -1
/swapfile               file        999992    0      -2
In this example, the system is using both a 4-gigabyte swap partition on /dev/sda2 and a one-gigabyte swap file, /swapfile. The Priority column shows that the system preferentially swaps to the swap partition rather than to the swap file.
You can also view /proc/meminfo or use utilities such as freetop, and vmstat to view swap space usage, for example:
# grep Swap /proc/meminfo
SwapCached:          248 kB
SwapTotal:       5128752 kB
SwapFree:        5128364 kB
# free | grep Swap
Swap:      5128752        388    5128364

Creating and Using a Swap File

Note
Configuring a swap file on a btrfs file system is not supported.

To create and use a swap file:
  1. Use the dd command to create a file of the required size (for example, one million one-kilobyte blocks):
    # dd if=/dev/zero of=/swapfile bs=1024 count=1000000
  2. Initialize the file as a swap file:
    # mkswap /swapfile
  3. Enable swapping to the swap file:
    # swapon /swapfile
  4. Add an entry to /etc/fstab for the swap file so that the system uses it following the next reboot:
    /swapfile       swap       swap       defaults       0 0

Creating and Using a Swap Partition

To create and use a swap partition:
  1. Use fdisk to create a disk partition of type 82 (Linux swap) or parted to create a disk partition of type linux-swap of the size that you require.
  2. Initialize the partition (for example, /dev/sda2) as a swap partition:
    # mkswap /dev/sda2
  3. Enable swapping to the swap partition:
    # swapon /swapfile
  4. Add an entry to /etc/fstab for the swap partition so that the system uses it following the next reboot:
    /dev/sda2       swap       swap       defaults       0 0

Removing a Swap File or Swap Partition

To remove a swap file or swap partition from use:
  1. Disable swapping to the swap file or swap partition, for example:
    # swapoff /swapfile
  2. Remove the entry for the swap file or swap partition from /etc/fstab.
  3. Optionally, remove the swap file or swap partition if you do not want to use it in future.

Thursday, April 6, 2017

Basic Linux Commands

- We can also check which ports are busy with the following command:
[root@master ~]# sudo lsof -i -P -n | grep LISTEN
sshd      1481     root    3u  IPv4  19834      0t0  TCP *:22 (LISTEN)
sshd      1481     root    4u  IPv6  19843      0t0  TCP *:22 (LISTEN)
cupsd     1482     root   12u  IPv6  20163      0t0  TCP [::1]:631 (LISTEN)
cupsd     1482     root   13u  IPv4  20164      0t0  TCP 127.0.0.1:631 (LISTEN)
master    1632     root   13u  IPv4  21059      0t0  TCP 127.0.0.1:25 (LISTEN)
master    1632     root   14u  IPv6  21060      0t0  TCP [::1]:25 (LISTEN)
dnsmasq   1672   nobody    6u  IPv4  21403      0t0  TCP 192.168.122.1:53 (LISTEN)
postgres  3051 postgres    3u  IPv6  33191      0t0  TCP [::1]:5432 (LISTEN)
postgres  3051 postgres    4u  IPv4  33192      0t0  TCP 127.0.0.1:5432 (LISTEN)
postgres  3051 postgres    5u  IPv4  33193      0t0  TCP 192.168.1.108:5432 (LISTEN)

- [oracle@cdb1 ~]$ du -sh *
   4.0K afiedt.buf
   4.0K check.sql
   4.0K Desktop
   4.0K Documents
   4.0K Downloads
   0 grep
   7.2G install

- [root@rhel77 Desktop]# ls -lt -h
   total 114M
   drwxrwxrwx. 6 1107 1107 4.0K Mar 29 23:24 postgresql-9.5.6
   -rwxrwx---. 1 root root 114M Mar 28 23:47 postgresql-9.5.6.tar

- [root@rhel77 Desktop]# ls -ltr -h
   total 114M
   -rwxrwx---. 1 root root 114M Mar 28 23:47 postgresql-9.5.6.tar
   drwxrwxrwx. 6 1107 1107 4.0K Mar 29 23:24 postgresql-9.5.6

- ll is aliased to 'ls -l' which is same
  [root@rhel77 Desktop]# ls -l
   total 115824
   drwxrwxrwx. 6 1107 1107      4096 Mar 29 23:24 postgresql-9.5.6
   -rwxrwx---. 1 root root 118599680 Mar 28 23:47 postgresql-9.5.6.tar
   [root@rhel77 Desktop]# ll
   total 115824
   drwxrwxrwx. 6 1107 1107      4096 Mar 29 23:24 postgresql-9.5.6

   -rwxrwx---. 1 root root 118599680 Mar 28 23:47 postgresql-9.5.6.tar 


EXAMPLES

-  The ps command
Type the following ps command to display all running process:
# ps -aux | less
OR
# ps aux | less
Where,
  • A : Select all processes
  • u : Select all processes on a terminal, including those of other users
  • x : Select processes without controlling ttys

Task: see every process on the system

# ps -A
# ps -e

Task: See every process except those running as root

# ps -U root -u root -N

Task: See process run by user vivek

# ps -u vivek
To see every process on the system using standard syntax:
   ps -e
   ps -ef
   ps -eF
   ps -ely

To see every process on the system using BSD syntax:
   ps ax
   ps axu

To print a process tree:
   ps -ejH
   ps axjf

To get info about threads:
   ps -eLf
   ps axms

To get security info:
   ps -eo euser,ruser,suser,fuser,f,comm,label
   ps axZ
   ps -eM

To see every process running as root (real & effective ID) in user format:
   ps -U root -u root u

To see every process with a user-defined format:
   ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
   ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
   ps -eopid,tt,user,fname,tmout,f,wchan

Print only the process IDs of syslogd:
   ps -C syslogd -o pid=

Print only the name of PID 42:

   ps -p 42 -o comm=

-  We can install rpm package without dependency as
   [root@stageoem1]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm
   warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID  
    ec551f03: NOKEY
   error: Failed dependencies:
        oracleasm >= 1.0.4 is needed by oracleasmlib-2.0.4-1.el6.x86_64

   Solution:
   [root@stageoem1]# rpm -ivh --nodeps --force oracleasmlib-2.0.4-1.el6.x86_64.rpm
   warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID   
   ec551f03: NOKEY
   Preparing...                ########################################### [100%]
    1:oracleasmlib           ########################################### [100%]

1. To determine the available RAM and swap space, enter the following command:  
    [oracle11g@localhost ~]$ free
                     total           used          free               shared     buffers     cached
    Mem:       5850308    1524024    4326284       9988        900          513200
    Swap:      6176764          0          6176764
    or
    To determine the RAM size, enter the following command:
    [oracle11g@localhost ~]$ grep MemTotal /proc/meminfo
    MemTotal:        5850308 kB
    To determine the size of the configured swap space, enter the following command:      
    [oracle11g@localhost ~]$ grep SwapTotal /proc/meminfo
    SwapTotal:       6176764 kB
 
2. To determine the amount of free disk space on the system, enter the following command:
    [oracle11g@localhost ~]$ df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    /dev/mapper/ol-root   50G  4.5G   46G   9% /
    devtmpfs                    2.8G     0  2.8G   0% /dev
    tmpfs                          2.8G   84K  2.8G   1% /dev/shm
    tmpfs                          2.8G  8.8M  2.8G   1% /run
    tmpfs                          2.8G     0  2.8G   0% /sys/fs/cgroup
    /dev/mapper/ol-home 64G  4.6G   60G   8% /home
    /dev/sda1                    497M  206M  292M  42% /boot
    none                           532G   49G  484G  10% /media/sf_Shared_Folder
    or
    To determine the amount of shared memory available, enter the following command:
    [oracle11g@localhost ~]$ df -h /dev/shm/
    Filesystem      Size  Used Avail Use% Mounted on
    tmpfs             2.8G   84K  2.8G   1% /dev/shm
   
3. uname command
    DESCRIPTION
    Print certain system information. With no OPTION, same as -s.
TagDescription
-a--allprint all information, in the following order, except omit -p and -i if unknown:
-s--kernel-name
print the kernel name
-n--nodename
print the network node hostname
-r--kernel-release
print the kernel release
-v--kernel-version
print the kernel version
-m--machine
print the machine hardware name
-p--processor
print the processor type or "unknown"
-i--hardware-platform
print the hardware platform or "unknown"
-o--operating-system
print the operating system
--helpdisplay this help and exit
--version
output version information and exit
    Example:
    [oracle11g@localhost ~]$ uname -r
    3.8.13-44.1.4.el7uek.x86_64

4. To determine the distribution and version of Linux installed, enter the following command:
    [oracle11g@localhost ~]$ cat /proc/version
    Linux version 3.8.13-44.1.4.el7uek.x86_64 (mockbuild@ca-build56.us.oracle.com) (gcc version
    4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #2 SMP Wed Oct 29 16:58:08 PDT 2014

5. Display the umask in octal and in symbolic form.
    [oracle11g@localhost ~]$ umask
    0002
    [oracle11g@localhost ~]$ umask -S
    u=rwx,g=rwx,o=rx

6. Erasing hard disk completely.
    [root@localhost ~]# badblocks -ws /dev/sde
    Testing with pattern 0xaa: done                                              
    Reading and comparing: done                                              
    Testing with pattern 0x55: done                                                  
    Reading and comparing: done                                              
    Testing with pattern 0xff: done                                              
    Reading and comparing: done                                              
    Testing with pattern 0x00: done                                                
    Reading and comparing: done

7. To determine if the required packages are installed, enter commands similar to the following: 
    [oracle11g@localhost ~]$ rpm -q glibc-2.12-1.7.el6  
    package glibc-2.12-1.7.el6 is not installed

8. To determine if a listener process is running and to identify its name and the Oracle home directory
    in which it is installed:
    [oracle@Oracle11g ~]$ ps -ef | grep tnslsnr
    oracle   2467    1  0 13:16 ?   00:00:03 /home/oracle/app/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit
    oracle    2939     1  0 13:17 ?    00:00:02 /home/oracle/app/product/11.2.0/grid/bin/tnslsnr LISTENER -inherit
    oracle   25392  5891  0 19:04 pts/0    00:00:00 grep tnslsnr
    In this example, the listener is installed and LISTENER is the listener name.

9. To determine if the oraInst.loc file exists, enter the following command:
    [oracle11g@localhost ~]$ more  /etc/oraInst.loc
    inventory_loc=home/oracle/oraInventory
    inst_group=oinstall

10.All groups are in /etc/group
     [root@localhost ~]# cat /etc/group 
     oinstall:x:1001:
     dba:x:1002:oracle11g
     oper:x:502:oracle11g
     xavier:x:1004:
     grid:x:1003:grid
     asmadmin:x:1005:grid
     asmdba:x:1006:oracle11g,grid
     asmoper:x:1007:grid

11.To determine if an Oracle software owner user named oracle, or grid exists, enter a command similar to the following:
    [oracle11g@localhost ~]$ id oracle
    uid=501(oracle) gid=501(oinstall) groups=502(dba),503(oper)

12.To create an oracle user, enter a command similar to the following:
     # /usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba oracle
    - The -u option specifies the user ID. Using this command flag is optional because the system can provide you with an automatically generated 
user ID number. You must note the oracle user ID number because you need it during preinstallation.
    - The -g option specifies the primary group, which must be the Oracle Inventory group, for example oinstall.
    - The -G option specifies the secondary groups, which must include the OSDBA group, and, if required  the OSOPER and ASMDBA groups.
  Set the password of the oracle user:
    # passwd oracle

13. If the oracle user exists, but its primary group is not oinstall, or it is not a member of the appropriate OSDBA or OSOPER groups, then modify 
     it as follows:
Specify the primary group using the -g option and any required secondary group using the -G option:
     # /usr/sbin/usermod -g oinstall -G dba,asmdba[,oper] oracle

14.Add groups
     [root@localhost oracle11g]# usermod -g oinstall -G    wheel,oracle11g,vboxsf,oracle11g,vboxsf,dba,oper,asmdba oracle11g
     [root@localhost oracle11g]# usermod -g oinstall -G grid,vboxsf,asmdba,asmadmin,asmoper grid
     [root@localhost oracle11g]# groups grid
     grid : oinstall vboxsf asmadmin asmdba asmoper grid
     [root@localhost oracle11g]# groups oracle11g
     oracle11g : oinstall wheel vboxsf dba oper asmdba oracle11g

15.[oracle@Oracle11g ~]$ env | grep ORACLE
     ORACLE_UNQNAME=testdb
     ORACLE_SID=testdb2
     ORACLE_BASE=/home/oracle/app
     ORACLE_HOME=/home/oracle/app/product/11.2.0/dbhome_1

16.The difference between "-" and "no hyphen" is that the latter keeps your existing environment (variables, etc); the former creates a new 
environment (with the settings of the actual user, not your own).
     Ex: [oracle11g@oracle11g Desktop]$ su - grid   versus  [oracle11g@oracle11g Desktop]$ su grid
     Output for former is
     [oracle11g@orcl11g Desktop]$ su - grid
     [grid@orcl11g~]$ env | grep ORACLE
     ORACLE_UNQNAME=+ASM
     ORACLE_SID=+ASM
     ORACLE_BASE=/u01/app/grid
     ORACLE_HOME=/u01/app/grid /product/11.2.0/grid
     Output for latter is
     [oracle11g@oracle11g Desktop]$ su grid
     [grid@orcl11g~]$ env | grep ORACLE 
     ORACLE_UNQNAME=ora11g
     ORACLE_SID=ora11g
     ORACLE_BASE=/u01/app/oracle
     ORACLE_HOME=/u01/app/oracle /product/11.2.0/dbhome_1

17.If you encounter the ORA-00845 error, is to increase the /dev/shm mountpoint size. 
     For example:
        # mount -t tmpfs shmfs -o size=7g /dev/shm
    To make this change persistent across system restarts, add an entry in /etc/fstab similar to the following:
       shmfs /dev/shm tmpfs size=7g 0
CAT command in Linux
https://www.tecmint.com/13-basic-cat-command-examples-in-linux/
https://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/

LESS command in Linux
http://www.sanfoundry.com/4-practical-less-command-examples-and-tips-effective-navigation-in-linux/
https://alvinalexander.com/unix/edu/examples/more.shtml


http://www.myoracletips.in/search/label/Unix%20for%20DBAs

http://www.tecmint.com/history-command-examples/
http://www.thegeekstuff.com/2010/07/execute-shell-script/
https://superuser.com/questions/408890/what-is-the-purpose-of-the-sh-command
https://unix.stackexchange.com/questions/151999/how-to-change-where-a-symlink-points
https://unix.stackexchange.com/questions/87200/change-permissions-for-a-symbolic-link
https://access.redhat.com/articles/yum-cheat-sheet
http://www.nazmulhuda.info/oracleasm-1-0-4-is-needed-by
http://www.dbaref.com/top-20-dba-unix-commands

1. So you could just write
ls -ltr

From man page:

-l List in long format. If the output is to a terminal, a total sum for all the file sizes is output on a line before the long listing.

-r Reverse the order of the sort to get reverse lexicographical order or the oldest entries first (or largest files last, if combined with sort by size.

-t Sort by time modified (most recently modified first) before sorting the operands by lexicographical order.

2. links for command find

 http://www.unix.com/unix-for-dummies-questions-and-answers/86476-remove-files-before-certain-date.html
  http://unix.stackexchange.com/questions/102752/remove-all-files-created-before-a-certain-date

3. Using the Locate Command
The locate command is faster than the find command because it uses a previously built database, whereas the find command searches in the real system, through all the actual directories and files. The locate command returns a list of all path names containing the specified group of characters.


4. Set backspace as erase key
   $stty erase <ctrlV backspace key>

5. find and delete files or directories
   https://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/
 
   example1: rm -rf $(find /u01/app/oracle/dump -type d -mtime +4)  # Find all dump directories older
than +4 day and delete it from local
   example2:
   cd <path to the directory where logs are>
   rm -rf `ls -t | awk "NR>10"` # Delete all files older than 10 days
 
2. To mount NFS for Oracle we have to choose correct options. Because of bug if not correct options selected then following error will be occured:

channel ORA_DISK_1: reading from backup piece /backup/cdb_prod_bakup/ivs1evnc_1_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/13/2017 10:22:09
ORA-19870: error while restoring backup piece /backup/cdb_prod_bakup/ivs1evnc_1_1
ORA-19625: error identifying file /backup/cdb_prod_bakup/data_D-CDBPROD_I-3983442973_TS-ACCOUNTING_FNO-6_07rhhtg0
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 3
Additional information: 12

Mount as
[root@cdb1 scripts]# mount -t nfs 10.254.212.1:/backup /backup -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,noac,vers=3,timeo=600,actimeo=0

And add following line two /etc/fstab file as

10.254.212.1:/backup    /backup nfs   rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,noac,vers=3,timeo=600,actimeo=0       0 0

references:
http://www.dba-oracle.com/t_ora_27054.htm
http://dbaforums.org/oracle/index.php?showtopic=21342
http://oletange.blogspot.com/2012/04/umount-device-is-busy-why.html

umount -t nfs 10.254.212.1:/backup /backup
mount -t nfs 10.254.212.1:/backup /backup


Wednesday, April 5, 2017

PostgreSQL source

Useful links all about PostgreSQL.





















Sunday, March 12, 2017

Backup-Based Database Duplication Without Target but With Recovery Catalog connection ( ASM to ASM on same host)

OS: Oracle Linux

DB: 11.2.0.1.0

1. First of all, define storage to duplicate database (we will use +DATA_DUP, +FRA_DUP here).
2. Backup target(source) database ora11g. 
    The backup locations are in the following output: 
    RMAN> list backup;
    List of Backup Sets
    ===================
    BS Key  Size      Device Type   Elapsed Time   Completion Time
    -------  ----------    -----------     ------------       ---------------
   141     6.30M   DISK        00:00:05       10-DEC-16      
           BP Key: 146   Status: AVAILABLE  Compressed: YES  Tag: TAG20161210T111816
           Piece Name: +FRA/ora11g/backupset/2016_12_10/annnf0_tag20161210t111816_0.698.930223097
     List of Archived Logs in backup set 141
     Thrd  Seq     Low SCN    Low Time    Next SCN   Next Time
      ----   -------    ----------    ---------       ----------     ---------
      1    1       5129793    10-DEC-16   5138592    10-DEC-16
      1    2       5138592    10-DEC-16   5138690    10-DEC-16
      1    3       5138690    10-DEC-16   5138931    10-DEC-16
      1    4       5138931    10-DEC-16   5139928    10-DEC-16
     BS Key  Type LV   Size       Device Type  Elapsed Time   Completion Time
    -------    ----      --        ----------      -----------      -----------------------
    142     Full     406.77M   DISK        00:03:00      10-DEC-16      
            BP Key: 147   Status: AVAILABLE  Compressed: YES  Tag: TAG20161210T111827
           Piece Name: +FRA/ora11g/backupset/2016_12_10/nnndf0_tag20161210t111827_0.692.930223111
     List of Datafiles in backup set 142
     File LV Type Ckp SCN    Ckp Time  Name
     ---- -- ---- ---------- --------- ----
     1       Full 5139950    10-DEC-16 +DATA/ora11g/datafile/system.dbf
     2       Full 5139950    10-DEC-16 +DATA/ora11g/datafile/sysaux.dbf
     3       Full 5139950    10-DEC-16 +DATA/ora11g/datafile/undotbs1.dbf
     4       Full 5139950    10-DEC-16 +DATA/ora11g/datafile/users.dbf
     5       Full 5139950    10-DEC-16 +DATA/ora11g/datafile/example.dbf
     6       Full 5139950    10-DEC-16 +DATA/ora11g/datafile/rcat_data_01.dbf
    BS Key  Size       Device Type Elapsed Time Completion Time
    ------- ---------- ----------- ------------ ---------------
   143     30.00K     DISK        00:00:01     10-DEC-16      
           BP Key: 148   Status: AVAILABLE  Compressed: YES  Tag: TAG20161210T112137
           Piece Name: +FRA/ora11g/backupset/2016_12_10/annnf0_tag20161210t112137_0.688.930223297
     List of Archived Logs in backup set 143
     Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
     ---- ------- ---------- --------- ---------- ---------
     1    5       5139928    10-DEC-16 5140052    10-DEC-16
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    ------- ---- -- ---------- ----------- ------------ ---------------
    144     Full    10.42M     DISK        00:00:07     10-DEC-16      
            BP Key: 149   Status: AVAILABLE  Compressed: NO  Tag: TAG20161210T112139
            Piece Name: +FRA/ora11g/autobackup/2016_12_10/s_930223299.690.930223303
     SPFILE Included: Modification time: 10-DEC-16
     SPFILE db_unique_name: ORA11G
     Control File Included: Ckp SCN: 5140065      Ckp time: 10-DEC-16
    RMAN> 
   The archive logs location are
   ASMCMD [+fra/ora11g/archivelog] > ls
   2016_12_10/
   2016_12_25/
   2016_12_29/
3. Add the below entry in the /etc/oratab file
    BDUPDB:/u01/app/oracle/product/11.2.0/dbhome_1:N
4. Create the TNS ENTRY in the tnsnames.ora file
    [loc:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin]
    BDUPDB =
      (DESCRIPTION =
         (ADDRESS_LIST =
             (ADDRESS = (PROTOCOL = TCP)(HOST = orcl11g)(PORT = 1521))
      )
      ( CONNECT_DATA =
         (SERVER=DEDICATED)
         (SERVICE_NAME = BDUPDB)
      )
    )  
5. Edit listener.ora file
    (/u01/app/grid/product/11.2.0/grid/network/admin/listener.ora) 
    Before editing we have to stop listener([grid@orcl11ggrid]$lsnrctl stop) 
    ......
       (SID_DESC =
       (GLOBAL_DBNAME = BDUPDB)
       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
       (SID_NAME = BDUPDB)
       )
     )
    .....
    Then start listener ([grid@orcl11g grid]$ lsnrctl start) 
6. Create initBDUPDB.ora file (created at $ORACLE_HOME/dbs) with following parameters 
     Option 1:
     #####################
      db_name=BDUPDB
      control_files=('+DATA_DUP','+FRA_DUP')
      ## DB_FILE_NAME_CONVERT=('+DATA','+DATA_DUP')
      LOG_FILE_NAME_CONVERT=('+DATA','+DATA_DUP','+FRA','+FRA_DUP')
      db_recovery_file_dest='+FRA_DUP'
      db_recovery_file_dest_size=10737418240
      db_create_file_dest='+DATA_DUP'
     #####################
     Option 2:
     #####################
       db_name=BDUPDB
       control_files=('+DATA_DUP','+FRA_DUP')
       #DB_FILE_NAME_CONVERT=('+DATA','+DATA_DUP')
       #LOG_FILE_NAME_CONVERT+('+DATA','+DATA_DUP','+FRA','+FRA_DUP')
       db_recovery_file_dest='+FRA_DUP'
       db_recovery_file_dest_size=10737418240
       db_create_file_dest='+DATA_DUP'
     ##################### 

     The following initBDUPDB.ora file options will not work with OMF files.
      Option 3: 
      #####################
        db_name=BDUPDB
        control_files=('+DATA_DUP','+FRA_DUP')
        DB_FILE_NAME_CONVERT=('+DATA','+DATA_DUP')
        LOG_FILE_NAME_CONVERT=('+DATA','+DATA_DUP','+FRA','+FRA_DUP') 
        db_recovery_file_dest='+FRA_DUP'
        db_recovery_file_dest_size=10737418240
        ##db_create_file_dest='+DATA_DUP'
      #####################
      Option 4:
      #####################
        db_name=BDUPDB
        control_files=('+DATA_DUP','+FRA_DUP')
        ##DB_FILE_NAME_CONVERT=('+DATA','+DATA_DUP')
        LOG_FILE_NAME_CONVERT=('+DATA','+DATA_DUP','+FRA','+FRA_DUP') 
        db_recovery_file_dest='+FRA_DUP'
        db_recovery_file_dest_size=10737418240
        ##db_create_file_dest='+DATA_DUP'
      #####################
      Option 5:
      #####################
        db_name=BDUPDB
        control_files=('+DATA_DUP','+FRA_DUP')
        DB_FILE_NAME_CONVERT=('+DATA','+DATA_DUP')
        LOG_FILE_NAME_CONVERT=('+DATA','+DATA_DUP','+FRA','+FRA_DUP')
        db_recovery_file_dest='+FRA_DUP'
        db_recovery_file_dest_size=10737418240
        db_create_file_dest='+DATA_DUP'
      #####################
      If we use initBDUPDB.ora content like in Option 5 then the following warning and error occurred. Some portion from output
      …
      database mounted
      RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
      contents of Memory Script:
      {
         set until scn  4325803;
         set newname for datafile  1 to "+DATA_DUP/ora11g/datafile/system.dbf";
         set newname for datafile  2 to "+DATA_DUP/ora11g/datafile/sysaux.dbf";
        set newname for datafile  3 to  "+DATA_DUP/ora11g/datafile/undotbs1.dbf";
        set newname for datafile  4 to  "+DATA_DUP/ora11g/datafile/users.dbf";
        set newname for datafile  5 to  "+DATA_DUP/ora11g/datafile/example.dbf";
        set newname for datafile  6 to  "+DATA_DUP/ora11g/datafile/rcat_data_01.dbf";
        restore
        clone database;
     }
    executing Memory Script
    executing command: SET until clause
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME  
    executing command: SET NEWNAME
    executing command: SET NEWNAME
     Starting restore at 05-OCT-16
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backup set restore
    channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_AUX_DISK_1: restoring datafile 00001 to +DATA_DUP/ora11g/datafile/system.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00002 to +DATA_DUP/ora11g/datafile/sysaux.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00003 to +DATA_DUP/ora11g/datafile/undotbs1.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA_DUP/ora11g/datafile/users.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00005 to +DATA_DUP/ora11g/datafile/example.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00006 to +DATA_DUP/ora11g/datafile/rcat_data_01.dbf
   channel ORA_AUX_DISK_1: reading from backup piece +FRA/ora11g/backupset/2016_10_03/nnndf0_tag20161003t110620_0.748.924260783
    channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece
                    +FRA/ora11g/backupset/2016_10_03/nnndf0_tag20161003t110620_0.748.924260783
    ORA-19504: failed to create file "+DATA_DUP/ora11g/datafile/users.dbf"
    ORA-17502: ksfdcre:4 Failed to create file +DATA_DUP/ora11g/datafile/users.dbf
    ORA-15173: entry 'datafile' does not exist in directory 'ora11g' failover to previous backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/05/2016 16:06:00
    RMAN-05556: not all datafiles have backups that can be recovered to SCN 4325803
    RMAN-03015: error occurred in stored script Memory Script
   RMAN-06026: some targets not found - aborting restore
   RMAN-06023: no backup or copy of datafile 5 found to restore
   RMAN-06023: no backup or copy of datafile 4 found to restore
   RMAN-06023: no backup or copy of datafile 2 found to restore
   RMAN-06023: no backup or copy of datafile 1 found to restore
   RMAN> 
7. Create password file for new database
    [oracle11g@orcl11g Desktop]$ cd $ORACLE_HOME/dbs
        (must change path like $ORACLE_HOME/dbs before creating password file)
    [oracle11g@orcl11g dbs]$ orapwd file=orapwBDUPDB entries=5
    or just copy from source like
    [oracle11g@orcl11g~]cp $ORACLE_HOME/dbs/orapwORA11G $ORACLE_HOME/dbs/orapwBDUPDB
8. Set environment for duplicated database as SID
     [oracle11g@orcl11g oracle]$ . oraenv
     ORACLE_SID = [ora11g] ? BDUPDB
     The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
9. Start auxiliary database in nomount state.
       [oracle11g@orcl11g~]$ sqlplus / as sysdba
       SQL> startup nomount;
       Oracle instance started
       Total System Global Area     217157632 bytes
       Fixed Size                               2211928 bytes
       Variable Size                         159387560 bytes
       Database Buffers                   50331648 bytes
       Redo Buffers                          5226496 bytes
10. Connect to catalog and auxiliary instance.
       [oracle11g@orcl11g Desktop]$ rman catalog=rcat/222333 auxiliary=sys/222333@BDUPDB
       Recovery Manager: Release 11.2.0.1.0 - Production on Sun Jan 29 19:51:49 2017
       Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
       connected to recovery catalog database
       connected to auxiliary database: BDUPDB (not mounted)
       RMAN>
       Note: Before duplication we have to resync catalog for backuup file if not synced
11. We duplicate as following
      RMAN> duplicate database ora11g to BDUPDB;
      Starting Duplicate Db at 29-JAN-17
      allocated channel: ORA_AUX_DISK_1
      channel ORA_AUX_DISK_1: SID=24 device type=DISK
      contents of Memory Script:
     {
        sql clone "create spfile from memory";
     }
    executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     217157632 bytes
Fixed Size                     2211928 bytes
Variable Size                159387560 bytes
Database Buffers              50331648 bytes
Redo Buffers                   5226496 bytes
contents of Memory Script:
{
   sql clone "alter system set  control_files = 
  ''+DATA_DUP/bdupdb/controlfile/current.269.934573957'', ''+FRA_DUP/bdupdb/controlfile/current.257.934573959'' comment=
 ''Set by RMAN'' scope=spfile";
   sql clone "alter system set  db_name = ''ORA11G'' comment=''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =''BDUPDB'' comment= ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile;
   alter clone database mount;
}
executing Memory Script
sql statement: alter system set  control_files =   ''+DATA_DUP/bdupdb/controlfile/current.269.934573957'', ''+FRA_DUP/bdupdb/controlfile/current.257.934573959'' comment= ''Set by RMAN'' scope=spfile
sql statement: alter system set  db_name =  ''ORA11G'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set  db_unique_name =  ''BDUPDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area     217157632 bytes
Fixed Size                     2211928 bytes
Variable Size                159387560 bytes
Database Buffers              50331648 bytes
Redo Buffers                   5226496 bytes
Starting restore at 29-JAN-17
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=21 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ora11g/autobackup/2016_12_10/s_930223299.690.930223303
channel ORA_AUX_DISK_1: piece handle=+FRA/ora11g/autobackup/2016_12_10/s_930223299.690.930223303 tag=TAG20161210T112139
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:17
output file name=+DATA_DUP/bdupdb/controlfile/current.269.934573957
output file name=+FRA_DUP/bdupdb/controlfile/current.257.934573959
Finished restore at 29-JAN-17
database mounted
contents of Memory Script:
{
   set until scn  5589418;
   set newname for clone datafile  1 to new;
   set newname for clone datafile  2 to new;
   set newname for clone datafile  3 to new;
   set newname for clone datafile  4 to new;
   set newname for clone datafile  5 to new;
   set newname for clone datafile  6 to new;
   restore
   clone database;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 29-JAN-17
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to +DATA_DUP
channel ORA_AUX_DISK_1: restoring datafile 00002 to +DATA_DUP
channel ORA_AUX_DISK_1: restoring datafile 00003 to +DATA_DUP
channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA_DUP
channel ORA_AUX_DISK_1: restoring datafile 00005 to +DATA_DUP
channel ORA_AUX_DISK_1: restoring datafile 00006 to +DATA_DUP
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ora11g/backupset/2016_12_10/nnndf0_tag20161210t111827_0.692.930223111
channel ORA_AUX_DISK_1: piece handle=+FRA/ora11g/backupset/2016_12_10/nnndf0_tag20161210t111827_0.692.930223111 tag=TAG20161210T111827
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:11:16
Finished restore at 29-JAN-17
contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=51 STAMP=934574663 file name=+DATA_DUP/bdupdb/datafile/system.267.934573989
datafile 2 switched to datafile copy
input datafile copy RECID=52 STAMP=934574663 file name=+DATA_DUP/bdupdb/datafile/sysaux.266.934573989
datafile 3 switched to datafile copy
input datafile copy RECID=53 STAMP=934574664 file name=+DATA_DUP/bdupdb/datafile/undotbs1.265.934573989
datafile 4 switched to datafile copy
input datafile copy RECID=54 STAMP=934574664 file name=+DATA_DUP/bdupdb/datafile/users.268.934573989
datafile 5 switched to datafile copy
input datafile copy RECID=55 STAMP=934574664 file name=+DATA_DUP/bdupdb/datafile/example.264.934573989
datafile 6 switched to datafile copy
input datafile copy RECID=56 STAMP=934574664 file name=+DATA_DUP/bdupdb/datafile/rcat_data.263.934573991
contents of Memory Script:
{
   set until scn  5589418;
   recover
   clone database
    delete archivelog;
}
executing Memory Script
executing command: SET until clause
Starting recover at 29-JAN-17
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 6 is already on disk as file +FRA/ora11g/archivelog/2016_12_10/thread_1_seq_6.696.930240039
archived log for thread 1 with sequence 7 is already on disk as file +FRA/ora11g/archivelog/2016_12_11/thread_1_seq_7.675.930349435
archived log for thread 1 with sequence 8 is already on disk as file +FRA/ora11g/archivelog/2016_12_13/thread_1_seq_8.697.930520873
archived log for thread 1 with sequence 9 is already on disk as file +FRA/ora11g/archivelog/2016_12_23/thread_1_seq_9.677.931384823
archived log for thread 1 with sequence 10 is already on disk as file +FRA/ora11g/archivelog/2016_12_23/thread_1_seq_10.682.931384937
archived log for thread 1 with sequence 11 is already on disk as file +FRA/ora11g/archivelog/2016_12_23/thread_1_seq_11.679.931384983
archived log for thread 1 with sequence 12 is already on disk as file +FRA/ora11g/archivelog/2016_12_25/thread_1_seq_12.684.931553913
archived log for thread 1 with sequence 13 is already on disk as file +FRA/ora11g/archivelog/2016_12_29/thread_1_seq_13.676.931901253
archived log for thread 1 with sequence 14 is already on disk as file +FRA/ora11g/archivelog/2017_01_03/thread_1_seq_14.686.932285357
archived log for thread 1 with sequence 15 is already on disk as file +FRA/ora11g/archivelog/2017_01_04/thread_1_seq_15.695.932421861
archived log for thread 1 with sequence 16 is already on disk as file +FRA/ora11g/archivelog/2017_01_05/thread_1_seq_16.681.932509917
archived log for thread 1 with sequence 17 is already on disk as file +FRA/ora11g/archivelog/2017_01_07/thread_1_seq_17.680.932645061
archived log for thread 1 with sequence 18 is already on disk as file +FRA/ora11g/archivelog/2017_01_11/thread_1_seq_18.678.933027901
archived log for thread 1 with sequence 19 is already on disk as file +FRA/ora11g/archivelog/2017_01_13/thread_1_seq_19.744.933206325
archived log for thread 1 with sequence 20 is already on disk as file +FRA/ora11g/archivelog/2017_01_14/thread_1_seq_20.691.933250341
archived log for thread 1 with sequence 21 is already on disk as file +FRA/ora11g/archivelog/2017_01_16/thread_1_seq_21.694.933461191
archived log for thread 1 with sequence 22 is already on disk as file +FRA/ora11g/archivelog/2017_01_16/thread_1_seq_22.687.933463007
archived log for thread 1 with sequence 23 is already on disk as file +FRA/ora11g/archivelog/2017_01_17/thread_1_seq_23.747.933548257
archived log for thread 1 with sequence 24 is already on disk as file +FRA/ora11g/archivelog/2017_01_22/thread_1_seq_24.685.933960955
archived log for thread 1 with sequence 25 is already on disk as file +FRA/ora11g/archivelog/2017_01_22/thread_1_seq_25.683.933962283
archived log for thread 1 with sequence 26 is already on disk as file +FRA/ora11g/archivelog/2017_01_24/thread_1_seq_26.673.934153529
archived log for thread 1 with sequence 27 is already on disk as file +FRA/ora11g/archivelog/2017_01_25/thread_1_seq_27.674.934236057
archived log for thread 1 with sequence 28 is already on disk as file +FRA/ora11g/archivelog/2017_01_28/thread_1_seq_28.693.934494303
archived log for thread 1 with sequence 29 is already on disk as file +FRA/ora11g/archivelog/2017_01_29/thread_1_seq_29.689.934554529
archived log for thread 1 with sequence 30 is already on disk as file +FRA/ora11g/archivelog/2017_01_29/thread_1_seq_30.751.934565793
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=5
channel ORA_AUX_DISK_1: reading from backup piece +FRA/ora11g/backupset/2016_12_10/annnf0_tag20161210t112137_0.688.930223297
channel ORA_AUX_DISK_1: piece handle=+FRA/ora11g/backupset/2016_12_10/annnf0_tag20161210t112137_0.688.930223297 tag=TAG20161210T112137
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=+FRA_DUP/bdupdb/archivelog/2017_01_29/thread_1_seq_5.258.934574675 thread=1 sequence=5
channel clone_default: deleting archived log(s)
archived log file name=+FRA_DUP/bdupdb/archivelog/2017_01_29/thread_1_seq_5.258.934574675 RECID=946 STAMP=934574676
archived log file name=+FRA/ora11g/archivelog/2016_12_10/thread_1_seq_6.696.930240039 thread=1 sequence=6
archived log file name=+FRA/ora11g/archivelog/2016_12_11/thread_1_seq_7.675.930349435 thread=1 sequence=7
archived log file name=+FRA/ora11g/archivelog/2016_12_13/thread_1_seq_8.697.930520873 thread=1 sequence=8
archived log file name=+FRA/ora11g/archivelog/2016_12_23/thread_1_seq_9.677.931384823 thread=1 sequence=9
archived log file name=+FRA/ora11g/archivelog/2016_12_23/thread_1_seq_10.682.931384937 thread=1 sequence=10
archived log file name=+FRA/ora11g/archivelog/2016_12_23/thread_1_seq_11.679.931384983 thread=1 sequence=11
archived log file name=+FRA/ora11g/archivelog/2016_12_25/thread_1_seq_12.684.931553913 thread=1 sequence=12
archived log file name=+FRA/ora11g/archivelog/2016_12_29/thread_1_seq_13.676.931901253 thread=1 sequence=13
archived log file name=+FRA/ora11g/archivelog/2017_01_03/thread_1_seq_14.686.932285357 thread=1 sequence=14
archived log file name=+FRA/ora11g/archivelog/2017_01_04/thread_1_seq_15.695.932421861 thread=1 sequence=15
archived log file name=+FRA/ora11g/archivelog/2017_01_05/thread_1_seq_16.681.932509917 thread=1 sequence=16
archived log file name=+FRA/ora11g/archivelog/2017_01_07/thread_1_seq_17.680.932645061 thread=1 sequence=17
archived log file name=+FRA/ora11g/archivelog/2017_01_11/thread_1_seq_18.678.933027901 thread=1 sequence=18
archived log file name=+FRA/ora11g/archivelog/2017_01_13/thread_1_seq_19.744.933206325 thread=1 sequence=19
archived log file name=+FRA/ora11g/archivelog/2017_01_14/thread_1_seq_20.691.933250341 thread=1 sequence=20
archived log file name=+FRA/ora11g/archivelog/2017_01_16/thread_1_seq_21.694.933461191 thread=1 sequence=21
archived log file name=+FRA/ora11g/archivelog/2017_01_16/thread_1_seq_22.687.933463007 thread=1 sequence=22
archived log file name=+FRA/ora11g/archivelog/2017_01_17/thread_1_seq_23.747.933548257 thread=1 sequence=23
archived log file name=+FRA/ora11g/archivelog/2017_01_22/thread_1_seq_24.685.933960955 thread=1 sequence=24
archived log file name=+FRA/ora11g/archivelog/2017_01_22/thread_1_seq_25.683.933962283 thread=1 sequence=25
archived log file name=+FRA/ora11g/archivelog/2017_01_24/thread_1_seq_26.673.934153529 thread=1 sequence=26
archived log file name=+FRA/ora11g/archivelog/2017_01_25/thread_1_seq_27.674.934236057 thread=1 sequence=27
archived log file name=+FRA/ora11g/archivelog/2017_01_28/thread_1_seq_28.693.934494303 thread=1 sequence=28
archived log file name=+FRA/ora11g/archivelog/2017_01_29/thread_1_seq_29.689.934554529 thread=1 sequence=29
archived log file name=+FRA/ora11g/archivelog/2017_01_29/thread_1_seq_30.751.934565793 thread=1 sequence=30
media recovery complete, elapsed time: 00:17:09
Finished recover at 29-JAN-17
contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
   sql clone "alter system set  db_name = 
 ''BDUPDB'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     217157632 bytes
Fixed Size                     2211928 bytes
Variable Size                159387560 bytes
Database Buffers              50331648 bytes
Redo Buffers                   5226496 bytes
sql statement: alter system set  db_name =  ''BDUPDB'' comment= ''Reset to original value by RMAN'' scope=spfile
sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     217157632 bytes
Fixed Size                     2211928 bytes
Variable Size                159387560 bytes
Database Buffers              50331648 bytes
Redo Buffers                   5226496 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "BDUPDB" RESETLOGS ARCHIVELOG 
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      584
 LOGFILE
  GROUP  1  SIZE 50 M ,
  GROUP  2  SIZE 50 M ,
  GROUP  3  SIZE 50 M 
 DATAFILE
  '+DATA_DUP/bdupdb/datafile/system.267.934573989'
 CHARACTER SET AL32UTF8
contents of Memory Script:
{
   set newname for clone tempfile  1 to new;
   switch clone tempfile all;
   catalog clone datafilecopy  "+DATA_DUP/bdupdb/datafile/sysaux.266.934573989", 
 "+DATA_DUP/bdupdb/datafile/undotbs1.265.934573989", 
 "+DATA_DUP/bdupdb/datafile/users.268.934573989", 
 "+DATA_DUP/bdupdb/datafile/example.264.934573989", 
 "+DATA_DUP/bdupdb/datafile/rcat_data.263.934573991";
   switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +DATA_DUP in control file
cataloged datafile copy
datafile copy file name=+DATA_DUP/bdupdb/datafile/sysaux.266.934573989 RECID=1 STAMP=934575727
cataloged datafile copy
datafile copy file name=+DATA_DUP/bdupdb/datafile/undotbs1.265.934573989 RECID=2 STAMP=934575727
cataloged datafile copy
datafile copy file name=+DATA_DUP/bdupdb/datafile/users.268.934573989 RECID=3 STAMP=934575727
cataloged datafile copy
datafile copy file name=+DATA_DUP/bdupdb/datafile/example.264.934573989 RECID=4 STAMP=934575727
cataloged datafile copy
datafile copy file name=+DATA_DUP/bdupdb/datafile/rcat_data.263.934573991 RECID=5 STAMP=934575727
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=934575727 file name=+DATA_DUP/bdupdb/datafile/sysaux.266.934573989
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=934575727 file name=+DATA_DUP/bdupdb/datafile/undotbs1.265.934573989
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=934575727 file name=+DATA_DUP/bdupdb/datafile/users.268.934573989
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=934575727 file name=+DATA_DUP/bdupdb/datafile/example.264.934573989
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=934575727 file name=+DATA_DUP/bdupdb/datafile/rcat_data.263.934573991
contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 29-JAN-17

That's it!!!