Friday, April 29, 2011

Steps to clone Oracle Applications database from PROD to TEST

The following is a brief Guideline on steps to follow to clone you Oracle Applications Database from PROD to TEST

  • log In to PROD Server as applprod user
  • go to /applprod/prodappl
  • run APPSORA.env
  • sqlplus system/manager
  • SQL> alter database backup controlfile to trace;
  • This will generate a trace file in $ORACLE_HOME//admin/_/udump/*.trc
  • Go to above directory
  • Run ls – alt
  • Find out latest trace file and edit the trace file
    • SID to desired SID (PROD to TEST)
    • Change dbf path accordingly.
  • Shutdown database (Shutdown normal both production & test server by using prod_stop.sh , your PROD stop script, and test_stop.sh your TEST stop script, respectively )
  • Now ftp to your server as applprod user and download the file from PROD server to Test server in /appltest directory .
  • Rename /appltest/testdata directory to /appltest/testdatabk
  • Create a new testdata directory in /appltest
  • Copy all datafiles, control file etc.of to new /appltest/testdata from PROD
    • (E.g rcp applprod @ ebsnode2:/applprod/proddata/*.dbf) and rename cntrl*.dbf to cntrl*.bak on test server
  • Run TEST instance .env file from /appltest/testdb/9.2.0 .
  • Now run the edited trace file (this will recreate the TEST database with PROD configuration) (sqlplus /nolog @edited script.sql)
  • This will start up TEST oracle database

Change profile_option_values from FND_profile_option_values table

Select * from fnd_concurrent_queues
Where control_code=’N’
Update fnd_concurrent_queues
set target_node=NULL
Table ICX_Parameters set session_cookie= null

Clear concurrent Manager table from toad by using the following commands:

UPDATE fnd_concurrent_processes
SET process_status_code = ‘K’
WHERE process_status_code not in (‘K’, ‘S’);

UPDATE fnd_concurrent_queues
SET running_processes = 0, max_processes = 0;

UPDATE fnd_concurrent_queues
SET control_code = NULL
WHERE control_code not in (‘E’, ‘R’, ‘X’) AND control_code IS NOT NULL;

UPDATE fnd_concurrent_queues
SET target_node = null;

UPDATE fnd_concurrent_requests
SET phase_code = ‘C’, status_code = ‘E’
WHERE status_code =’T’ OR phase_code = ‘R’

  • Copy the Server_ID from $FND_TOP/secure/ebsnode1_test.dbc and update the server_id column of FND_NODES table with that. Also change the NODE_NAME = EBSNODE1
  • Run the . APPSORA.env from /appltest/testappl directory
  • Now run following Java commands from command prompt:

java oracle.apps.fnd.security.AdminAppServer apps/apps AUTHENTICATION OFF DBC=/appltest/testappl/fnd/11.5.0/secure/TEST_ebsnode1/test.dbc
java oracle.apps.fnd.security.AdminAppServer apps/apps AUTHENTICATION OFF DBC=/appltest/testappl/fnd/11.5.0/secure/ebsnode1.<>_test.dbc
java oracle.apps.fnd.security.AdminAppServer apps/apps AUTHENTICATION OFF DBC=/appltest/testappl/fnd/11.5.0/secure/ebsnode1_test.dbc

  • Shutdown the Oracle database.
  • Start application by using test_start.sh from /appltest dir
  • If anything goes wrong check at http://:8000/OA_HTML/jsp/fnd/aoljtest.jsp
  • Login to Oracle Applications
  • Change Profile options from Application –
  • System Administrator(Responsibility) Profile-> System-> concurrent: GSM enabled = ‘N’

No comments:

Post a Comment