2012年4月12日星期四

Clone Configuration Procedure After Copy to Target Server

Clone Configuration Procedure After Copy to Target Server Clone Configuration Procedure After Copy to Target Server

1. Create User in target server
    e.g. appldev,oradev,oracle(for discover)

2. Copy the following files to target user
    /home/oraprd/scripts/prod/startdb.sh
    /home/oraprd/scripts/prod/stopdb.sh
    /home/oraprd/.profile
    /home/oraprd/set_perl.env
    /home/applprd/scripts/prod/change_password.sh
    /home/applprd/scripts/prod/concurrent_ctl.sh
    /home/applprd/scripts/prod/startappl.sh
    /home/applprd/scripts/prod/stopappl.sh
    /home/applprd/.profile
    /home/applprd/set_perl.env
 
    e.g. rcp -r -p /home/oraprd/scripts/prod/startdb.sh [TARGET_SERVER]:/home/oradev/scripts/prod/.

    Remarks :
    if we copy from production, please remember to remove all production password.

3. Change mount point
    e.g. if you copy the source from production to development, you may need to change from
          ebsprd to ebsdev

4. Change Folder permission
    e.g. chown -R oradev:dba /oracle/ebsdev
          chown -R appldev:dba /app/ebsdev
          chown -R oradev:dba /ebsdevdata
          chown -R oradev:dba /home/oradev
          chown -R appldev:dba /home/appldev
          chmod o-rx /oracle/ebsdev
          chmod o-rx /app/ebsdev
          chmod o-rx /ebsdevdata
          chmod o-rx /home/oradev
          chmod o-rx /home/appldev
          chmod o-rx /home/oradev/.profile
          chmod o-rx /home/oradev/set_perl.env
          chmod o-rx /home/appldev/.profile
          chmod o-rx /home/appldev/set_perl.env

5. Clone DB Tier
    Copy DB environment setting to target host :
    e.g. rcp /oracle/ebsdev/product/10.2.0/ebsprd_source_db_server.env target_hostname:/oracle/ebsdev/product/10.2.0/ebsdev_target_hostname.env

    Modify ERP environment setting(both .profile and ebsdev_target_hostname.env) :
    Source SID to Target SID   -> ebsprd to ebsdev
    Source Host to Target Host -> source_db_server to target_hostname

    Remarks :
    If you have not copy the .profile from source host, please add the following lines to the end of .profile
    . /oracle/ebsdev/product/10.2.0/ebsdev_target_hostname.env
    PATH=$ORACLE_HOME/OPatch:/usr/vac/bin:$PATH
    export PATH

6. Set Perl version to 5.8.3
    Using Current or Copy other set_perl.env to home directory
    e.g modify the content of set_perl.env
          -> ebsprd to ebsdev
          . set_perl.env
          perl -v -> make sure the perl version is 5.8.3

8. Make sure the group of /etc/oratab and /etc/oraInst.loc are equal to dba. Otherwise, you will hit the following error while performing step 12 :

    The file oratab needs to have group write permissions: /etc/oratab
    If you hit this error, please run the script /tmp/orainstRoot.sh as root

9. Check /etc/hosts
    Make Sure no duplicate host otherwise the next step will fail
    e.g. 172.16.3.249           target_hostname.domain_name target_hostname
          172.16.3.249           source_app_server.domain_name source_app_server

    It will use source_app_server instead of target_hostname for your host record
    i.e. You will see the following while performing step 13 :
          Target system Display [source_app_server:0.0]:
   
          But it should be [target_hostname:0.0]

10. Check /etc/oraInventory/locks permission, it should be group writeable.
      Otherwise, please run "chmod g+w /etc/oraInventory/locks"

11. Check AIO Sync Status :
      a. smitty aio
      b. Select the menu item "Change/Show Characteristics of Asynchronous I/O"
      c. This field "STATE" must be equal to "AVAILABLE". Otherwise, please perform the following steps :
          i.   smitty aio
          ii.  Select "Configure Defined Asynchronous I/O" or run "mkdev -l aio0"
          iii. Select the menu item "Change/Show Characteristics of Asynchronous I/O"
          iv.  Change the field "STATE" to be configured at system restart" from DEFINED to AVAILABLE.
     
          or just run the following command :
          chdev -l aio0 -a autoconfig='available'

      Remarks :
      Although it said it request us to reboot machine, actually we don't need to do so.

