Wednesday, October 13, 2010

Cloning Of Servers in 11i ....

Cloning: - 

Creates an identical cpoy of an existing Oracle Application server.

Cloning In Brief: -
  • Preparing the source system for cloning.
  • Copying the source system to the target system.
  • Configure the target system.

Preparing the source system for cloning.

Prepare the Source System DataBase Tier for Cloining.
Preparing the Sourse System Application Tier for Cloning.

Copying the source system to the target system.

Copying the Application Tier File System.
Copying the DataBase Tier File System.
  

Configure the target system.

Configure the target System Application Tier Server Nodes.

BEFORE CLONING
START DATABASE INSTANCE, LISTENER & APPLICATION


TEST

1. Start TEST Database Instance

$ su - oratest                    

$ cd proddb/11.1.0/
$ TEST_erp.env                         ( To initialize oracle database Variables)
$ cd appsutil/scripts/TEST_erp
$ /addbctl.sh start
$ /addlnctl.sh start TEST
$ connect "/as sysdba"                        
$ SQL> startup mount                     
$ exit                         


 2. Start TEST Listener

$ lsnrct1 start                       
$ lsnrctl start test                       
$ exit                           


3. Start TEST Application 

$ su - appltest
$ testappl/TESTORA.env         (To initialize oracle Application Variables)
$ cd/ $COMMON_TOP/admin/scripts/TEST_erp/adstrtal.sh   apps/apps       
$ exit


4. Initialize TEST Graphic Settings (ROOT)

# export DISPLAY = 192.168.1.252 :0.0    (Host Address of Test Server)           
# xhost +                               
# xhost 192.168.1.252                      



*****************************************************************************

PRODUCTION

5. Start PRODUCTION Database Instance

$ su - oraprod                            
$ connect "/as sysdba"                         
$ startup mount                                   
$ exit                             


 6. Start PRODUCTION Listener

$ lsnrct1 start                             
$ lsnrctl start test                           
$ exit                          


7. Start PRODUCTION Application 

$ su - applprod
$ cd/ data/prodcomn/admin/scripts/PROD_prodebiz/adstrtal.sh  apps/apps       
$ exit


8. Initialize TEST Graphic Settings (ROOT)

# export DISPLAY = 192.168.1.251 :0.0    (Host Address of Production Server)          
# xhost +                            
# xhost 192.168.1.251   



STEPS for Cloning: -

PreClone:-



PRODUCATION 

1. DataBase Instance

$ su - oraprod           
$ cd/data/           
$ ls                           

$ ls          (to list all the files and folders under "data"

it will show all the database files. select Production Database folder.
$ /proddb/9.2.0/  
$ ls                                   

it will show all the current utilities . Select application Utility
$ /appsutil/scripts/  
$ ls                                   

It will show all the script files 
$ /PROD_prodebiz/       
$ ls                                       

it will show all the perl script files. select preclone perl script file
$ perl adpreclone.pl dbTier       

now it will ask for Password. enter Default Password "apps" or whatever modified.
password = apps               



*****************************************************************************


2. Application

$ su - applprod
$ cd/data/             
$ ls                             

It will show all the database files. select Production Application folder.
$ /prodcomn/   
$ ls                                  

Select application administrator.
$ /admin/scripts/  
$ ls                                      

It will show all the script files 
$ /PROD_prodebiz/       
$ ls                                      

It will show all the perl script files. select preclone perl script file
$ perl adpreclone.pl appsTier       

Note: - Now it will ask for Password. Enter Present Working Directory.

$ password   ........      

*****************************************************************************



 3. Shutdown Application

$ su - applprod
$ sh adstpall.sh apps/apps             
$ exit                             


 4. Shutdown Database


$ su -oraprod                             
$ connect "/as sysdba"                             
$ shutdown immediate                             
$ exit                             

NOTE: - Repeat All these four steps for Test Database Instance & Test Application.


TEST

5. DataBase Instance

$ su - oratest           
$ cd/data/           
$ ls                         

it will show all the database files. select Test Database folder.
$ /proddb/9.2.0/   
$ ls                                 

it will show all the current utilities . Select application Utility
$ /appsutil/scripts/ 
$ ls                                  

It will show all the script files 
$ /TEST_testebiz/       
$ ls                                        

it will show all the perl script files. select preclone perl script file
$ perl adpreclone.pl dbTier        

now it will ask for Password. enter Default Password "apps" or whatever modified.
password = apps              


*****************************************************************************


6. Application

$ su - appltest
$ cd/data/            
$ ls                             

It will show all the database files. select Test Application folder.
$ /prodcomn/   
$ ls                            

Select application administrator.
$ /admin/scripts/   
$ ls                                   

It will show all the script files 
$ /TEST_testebiz/          
$ ls                                     

It will show all the perl script files. select preclone perl script file
$ perl adpreclone.pl appsTier     

Note: - Now it will ask for Password. Enter Present Working Directory.

$ password   ........         

*****************************************************************************


 7. Shutdown Application

$ su - appltest
$ sh adstpall.sh apps/apps              
$ exit                             


 8. Shutdown Database Instance

$ su - oratest                            
$ sqlplus "/as sysdba"                             
$ shutdown immediate                            
$ exit                            

Now Start Copying Database Instance & Application.




Copying Database Instance & Application:-

 To check the total , free and available disk space
 $ df -h   


9. Copy Database

$ cd -R/data/proddb/ /testshare/                    


10. Copy Application

$ cp -R/data/ proddata/ /testshare/      
          

11.  Copy database files

$ cp /data/undo03.dbf / testshare/                  


PostClone:-

Fire Scripts for Post Cloning in AppsTier following by dbTier:-
  

12. Post Cloning in  dbTier

$ ORACLE_HOME\ appsutils\clone\Bin\                  
$ ls                                                           
$ Perl adcfgclone.pl dbTier                      



13. Post Cloning in  appsTier

$ COMMON_TOP\clone\bin\                    
$ ls                                                          
$ Perl adcfgclone.pl appsTier                  


14.  Providing Rights

$ chmod -R 777 /data/undo03.uif                    
$ chmod -R 777 /data/proddb/                          
$ chmod -R 777 /data/proddata/                       
$ chown -R 777 /oratest :oratest /data/proddb/                    
$ chown -R 777 /oratest :oratest /data/proddata/                 
$ chown -R 777 /oratest :oratest /data/undo03.uif               


*****************************************************************************



TEST


15. Start TEST Database Instance

$ su - oratest                          
$ cd proddb/9.2.0/
$ TEST_erp.env                         ( To initialize oracle database Variables)
$ cd appsutil/scripts/TEST_erp
$ /addbctl.sh start
$ /addlnctl.sh start TEST
$ connect "/as sysdba"                        
$ SQL> startup mount                     
$ exit                         


 16. Start TEST Listener

$ lsnrct1 start                       
$ lsnrctl start test                       
$ exit                           


17. Start TEST Application 

$ su - appltest
$ testappl/TESTORA.env         (To initialize oracle Application Variables)

$ cd/ $COMMON_TOP/admin/scripts/TEST_erp/adstrtal.sh   apps/apps       
$ exit


 18. Initialize TEST Graphic Settings (ROOT)

# export DISPLAY = 192.168.1.251 :0.0    (Host Address of Test Server)           
# xhost +                               
# xhost 192.168.1.251                      


*****************************************************************************


PRODUCTION


19. Start PRODUCTION Database Instance

$ su - oraprod                            
$ connect "/as sysdba"                         
$ startup mount                                   
$ exit                             


 20. Start PRODUCTION Listener

$ lsnrct1 start                             
$ lsnrctl start test                           
$ exit                          


21. Start PRODUCTION Application 


$ su - applprod
$ cd/ data/            
$ ls              

it will show all the database files. select Production Database folder.
$ /prodcomn/   
$ ls                                 

it will show all the current utilities . Select application Utility
$ /admin/scripts/  
$ ls                                    

It will show all the script files 
$ /PROD_prodebiz/       
$ ls                                       

it will show all the perl script files. select preclone perl script file
$ adstrtal.sh   apps/apps       
$ exit


22. Initialize PRODUCTION Graphic Settings (ROOT)

# export DISPLAY = 192.168.1.251 :0.0    (Host Address of Production Server)          
# xhost +                            
# xhost 192.168.1.251                        


*****************************************************************************


Thanks,

With Warm Regards,

Sukhwinder Singh

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.