Sunday, 6 November 2011

RMAN-Clone in Appsdb

RMAN Cloning in APPS DB
1.Create same(target) tree structure in clone server
2. windows:  c:\>set oracle_sid=<clone db name>
Or
Linux $ export ORACLE_SID=<clone db name>
3.create pwd file
Windows :c:\>orapwd file=%ORACLE_HOME%\database\PWD<clonename>.ora password=sys
Linux:$orapwd file=$ORACLE_HOME/dbs/orapw<db name> password=sys
4.copy the target pfile and past clone server and edit name and  add the db_file_name_convert, log_file_name_convert ..
5.Configure TNS and listener  and checking the status  use the command of ping
6.startup pfile nomount
7.open new terminal
8. $export ORACLE_SID=<target db name>
9.rman taget
10.RMAN>backup database;
11.RMAN>backup current controlfile;
12. RMAN>backup archivelog all;
RMAN>connect auxiliary username/pwd@<clone net service name>;
RMAN>duplicate target database to '<clone db name>';
Take time for minimum 1 ½ hr
or
{
13. open new terminal
14. $export ORACLE_SID=<clone db>
15.rman target username/pwd@<net service name (target)> auxiliary /
16.RMAN>duplicate target database to '<clone name in caps>';
Take time for minimum 1 ½ hr or  after restore controlfile and datafile give ctl+c
17. shu immediate  for target db and copy and past archivelog files
18.shu immediate for clone
19.startup mount clone
20. alter database open resetlogs; in clone
21.alter database open; in clone
}

----
Apps database

1.down the cloned(VISCLONE) database.
2.adpreclone run the target(VISR12) db.
3.copy and past the all files(only inside the home path files)
Ex:[oracle@track 11.1.0]pwd
/oracle/VISR12/db/tech_st/11.1.0

[oracle@track 11.1.0]cp -pr * /exhdd/oracle/VISR12/db/tech_st/11.1.0

4.Run the adcfgclone.pl dbTechStack in clone db
Ex:[oracle@track bin]$ pwd
/exhdd/oracle/VISR12/db/tech_st/11.1.0/appsutil/clone/bin

[oracle@track bin]$ adcfgclone.pl dbTechStack

Ex:

Target System Hostname (virtual or normal) [localhost] :

Target Instance is RAC (y/n) [n] :

Target System Database SID : VISCLONE

Target System Base Directory : /exhdd/oracle/VISR12

Target System utl_file_dir Directory List : /usr/tmp

Number of DATA_TOP's on the Target System [1] :

Target System DATA_TOP Directory 1 [/oracle/VISR12/db/apps_st/data] : /exhdd/oracle/VISR12/db/apps_st/data

Target System RDBMS ORACLE_HOME Directory [/exhdd/oracle/VISR12/db/tech_st/11.1.0] :

Do you want to preserve the Display [:0.0] (y/n)  : n

Target System Display [localhost:0.0] :

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n

Target System Port Pool [0-99] : 5





Error/solution
--------------

Error:1
------
 perl adcfgclone.pl appsTier

 /     50% completed       ERROR: InDbCtxFile.uploadCtx() : Exception : Error executng BEGIN fnd_gsm_util.append_ctx_fragment(:1,:2,:3); END;: 1; Oracle error -25153: ORA-25153: Temporary Tablespace is Empty has been detected in FND_GSM_UTIL.APPEND_CTX_FRAGMENT.
oracle.apps.ad.autoconfig.oam.InDbCtxFileException: Error executng BEGIN fnd_gsm_util.append_ctx_fragment(:1,:2,:3); END;: 1; Oracle error -25153: ORA-25153: Temporary Tablespace is Empty has been detected in FND_GSM_UTIL.APPEND_CTX_FRAGMENT.
        at oracle.apps.ad.autoconfig.oam.InDbCtxFile.uploadCtx(InDbCtxFile.java:220)
        at oracle.apps.ad.autoconfig.oam.CtxSynchronizer.uploadToDb(CtxSynchronizer.java:328)
        at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateDBCtx(FileSysDBCtxMerge.java:721)
        at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateDBFiles(FileSysDBCtxMerge.java:226)
        at oracle.apps.ad.context.CtxValueMgt.processCtxFile(CtxValueMgt.java:1690)
        at oracle.apps.ad.clone.ApplyApplTop.runCVM(ApplyApplTop.java:510)
        at oracle.apps.ad.clone.ApplyApplTop.runAutoConfig(ApplyApplTop.java:552)
        at oracle.apps.ad.clone.ApplyApplTop.doConf(ApplyApplTop.java:339)
        at oracle.apps.ad.clone.ApplyApplTop.doApply(ApplyApplTop.java:382)
        at oracle.apps.ad.clone.ApplyApplTop.<init>(ApplyApplTop.java:267)
        at oracle.apps.ad.clone.ApplyAppsTier.<init>(ApplyAppsTier.java:105)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:67)
        at java.lang.Thread.run(Thread.java:619)
  -     90% completed


ERROR while running Apply...
Sat Nov  5 16:08:19 2011

 ERROR: Failed to execute /exhdd/oracle/VISR12/apps/apps_st/comn/clone/bin/adclone.pl

 Please check logfile.

Solution:
----------
SQL> select *from dba_tablespace_groups;

GROUP_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
TEMP                           TEMP2
TEMP                           TEMP1

SQL> alter tablespace TEMP2 add tempfile '/exhdd/oracle/VISR12/db/apps_st/data/tmp01.dbf' size 500m;

Tablespace altered.

SQL> alter tablespace TEMP1  add tempfile '/exhdd/oracle/VISR12/db/apps_st/data/tmp001.dbf' size 500m;

Tablespace altered.

SQL> select name from v$tempfile;

NAME
--------------------------------------------------------------------------------
/exhdd/oracle/VISR12/db/apps_st/data/tmp01.dbf
/exhdd/oracle/VISR12/db/apps_st/data/tmp001.dbf

Error:2
-------

[oracle@track scripts]$ adstrtal.sh apps/apps


Checking for FNDFS executable.
Starting listener process APPS_VISCLONE.

adalnctl.sh: exiting with status 1

Solution:
---------
Step:1 System Administrator ----> Concurrent ------> Manager -----> Define

Step:2 Concurrent Manager form open

Select the Manager and Primary(Node) and save
Step:3 stop the Application
step:4 Start the Application.




No comments:

Post a Comment