12. Check Kernel Bit
      bootinfo -K
      -> it should return 64bit. Otherwise, please change the kernel from 32bit to 64bit :

      ln -sf /usr/lib/boot/unix_64 /unix
      ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
      bosboot -ad /dev/ipldevice
      shutdown -Fr
      bootinfo -K

13. Start Clone(Make sure the database is shutdown)
      env | grep SID ->ORACLE_SID=ebsdev
      cd $ORACLE_HOME/appsutil/clone/bin
      perl adcfgclone.pl dbTier
      -> Enter APPS password
      -> follow manual answer
      -> Enter New Oracle SID        : ebsdev
      -> Enter New ORACLE HOME        : /oracle/ebsdev/product/10.2.0
      -> Enter New utl_file path        : /oracle/ebsdev/product/10.2.0/appsutil/temp
      -> Enter New Datafile location    : /ebsdevdata
      -> Change preserver Display        : n and change to current host e.g. source_db_server:0.0
      -> Change preserve port value    : y(care -> how to determine which port it will use?)
           Port Assignment :
           No    0    1    ....99
           db    1521    1522    ....1620
           apps    0000    8001    ....8099
           type    Prod

      Remarks :
      It will create initebsdev.ora and ebsdev_source_db_server.env

      Full Question and Answer :
      Provide the values required for creation of the new Database Context file.

      Do you want to use a virtual hostname for the target node (y/n) [n] ?:

      Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:

      Target System database name [ebsuat]:ebsdev

      Target system domain name [whis.org]:domain_name

      Target system RDBMS ORACLE_HOME directory [/oracle/ebsuat/product/10.2.0]:/oracle/ebsdev/product/10.2.0

      Target system utl_file accessible directories list [/oracle/ebsuat/product/10.2.0/appsutil/temp]:/oracle/ebsdev/product/10.2.0/appsutil/temp

      Number of DATA_TOP's on the target system [1]:

      Target system DATA_TOP 1 [/ebsuatdata]:/ebsdevdata

      Do you want to preserve the Display set to source_db_server:1.0 (y/n) [y] ?:n

      Target system Display [target_hostname:0.0]:

      Perl executable location is set to:
      /oracle/ebsdev/product/10.2.0/perl/bin/perl

      Do you want to preserve the port values from the source system on the target system (y/n) [y] ?: n

      Enter the port pool number [0-99]: e.g. 11 -> Database port is 1532

14. Check Clone DB Tier Result
      e.g. egrep -i "error|fail|ora-" /oracle/ebsdev/product/10.2.0/appsutil/log/ebsdev_target_hostname/ApplyDBTier_12021226.log
 
      Remarks :
      It should be ok with the registration error.

15. Check the environment control exist in .profile or not
      e.g. ". /oracle/ebsdev/product/10.2.0/ebsdev_target_hostname.env"

16. Cleanup old setting
      sqlplus apps/<APPS PASSWORD>
      exec FND_CONC_CLONE.SETUP_CLEAN
      commit

17. Clone APPS Tier
      Check and Modify symbolic link
      cd /app/ebsdev/product/iAS
      $ ls -tlr | grep lrw
      lrwxrwxrwx   1 215      dba              26 Aug 25 11:17 6iserver -> /app/ebsseed/product/8.0.6
      lrwxrwxrwx   1 215      dba              10 Aug 25 11:21 JRE -> appsjre118
      rm 6iserver
      ln -s /app/ebsdev/product/8.0.6 6iserver
      chown -h appldev:dba JRE (you may need root privilege)

18. Set Perl version to 5.005_03
      Using Current or Copy other set_perl.env to home directory
      e.g login source_app_server
            rcp -p /home/applprd/set_perl.env [TARGET_SERVER]:/home/appldev/.
            chown appldev:dba /home/appldev/set_perl.env
            modify the content of set_perl.env
            -> ebsprd to ebsdev
            . set_perl.env
            perl -v -> make sure the perl version is 5.005_03

