Monday, July 13, 2009

Database Refresh from TEST to DEV

1. Copy the /DEVData/datafiles to /DEVData/datafiles (63) – xxames_index (/oracle)

2. Create a control file from TEST and change the entries of TEST to DEV and create it with SET and RESETLOGS

3. Open the database using resetlogs,
Alter database open resetlogs


4. Start the database and listener of DEV instance in node1 by made the following changes to the initDEV1.ora,
cluster_database = FALSE
cluster_database_instances = 1
undo_tablespace = APPS_UNDOTS1
instance_name = DEV1
instance_number = 1
thread = 1
alter database enable public thread 2

5. Run the $ORACLE_HOME/appsutil/clone/bin/adcfgclone.pl with the following syntax,
./perl adcfgclone.pl dbConfig /Ora10g/app/oracle/appsutil/DEV1_oradbtest1.xml


6. Shutdown and startup in mount mode and change the DBID,
$ORACLE_HOME/bin/nid target=sys/*****

7. Shutdown the database, make the following changed to initDEV1.ora
cluster_database = TRUE
cluster_database_instances = 2
undo_tablespace = APPS_UNDOTS1
instance_name = DEV1
instance_number = 1
thread = 1

8. Create spfile from pfile

9. Startup the database in node1

10. Add the log files for thread 2,
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 22 ( '/DEVData/onlinelogs/group_22a',
'/DEVData/onlinelogs/group_22b'
) SIZE 100M REUSE,
GROUP 23 (
'/DEVData/onlinelogs/group_23a',
'/DEVData/onlinelogs/group_23b'
) SIZE 100M REUSE;

11. Add the tempfile,
ALTER TABLESPACE TEMP ADD TEMPFILE '/DEVData/datafiles/temp01.dbf'
SIZE 1024M REUSE AUTOEXTEND ON NEXT 104857600 MAXSIZE 1000M;

12. Now start the database in the Node2.

13. Run the autoconfig in node2 to populate FND_NODES table,
Sh $ORACLE_HOME/admin/scripts/DEV2_oradbtest2/adautocfg.sh

14. Shutdown the database and start up in mount mode

15. Enable archive mode using the following command,
alter database archivelog

16. Change the archive log destination to /DEVData/archivelogs,
Alter system set log_archive_dest=’/DEVData/archivelogs’ scope=BOTH

17. Change the log archive format as follows,
Alter system set log_archive_format=’DEV_arch_%s_%t_%r.arc’ scope=SPFILE

18. In apps node run the adcfgclone appsTier with the path of the context file as follows,
Sh /DEV/oracle/devcomn/admin/clone/bin/adcfgclone.pl appsTier /DEV/oracle/devappl/admin/DEV_oraappstest2.xml

19. Change the apps password using $FND_TOP/bin/FNDCPASS utility

20. Startup the DEV application


No comments: