Sei sulla pagina 1di 6

E-Business Suite Cloning Procedure

1.

EBS R12 CLONING


Author: Godfrey I Maema Applications DBA Certified Professional Oracle E-Business Suite R12 Oracle Certified Professional - Oracle 10G DBA

1.1 SYSTEM CLONING


1.1.1 Context In order to accurately test system changes and the effects of patches on your EBS system, it may be necessary to create a mirror copy the production system in order to protect the production system from fatal, unintended and non-reversible changes. System cloning accomplishes this purpose. This document outlines the necessary steps to clone an Oracle EBS system. The following cloning procedure assumes cloning from production to a test environment.

1.1.2 Cloning Procedure


The cloning procedure is divided into several phases namely: A. Preparing the source system for cloning. B. Backing up the source system. C. Transferring the backup to the target system. D. Running the clone scripts. E. Testing the cloned environment.

A. PREPARING THE SOURCE SYSTEM FOR CLONING Follow the steps below in order to prepare the source system for cloning:

1 of 6

E-Business Suite Cloning Procedure

1. Logon to the server with the application user account e.g., su - applprod 2. Change to this directory: cd $ADMIN_SCRIPTS_HOME 3. Execute this script in order to prepare the system (application tier) for cloning: perl adpreclone.pl appsTier 4. Once the script completes successfully, shutdown the application tier services: sh adstpall.sh apps/apps -> To shutdown the application 5. Once the above scripts complete, issue this command to verify that all system processes have been shutdown: ps -ef | grep LIB NB: when no process is returned then the application is completely shutdown 6. Switch to the database user e.g., su - oraprod 7. Change to this directory: cd $ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME> 8. Execute this script in order to prepare the system (database tier) for cloning: perl adpreclone.pl dbTier

B. BACKUP THE SOURCE SYSTEM 1.

Once the script above completes successfully, shutdown the listener and the database services:

Stop the listener service using this command - lsnrctl stop prod Logon the database using this command - sqlplus / as sysdba make a backup of the controlfile (this will be used later to recreate/clone the database) using this command: alter database backup controlfile to trace; Then identify and rename the trace file to ctrl_file.sysdate.sql Shutdown the database using this command - shutdown immediate

2.

Now to create the actual system backup: create the database backup files (.tar files)

Create .tar files for the datafiles:


tar czvf datafilesBackup.date.tar <datafiles location>

Create another .tar file for the database binaries using this command:
tar -czvf rdbms.<date>.tar <ORACLE_BASE>

3.

Now create the actual backup (tar) file for the application tier Create a .tar file for the application using this command:

2 of 6

E-Business Suite Cloning Procedure

tar czvf AppsTier.<date>.tar <Apps ORACLE_BASE> 4.

After all the .tar files have been created, restart the source (production) system.

First start-up the database: switch to the database user e.g., su - oraprod Logon to the database: sqlplus / as sysdba Start-up the database, type: startup Exit from the database by typing: exit Start the listener: lsnrctl start prod Exit from the database user by typing: exit Start-up the application tier: switch to the application user: su - applprod Change directory to: cd $ADMIN_SCRIPTS_HOME Start the application: sh adstrtall.sh apps/apps For application services: ps -ef | grep LIB For the listener: ps -ef | grep lsn For the database: ps -ef | grep _PROD

5.

confirm that all services have been started successfully, issue this command:
o o o

C. TRANSFER THE BACKUP TO THE TARGET SYSTEM


1.

Move or transfer all backup (.tar) files from the source to the target system for example, via the scp command on Linux: scp <source file> root@<target server>:<target directory>

D. RUN THE CLONE SCRIPTS ON THE TARGET SYSTEM 1.

Once the files are transferred, create system users - make sure the database and application users are created on the target system (test environment) including the dba group: issue this commands groupadd dba -> To add or create a group useradd oratest g dba -> To create a user and assign a default group to user

2.

Restore backup - Using the root account, unzip or restore the backup files into the destinations. Rename the file/directories as necessary.

3 of 6

E-Business Suite Cloning Procedure

3.

Grant File Privileges - Change ownership of the unzipped/restored files to the OS users; database binaries and datafiles must be owned by the database user. Issue this command (repeat chown command for each directory where the database binaries and datafiles are restored ): For example
cd /u01 chown R oratest:dba <directory> e.g. chown R oratest:dba <ORACLE_BASE>

4.

Set the Environment copy the environment file into the home directory of the database user, update the environment variables such as $ORACLE_HOME, $ORACLE_SID, $PATH, $LD_LIBRARY_PATH, $SHLIB_PATH, and $LIBPATH to point to the correct. This updates are only necessary if the directory structure of the target is different from the source system.

5.

Recreate the Database


Switch to the database user: su -oratest Edit the controlfile backup script (ctrl_file.sysdate.sql), then launch sqlplus and execute the ctrl_file.sysdate.sql script to recreate the database.

Verify that the created database operates correctly e.g. it can shutdown and start-up properly.
6.

Run the Clone Script on the database tier - While the database is open: Navigate to this directory:
cd $ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>

Execute the adcfgclone.pl script: perl adcfgclone.pl dbTier , this script will prompt for specific values which will be used to configure the environment of the clone system (database tier). Once the script completes successfully (exist with status 0) the listener service would be started automatically by the adcfgclone.pl script. Locate the new environment file in the $ORACLE_HOME and replace the one in the home directory. Also add this line . ./<Environment File Name> in the .bash_profile. This line will ensure the environment variables are correctly set each time the user logs on.

4 of 6

E-Business Suite Cloning Procedure

Restart both the listener and database services so that the new environment variables can take effect. 7. Remove references to the source system.

Launch sqlplus and login using the apps user: sqlplus apps/apps. Execute this procedure: execute fnd_conc_clone.setup_clean; then issue the commit command: commit; Exit out of sqlplus: exit While in this directory $ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME> run
AutoConfig: sh adautocfg.sh then restart (shutdown and start-up) the database server via sqlplus.

8. Run the Clone Script on the application tier


Switch to the application user e.g., su appltest Navigate to bin directory e.g., cd /u02/prod/apps/apps_st/comn/clone/bin Execute the adcfgclone.pl script: perl adcfgclone.pl appsTier , this script will prompt for specific values which will be used to configure the environment of the clone system (application tier). Once the script completes successfully (exist with status 0) the concurrent managers would be started automatically by the adcfgclone.pl script. Locate the new environment file named APPS<SID>_<Server Name>.env e.g. APPSTEST_test.env in the $APPL_TOP directory and place it in the home directory of the application user. Also add this line . ./ APPSTEST_tst.env in the .bash_profile

E. TESTING THE CLONED ENVIRONMENT Launch the application via Internet Browner using the application URL. The URL in your environment will be determined by the values provided during adcfgclone.pl script execution. Once logged-in as sysadmin , navigate to System Administrator> Concurrent: Manager> Define. Ensure the Primary Node under the Parallel Concurrent Processing Details references the target server name for each Concurrent Program where the primary Node has a value. Shutdown all application tier services then run AutoConfig: sh adautocfg.sh

5 of 6

E-Business Suite Cloning Procedure

Launch the application and generate the one or two reports, if all is in order then make the system available to users.

6 of 6

Potrebbero piacerti anche