19. Start Clone Procedure
      cd /app/ebsdev/comn/clone/bin
      perl adcfgclone.pl appsTier
      -> Enter APPS password
      -> follow manual answer
      -> Enter New Oracle SID               : ebsdev
      -> Enter Domain Name                   : domain_name
      -> Enter Database Server Node         : target_hostname
      -> Enter Database Domain Name         : domain_name
      -> Enter Application tier server node : n
      -> Enter New APPL_TOP mount point     : /app/ebsdev/appl
      -> Enter New COMMON_TOP               : /app/ebsdev/comn
      -> Enter New 8.0.6 ORACLE_HOME        : /app/ebsdev/product/8.0.6
      -> Enter New iAS ORACLE_HOME          : /app/ebsdev/product/iAS
      -> Enter New Display set              : n and change to current host e.g. target_hostname:0.0
      -> JDK Path                           : /usr/java14
      -> Change preserve port value         : n
            set the no same as before(i.e. while you clone db tier)
            set 0 for prd(Please check operation manual detail)
      -> Enter UTL_FILE_DIR                 : 2(/oracle/ebsdev/product/10.2.0/appsutil/temp)
      -> Reset Custom variable              : n

      Full Question and Answer :
      Do you want to use a virtual hostname for the target node (y/n) [n] ?:

      Target system database SID [ebsuat]:ebsdev

      Target system domain name [whis.org]:domain_name

      Target system database server node [source_db_server]:target_hostname

      Target system database domain name [whis.org]:domain_name

      Does the target system have more than one application tier server node (y/n) [y] ?:n

      Is the target system APPL_TOP divided into multiple mount points (y/n) [n] ?:n

      Target system APPL_TOP mount point [/app/ebsuat/appl]:/app/ebsdev/appl

      Target system COMMON_TOP directory [/app/ebsuat/comn]:/app/ebsdev/comn

      Target system 8.0.6 ORACLE_HOME directory [/app/ebsuat/product/8.0.6]:/app/ebsdev/product/8.0.6

      Target system iAS ORACLE_HOME directory [/app/ebsuat/product/iAS]:/app/ebsdev/product/iAS

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

      Target system Display [target_hostname:0.0]:

      Location of the JDK on the target system [/usr/java14]:

      Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:n

      Clone Context uses the same port pool mechanism as the Rapid Install
      Once you choose a port pool, Clone Context will validate the port availability.

      Enter the port pool number [0-99]: e.g. 11

      Checking the port pool 11
      done: Port Pool 11 is free

      Complete port information available at /app/ebsdev/appl/admin/out/ebsdev_target_hostname/portpool.lst

      Verifying Database Connection...

      Database Connection on Port 1532: Successful

      UTL_FILE_DIR on database tier consists of the following directories.

      1. /usr/tmp
      2. /oracle/ebsdev/product/10.2.0/appsutil/temp
      3. /oracle/ebsdev/product/10.2.0/appsutil/outbound/ebsdev_target_hostname
      4. /usr/tmp
      Choose a value which will be set as APPLPTMP value on the target node [1]:2

      Do you want to reset custom variable settings(y/n) [n]:

20. Check Clone Apps Tier Result :
      e.g. egrep -i "error|fail|ora-" /app/ebsdev/appl/admin/ebsdev_target_hostname/log/ApplyAppsTier_12021652.log

21. Change owner of some symbolic link
      chown -h appldev:dba /app/ebsdev/appl/xx* (you may need root privilege)

22. Add the following lines in APPS User .profile(after "export $PATH")

      . /app/ebsdev/appl/APPSORA.env

      PATH=/usr/vac/bin:$PATH

23. Check variable $APPLPTMP
      login in as appldev
      echo $APPLPTMP -> /oracle/ebsdev/product/10.2.0/appsutil/temp
 
      Modify Oracle UTL_FILE_DIR in parameter file of oradev
      Modify utl_file_dir to the following (please remember to change the SID and hostname, you must use ebsprd parameter file to update) :
      utl_file_dir =  /oracle/ebsdev/product/10.2.0/appsutil/temp,/oracle/ebsdev/product/10.2.0/appsutil/outbound/ebsdev_target_hostname,
                           /interface/ebsdev/ABCDARI01/in,/interface/ebsdev/ABCDARI02/in,/interface/ebsdev/ABCDARI03/in,
                           /interface/ebsdev/ABCDGLI01/in,/interface/ebsdev/ABCDGLI02/in,/interface/ebsdev/ABCDGLI03/in,
                           /interface/ebsdev/ABCDINVI02/in,/interface/ebsdev/ABCDPOI02/in,/interface/ebsdev/ABCDAPO01/out,
                           /interface/ebsdev/ABCDARO04/out,/interface/ebsdev/ABCDARO05/out,/interface/ebsdev/ABCDARO06/out,
                           /interface/ebsdev/ABCDINVO01/out,/interface/ebsdev/ABCDINVO03/out,/interface/ebsdev/ABCDINVO04/out,
                           /interface/ebsdev/ABCDPOO01/out

      chmod g+w /oracle/ebsdev/product/10.2.0/appsutil/temp

