Tuesday, 28 February 2017

CLSRSC-184: Configuration of ASM failed


[root@racpub151 app]# /u01/app/12.1.0/grid/root.sh

Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/12.1.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/12.1.0/grid/crs/install/crsconfig_params
2017/02/28 17:27:09 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.

2017/02/28 17:27:45 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.

2017/02/28 17:27:47 CLSRSC-363: User ignored prerequisites during installation

OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
2017/02/28 17:28:43 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf'

CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'racpub151'
CRS-2672: Attempting to start 'ora.mdnsd' on 'racpub151'
CRS-2676: Start of 'ora.evmd' on 'racpub151' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'racpub151'
CRS-2676: Start of 'ora.gpnpd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'racpub151'
CRS-2672: Attempting to start 'ora.gipcd' on 'racpub151'
CRS-2676: Start of 'ora.cssdmonitor' on 'racpub151' succeeded
CRS-2676: Start of 'ora.gipcd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'racpub151'
CRS-2672: Attempting to start 'ora.diskmon' on 'racpub151'
CRS-2676: Start of 'ora.diskmon' on 'racpub151' succeeded
CRS-2676: Start of 'ora.cssd' on 'racpub151' succeeded

ASM failed to start. Check /u01/app/grid/cfgtoollogs/asmca/asmca-170228PM053122.log for details.

2017/02/28 17:32:08 CLSRSC-184: Configuration of ASM failed

2017/02/28 17:32:09 CLSRSC-258: Failed to configure and start ASM

Died at /u01/app/12.1.0/grid/crs/install/crsinstall.pm line 2017.
The command '/u01/app/12.1.0/grid/perl/bin/perl -I/u01/app/12.1.0/grid/perl/lib -I/u01/app/12.1.0/grid/crs/install /u01/app/12.1.0/grid/crs/install/rootcrs.pl ' execution failed

================================
Solution:-
================================

[root@racpub151 app]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              29G  9.9G   18G  36% /
tmpfs                 751M  260K  751M   1% /dev/shm
/dev/sda2              15G  679M   14G   5% /tmp
/dev/sda5              52G  9.2G   40G  19% /u01
.host:/               466G  280G  186G  61% /mnt/hgfs
/dev/sr0              3.5G  3.5G     0 100% /media/OL6.4 x86_64 Disc 1 20130225


[root@racpub151 app]# umount /dev/shm
umount: /dev/shm: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))


[root@racpub151 app]# fuser -km /dev/shm
/dev/shm:             3696m  3714m  3769m  3807m

[root@racpub151 app]# umount /dev/shm

[root@racpub151 app]# vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun Nov  8 16:01:55 2015
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk’
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=50921d9d-11bf-46f6-815e-65bf11cd734e /                       ext4    defaults        1 1
UUID=2e531048-7ae9-4c4a-b5b9-228e0420d958 /oracle                 ext4    defaults        1 2
UUID=05fc1c47-9f9f-4525-941a-7a5b54abc261 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults,size=3G        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0


[root@racpub151 app]# mount /dev/shm

[root@racpub151 app]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              29G  9.9G   18G  36% /
/dev/sda2              15G  679M   14G   5% /tmp
/dev/sda5              52G  9.2G   40G  19% /u01
.host:/               466G  280G  186G  61% /mnt/hgfs
/dev/sr0              3.5G  3.5G     0 100% /media/OL6.4 x86_64 Disc 1 20130225
tmpfs                 3.0G     0  3.0G   0% /dev/shm


RUN The script again:-


[root@racpub151 app]# /u01/app/12.1.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/12.1.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/12.1.0/grid/crs/install/crsconfig_params
2017/02/28 18:09:24 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.

2017/02/28 18:09:25 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.

2017/02/28 18:09:27 CLSRSC-363: User ignored prerequisites during installation

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'racpub151'
CRS-2673: Attempting to stop 'ora.ctssd' on 'racpub151'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'racpub151'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'racpub151'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'racpub151'
CRS-2677: Stop of 'ora.drivers.acfs' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'racpub151'
CRS-2677: Stop of 'ora.gpnpd' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.evmd' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'racpub151'
CRS-2677: Stop of 'ora.cssd' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'racpub151'
CRS-2677: Stop of 'ora.gipcd' on 'racpub151' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'racpub151' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'racpub151'
CRS-2672: Attempting to start 'ora.mdnsd' on 'racpub151'
CRS-2676: Start of 'ora.mdnsd' on 'racpub151' succeeded
CRS-2676: Start of 'ora.evmd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'racpub151'
CRS-2676: Start of 'ora.gpnpd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'racpub151'
CRS-2672: Attempting to start 'ora.gipcd' on 'racpub151'
CRS-2676: Start of 'ora.cssdmonitor' on 'racpub151' succeeded
CRS-2676: Start of 'ora.gipcd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'racpub151'
CRS-2672: Attempting to start 'ora.diskmon' on 'racpub151'
CRS-2676: Start of 'ora.diskmon' on 'racpub151' succeeded
CRS-2676: Start of 'ora.cssd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'racpub151'
CRS-2672: Attempting to start 'ora.ctssd' on 'racpub151'
CRS-2676: Start of 'ora.ctssd' on 'racpub151' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'racpub151'
CRS-2676: Start of 'ora.asm' on 'racpub151' succeeded

ASM created and started successfully.

Disk Group CRS created successfully.

CRS-2672: Attempting to start 'ora.crf' on 'racpub151'
CRS-2672: Attempting to start 'ora.storage' on 'racpub151'
CRS-2676: Start of 'ora.storage' on 'racpub151' succeeded
CRS-2676: Start of 'ora.crf' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'racpub151'
CRS-2676: Start of 'ora.crsd' on 'racpub151' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 2c8aa82e3bac4f9bbf2802c7ca16e00d.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   2c8aa82e3bac4f9bbf2802c7ca16e00d (ORCL:CRS) [CRS]
Located 1 voting disk(s).
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'racpub151'
CRS-2673: Attempting to stop 'ora.crsd' on 'racpub151'
CRS-2677: Stop of 'ora.crsd' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'racpub151'
CRS-2673: Attempting to stop 'ora.evmd' on 'racpub151'
CRS-2673: Attempting to stop 'ora.storage' on 'racpub151'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'racpub151'
CRS-2673: Attempting to stop 'ora.crf' on 'racpub151'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'racpub151'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'racpub151'
CRS-2677: Stop of 'ora.storage' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'racpub151'
CRS-2677: Stop of 'ora.drivers.acfs' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.crf' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.evmd' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'racpub151' succeeded
CRS-2677: Stop of 'ora.asm' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'racpub151'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'racpub151'
CRS-2677: Stop of 'ora.cssd' on 'racpub151' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'racpub151'
CRS-2677: Stop of 'ora.gipcd' on 'racpub151' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'racpub151' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'racpub151'
CRS-2672: Attempting to start 'ora.evmd' on 'racpub151'
CRS-2676: Start of 'ora.mdnsd' on 'racpub151' succeeded
CRS-2676: Start of 'ora.evmd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'racpub151'
CRS-2676: Start of 'ora.gpnpd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'racpub151'
CRS-2676: Start of 'ora.gipcd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'racpub151'
CRS-2676: Start of 'ora.cssdmonitor' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'racpub151'
CRS-2672: Attempting to start 'ora.diskmon' on 'racpub151'
CRS-2676: Start of 'ora.diskmon' on 'racpub151' succeeded
CRS-2676: Start of 'ora.cssd' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'racpub151'
CRS-2672: Attempting to start 'ora.ctssd' on 'racpub151'
CRS-2676: Start of 'ora.ctssd' on 'racpub151' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'racpub151'
CRS-2676: Start of 'ora.asm' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'racpub151'
CRS-2676: Start of 'ora.storage' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'racpub151'
CRS-2676: Start of 'ora.crf' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'racpub151'
CRS-2676: Start of 'ora.crsd' on 'racpub151' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: racpub151
CRS-6016: Resource auto-start has completed for server racpub151
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2017/02/28 18:19:19 CLSRSC-343: Successfully started Oracle Clusterware stack

CRS-2672: Attempting to start 'ora.asm' on 'racpub151'
CRS-2676: Start of 'ora.asm' on 'racpub151' succeeded
CRS-2672: Attempting to start 'ora.CRS.dg' on 'racpub151'
CRS-2676: Start of 'ora.CRS.dg' on 'racpub151' succeeded

2017/02/28 18:23:32 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded





Sunday, 26 February 2017

ASM didk deleting

Notice the existing disk highlighted in green was removed and has become a “FORMER” disk.  You can delete the disk by running the following commands:
Cleanup ASM disk header
[root@mktg04 ~]# /etc/init.d/oracleasm deletedisk DATA

/jdk/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory



Error:-
=======================================

[grid@rac151 grid]$ ./runInstaller 
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 8744 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4999 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-02-25_10-12-48PM. Please wait ...[grid@rac151 grid]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2017-02-25_10-12-48PM/jdk/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1753)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:968)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1753)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1670)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1509)
at java.awt.Toolkit.<clinit>(Toolkit.java:1530)
at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1779)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:453)
at oracle.install.commons.util.Application.startup(Application.java:780)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:165)



Solution:-
======================================================================

Download and install All Rpms below mentioned.

rpm -ivh openmotif21-2.1.30-11.EL6.i686.rpm --force  --nodeps
rpm -ivh xorg-x11-libs-6.8.2-1.EL.33.0.1.WB1.i386.rpm --force  --nodeps
rpm -ivh binutils-2.20.51.0.2-5.11.el6.i686.rpm --force  --nodeps
rpm -ivh binutils-2.20.51.0.2-5.11.el6.x86_64.rpm --force  --nodeps
rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm --force  --nodeps
rpm -ivh gcc-4.4.5-6.el6.x86_64.rpm --force  --nodeps
rpm -ivh gcc-c++-4.4.4-13.el6.x86_64.rpm --force  --nodeps
rpm -ivh glibc-2.12-1.7.el6_0.5.i686.rpm --force  --nodeps
rpm -ivh glibc-2.12-1.7.el6.x86_64.rpm --force  --nodeps
rpm -ivh glibc-common-2.12-1.7.el6.x86_64.rpm --force  --nodeps
rpm -ivh glibc-devel-2.12-1.7.el6.i686.rpm --force  --nodeps
rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm --force  --nodeps
rpm -ivh libgcc-4.4.4-13.el6.i686.rpm --force  --nodeps
rpm -ivh libgcc-4.4.4-13.el6.x86_64.rpm --force  --nodeps
rpm -ivh libstdc++-devel-4.4.4-13.el6.i686.rpm --force  --nodeps
rpm -ivh libstdc++-devel-4.4.4-13.el6.x86_64.rpm --force  --nodeps
rpm -ivh libstdc++-4.4.4-13.el6.i686.rpm --force  --nodeps
rpm -ivh libstdc++-4.4.4-13.el6.x86_64.rpm --force  --nodeps
rpm -ivh make-3.81-19.el6.x86_64.rpm --force  --nodeps
rpm -ivh libXrender-0.9.5-1.el6.i686.rpm --force  --nodeps
rpm -ivh libXp-1.0.0-15.1.el6.x86_64.rpm --force  --nodeps
rpm -ivh libaio-0.3.107-10.el6.i686.rpm --force  --nodeps
rpm -ivh libaio-0.3.107-10.el6.x86_64.rpm --force  --nodeps
rpm -ivh libgomp-4.4.4-13.el6.x86_64.rpm --force  --nodeps
rpm -ivh sysstat-9.0.4-11.el6.x86_64.rpm --force  --nodeps
rpm -ivh util-linux-ng-2.17.2-6.el6.x86_64.rpm --force  --nodeps
rpm -ivh unzip-5.51-10.el5.src.rpm --force  --nodeps
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.i686.rpm --force  --nodeps
rpm -ivh compat-libstdc++-296-2.96-144.el6.i686.rpm --force  --nodeps
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm --force  --nodeps
rpm -ivh elfutils-libelf-0.148-1.el6.x86_64.rpm --force  --nodeps
rpm -ivh kernel-uek-2.6.39-400.17.1.el6uek.x86_64.rpm --force  --nodeps
rpm -ivh libaio-0.3.107-10.el6.x86_64.rpm --force  --nodeps
rpm -ivh unixODBC-2.2.14-11.el6.i686.rpm --force  --nodeps
rpm -ivh unixODBC-2.2.14-11.el6.x86_64.rpm --force  --nodeps
rpm -ivh unixODBC-devel-2.2.14-11.el6.i686.rpm --force  --nodeps
rpm -ivh unixODBC-devel-2.2.14-11.el6.x86_64.rpm --force  --nodeps
rpm -ivh xorg-x11-utils-7.4-8.el6.x86_64.rpm --force  --nodeps

rpm -ivh un* --force --nodeps

Download and install

jdk-6u45-linux-i586-rpm.bin

#sh jdk-6u45-linux-i586-rpm.bin


Tuesday, 7 February 2017

RMAN Cloning from Active Duplicate oracle 11gr2



DISABLE FIREWALLS
================================================================

vi listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

PROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.83.138.139)(PORT = 1521))
  )

ADR_BASE_PROD = /u01/app/oracle

SID_LIST_TEST =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = test)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = test)
    )
  )

TEST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.83.138.140)(PORT = 1522))
  )

ADR_BASE_TEST = /u01/app/oracle

SID_LIST_PROD =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = prod)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = prod)
    )
  )


vi tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

PROD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.83.138.139)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = prod)
    )
  )

TEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.83.138.140)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test)
    )
  )

copy the both the files to the other server
================================================================================================

tnsping with each other



bash-4.1$ export ORACLE_SID=prod
-bash-4.1$ !sql
sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 6 11:29:10 2017

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area  830930944 bytes
Fixed Size    2232920 bytes
Variable Size  494931368 bytes
Database Buffers  327155712 bytes
Redo Buffers    6610944 bytes
Database mounted.
Database opened.

SQL> select name from v$database;

NAME
---------
PROD

==========================================================================================
crate pfile and copy that to other server(target server)
edit dbname and controlfile locations on target said

create password file:-
=============================================================================================
orapwd file=orapwSID password=manager entries=5 FORCE=Y

copy password file from production to destination and change its name no test


SQL> archive log list;
Database log mode       Archive Mode
Automatic archival       Enabled
Archive destination       /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch
Oldest online log sequence     26
Next log sequence to archive   28
Current log sequence       28

SQL> alter system switch logfile;
/
/
/


target said:=
===================================================================================================

Edit   dbname and controlfile locations on target said

add below parameters:

db_file_name_convert = '/u01/prod','/u01/test'
log_file_name_convert ='/u01/prod','/u01/test'


-bash-4.1$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
-bash-4.1$ mkdir mkdir udump arch bdump audit cdump

bash-4.1$ export ORACLE_SID=test
-bash-4.1$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 6 11:37:15 2017

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area  242208768 bytes
Fixed Size    2227176 bytes
Variable Size  184550424 bytes
Database Buffers   50331648 bytes
Redo Buffers    5099520 bytes

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options



-bash-4.1$ rman target sys/manager@prod AUXILIARY sys/manager@test


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Feb 7 04:34:48 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PROD (DBID=347054404)
connected to auxiliary database: TEST (not mounted)




RMAN> duplicate target database to 'test' from active database nofilenamecheck;




Starting Duplicate Db at 07-FEB-17
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=63 device type=DISK

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''PROD'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''TEST'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   backup as copy current controlfile auxiliary format  '/u01/test/control01.ctl';
   restore clone controlfile to  '/u01/test/control02.ctl' from
 '/u01/test/control01.ctl';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''PROD'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''TEST'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     242208768 bytes

Fixed Size                     2227176 bytes
Variable Size                184550424 bytes
Database Buffers              50331648 bytes
Redo Buffers                   5099520 bytes

Starting backup at 07-FEB-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=71 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_prod.f tag=TAG20170207T043513 RECID=7 STAMP=935296514
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 07-FEB-17

Starting restore at 07-FEB-17
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=63 device type=DISK

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 07-FEB-17

database mounted

contents of Memory Script:
{
   set newname for datafile  1 to
 "/u01/test/system01.dbf";
   set newname for datafile  2 to
 "/u01/test/sysaux01.dbf";
   set newname for datafile  3 to
 "/u01/test/undotbs01.dbf";
   set newname for datafile  4 to
 "/u01/test/users01.dbf";
   backup as copy reuse
   datafile  1 auxiliary format
 "/u01/test/system01.dbf"   datafile
 2 auxiliary format
 "/u01/test/sysaux01.dbf"   datafile
 3 auxiliary format
 "/u01/test/undotbs01.dbf"   datafile
 4 auxiliary format
 "/u01/test/users01.dbf"   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 07-FEB-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/prod/system01.dbf
output file name=/u01/test/system01.dbf tag=TAG20170207T043524
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:48
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/prod/sysaux01.dbf
output file name=/u01/test/sysaux01.dbf tag=TAG20170207T043524
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/prod/undotbs01.dbf
output file name=/u01/test/undotbs01.dbf tag=TAG20170207T043524
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/prod/users01.dbf
output file name=/u01/test/users01.dbf tag=TAG20170207T043524
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 07-FEB-17

sql statement: alter system archive log current

contents of Memory Script:
{
   backup as copy reuse
   archivelog like  "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch/1_34_935216071.dbf" auxiliary format
 "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch/1_34_935216071.dbf"   ;
   catalog clone archivelog  "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch/1_34_935216071.dbf";
   switch clone datafile all;
}
executing Memory Script

Starting backup at 07-FEB-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=34 RECID=33 STAMP=935296673
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch/1_34_935216071.dbf RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 07-FEB-17

cataloged archived log
archived log file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch/1_34_935216071.dbf RECID=33 STAMP=935296675

datafile 1 switched to datafile copy
input datafile copy RECID=7 STAMP=935296675 file name=/u01/test/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=8 STAMP=935296675 file name=/u01/test/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=9 STAMP=935296675 file name=/u01/test/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=10 STAMP=935296675 file name=/u01/test/users01.dbf

contents of Memory Script:
{
   set until scn  1082037;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 07-FEB-17
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 34 is already on disk as file /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch/1_34_935216071.dbf
archived log file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch/1_34_935216071.dbf thread=1 sequence=34
media recovery complete, elapsed time: 00:00:00
Finished recover at 07-FEB-17
Oracle instance started

Total System Global Area     242208768 bytes

Fixed Size                     2227176 bytes
Variable Size                184550424 bytes
Database Buffers              50331648 bytes
Redo Buffers                   5099520 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''TEST'' 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

sql statement: alter system set  db_name =  ''TEST'' 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     242208768 bytes

Fixed Size                     2227176 bytes
Variable Size                184550424 bytes
Database Buffers              50331648 bytes
Redo Buffers                   5099520 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP   1 ( '/u01/test/redo01.log' ) SIZE 50 M  REUSE,
  GROUP   2 ( '/u01/test/redo02.log' ) SIZE 50 M  REUSE,
  GROUP   3 ( '/u01/test/redo03.log' ) SIZE 50 M  REUSE
 DATAFILE
  '/u01/test/system01.dbf'
 CHARACTER SET WE8MSWIN1252


contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u01/test/temp01.dbf";
   switch clone tempfile all;
   catalog clone datafilecopy  "/u01/test/sysaux01.dbf",
 "/u01/test/undotbs01.dbf",
 "/u01/test/users01.dbf";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/test/temp01.dbf in control file

cataloged datafile copy
datafile copy file name=/u01/test/sysaux01.dbf RECID=1 STAMP=935296694
cataloged datafile copy
datafile copy file name=/u01/test/undotbs01.dbf RECID=2 STAMP=935296694
cataloged datafile copy
datafile copy file name=/u01/test/users01.dbf RECID=3 STAMP=935296694

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=935296694 file name=/u01/test/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=935296694 file name=/u01/test/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=935296694 file name=/u01/test/users01.dbf

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 07-FEB-17

SQL> select name,status from v$database,v$instance;

NAME  STATUS
--------- ------------
TEST  OPEN