24. Restart both apps and database servers

25. Make Sure the following line in $APPL_TOP/admin/adovars.env(Called by $APPL_TOP/ebsdev_target_serverenv)

      IX_RENDERING=$FND_TOP/resource/pasta.cfg; export IX_RENDERING
      IX_PRINTING=$FND_TOP/resource/ixlib.cfg; export IX_PRINTING

26. Modify all path in $FND_TOP/resource/*.cfg
      e.g. grep ebs *.cfg | cut -f1 -d":" | sort | uniq
            change all ebsxxx to ebsdev

            Use the following line to check any missing files :
            grep ebs *.cfg | grep -v ebsdev

27. Make Sure the following line in $FND_TOP/resource/pasta.cfg
      displayfontpath=/app/ebsdev/appl/fnd/11.5.0/resource/ALBANYWT.ttf

28. Check connection information exist in tnsnames.ora or not for Oracle Discoverer 10g
      su - oracle
      cd $ORACLE_HOME/network/admin
      vi tnsnames.ora

      if not, please add them back.

29. Copy Secure file from $FNP_TOP to $ORACLE_HOME/discoverer/secure

      e.g. cp /app/ebsdev/appl/fnd/11.5.0/secure/target_server_ebsdev.dbc /app/ebs/product/disco/discoverer/secure/ebsdev.dbc
            cd /app/ebs/product/disco/discoverer/secure
            chown oracle:dba ebsdev.dbc

30. Remove all unnecessary files in both database and application
      find . -name *<Old SID>*

31. Reset User Password
      Change "system" Password
      e.g. su - oradev
            connect / as sysdba
            alter user system identified by xxxxxx;

      Change "apps" Password
      Make Sure the application server is not running
      /home/appldev/scripts/change_password.sh
      -> Enter SYSTEM password
      -> Enter apps old password
      -> Enter apps new password

      Remarks :
      Run adautocfg.sh after changing apps password
      $COMMON_TOP/admin/scripts/ebsdev_target_server/adautocfg.sh

      Change "sysadmin" password
      /home/appldev/scripts/change_password.sh
      -> Enter SYSTEM password
      -> Enter apps password
      -> Enter sysadmin password

32. Check Auto Config Result
      e.g. egrep -i "error|fail|ora-" /app/ebsdev/appl/admin/ebsdev_target_server/log/12291032/adconfig.log

33. Start Application Server
  
34. Test Application Server Connection
      e.g. http://target_server.domain_name:8010

      Remarks :
      Please make sure the following schedule job is suspended
      "Synchronize Workflow LOCAL tables (1) (Report Set)
      -> Login SYSADMIN
      -> Choose "System Administrator"
      -> Choose "Requests" under "Concurrent"
      -> Choose "Find"
      -> Scroll down until you find "Synchronize Workflow LOCAL tables (1) (Report Set)"
      -> Choose "Synchronize Workflow LOCAL tables (1) (Report Set)"
      -> Choose "Hold Request"
      -> The Phase should change to "Inactive"
      -> The Status should change to "On Hold"

      Please make sure the parameter of the following schedule job is changed
      Synchronize Workflow LOCAL tables (Report Set)
      -> Login SYSADMIN
      -> Choose "System Administrator"
      -> Choose "Set" under "Concurrent"
      -> Press "F11"
      -> Input "Sync%" in the field "Set"
      -> Press "CTRL" + "F11"
      -> Choose "Link Stages"
      -> Change "Success","Warning" and "Error" of "ENG_LIST" to "GBX"
      -> Choose "Done"
      -> Choose "Define Stages"
      -> Choose "FND_RESP"
      -> Choose "Requests"
      -> Choose "Parameters"
      -> Change the value of "Orig System" from "FND_RESP" to "ENG_LIST"
      -> Choose "Save"
      -> Choose "FND_USR"
      -> Choose "Requests"
      -> Choose "Parameters"
      -> Change the value of "Orig System" from "FND_USR" to "ENG_LIST"
      -> Choose "Save"

35. Test Discoverer Connection
      http://target_server.domain_name:7777/
      Choose "Discoverer Viewer"
      -> Choose "Oracle Applications"
      -> Input "sysadmin" in User Name
      -> Input "ebsdev" in Database
      -> Choose any in responsibility
      -> If you can retrieve any result, it mean the service is up and running

      Remarks :
      If discoverer is not yet started, please use the following command to start the service :
      su - oracle
      /home/oracle/scripts/start_discoverer.sh

36. Reset Notification Mailer
      -> Login SYSADMIN
      -> Choose "System Administrator"
      -> Choose "Dashboard" under "Oracle Applications Manager"
      -> Choose "Site Map"
      -> Choose "Notification Mailer"
      -> Choose "Edit"
      -> For production environment, please change "Server Name" to "domain_name". Otherwise, you can just use the hostname of target server
      -> Choose "Apply"
      -> Choose "Service Components"
      -> Choose "Stop" in Action and press "Go" to stop "Workflow Notification"
      -> Choose "Workflow Mailer Service" after "Workflow Mailer Service" is stopped (i.e. Status = "User Deactivated")
      -> Choose "Stop All" and press "Go" to stop all components (i.e. State = "Deactivated")
      -> Choose "Start All" and press "Go" to start all components after all components are stopped
      -> Choose "Start" in Action and press "Go" to start "Workflow Notification" after all components are started
      -> You may ask target user to test mail later

      Remarks :
      If it cannot connect to the server, it will prompt the following error :
  
      Validation error occurred. Please check indicated fields below.

      For production environment, please make sure the following record is inside /etc/hosts
      10.16.100.246           domain_name

36. Check Database Parameter UTL_FILE_DIR
      -> Login SYSADMIN
      -> Choose "System Administrator"
      -> Choose "System Configuration Overview" under "Oracle Applications Manager"
      -> Choose "Database"
    -> Choose "Init.ora Parameters"
    -> Choose "Next" until you find "UTL_FILE_DIR"
    -> Please verify the setting

37. Update Profile Option
      -> Login SYSADMIN
      -> Choose "System Administrator"
      -> Choose "System" under "Profile"
      -> Input "Site Name%" in Profile and press "Find"
      -> Change to "ABCD ERP Development Environment" and press "Save" (need restart apps)
      -> Choose "Find" button for next search
      -> Input "ICX%" in Profile and press "Find"
      -> Validate/Update the following variable(You may refer to ERP System Operation Manual) :
            ICX: Discoverer use Viewer = No
            ICX: Discoverer Launcher = http://target_server.domain_name:8010/discoverer/plus?Connect=[APPS_SECURE]
            ICX: Discoverer Viewer Launcher = http://target_server.domain_name:8010/discoverer/viewer?Connect=[APPS_SECURE]
            ICX: Forms Launcher = http://target_server.domain_name:8010/dev60cgi/f60cgi
            ICX: Report Launcher = http://target_server.domain_name:8010/dev60cgi/rwcgi60
            BNE UIX Physical Directory = /app/ebsprd/comn/html/cabo
            Application Framework Agent = http://target_server.domain_name:8010
            Applications JSP Agent = http://target_server.domain_name:8010
            Applications Web Agent = http://target_server.domain_name:8010/pls/ebsdev
            Apps Servlet Agent = http://target_server.domain_name:8010/oa_servlets
      -> Choose "Application Developer"
      -> Choose "Message" under "Application"
      -> Press "F11"
      -> Input "FND_SSO_WELCOME%"
      -> Press "CTRL" + "F11"
      -> Change to "ABCD ERP Development Environment" (need restart apps)
      -> Choose "Save"

38. Set Temporary Directory in XML Publisher Administrator
      -> Check $APPLPTMP of appldev    
      -> Login SYSADMIN
      -> Choose "XML Publisher Administrator"
      -> Choose "Administration" under "Home"
      -> Choose "General" Under "Properties"
      -> Input $APPLPTMP to "Temporary Directory"
            e.g. /oracle/ebsdev/product/10.2.0/appsutil/temp
      -> Choose "Save"

39. Restart all services

Remarks :
Any hostname above is just an example, you should replace them with the source and target server hostname.
Any username above is just an example, you should replace them with the source and target user.

沒有留言: