In the following
document we will clone our PROD single node instance installed on
tmfbtest2.tameerbank.com server at location /d01/oracle/TEST to the other
server tmfbtest1.company.com at location
/d01/oracle/TEST
Pre-Clone
/opt/oraprod/db/tech_st/11.1.0/appsutil/scripts/PROD_r12prod
perl adpreclone.pl dbTier
/opt/oraprod/inst/apps/PROD_r12prod/admin/scripts
Source
system Target system
SID
PROD
PROD
Port pool 80
53
Database user oraprod
oraprod
Application user applprod applprod
1. Start source
system database tier
Login as oracle database user
Start database listener
Start database
2. Start source
system application tier
Login as oracle application user
Start application
3. Prepare source system database tier
Connect to database user and run given
script
Provide apps user password
It will take some time to complete the
stage
Log file should be checked
4. Prepare source
system – application tier
Run given script
It will take some time to complete the
stage
After completing this stage generated
log must be checked
At the end of log file status must be
“completed successfully”
5. Stop source system
– application tier
6. Stop source system
- database tier
Stop
database listener
Stop
the database
7. Copy the source
system to target system
Login as root user
Copy db folder
from source to destination machine at appropriate path
Copy apps
folder from source to target machine at appropriate path
Copy inst
folder from source to target machine at appropriate path
8.
After completing the copy of these folders go to target machine
Add database and application user
having group dba
9. Give permission on
Target System
Change ownership of db folder from root to oraprod
Change ownership of apps folder from root to applprod
Change ownership of inst folder from root to applprod
10. Configure the
Target System – database tier
Login as oracle database user and
run adcfgclone.pl from given path
Provide the apps user password
Give
target system host name
Provide no
for RAC
Provide SID
Provide path of base directory
Provide path of data
folder, default in this case
Provide path of RDMS ORACLE_HOME directory default in this case
Do not preserve the display
Give target system display
For port value provide no if you want to use different port value from
source
system
Provide port pool
value i.e 53
It will take some
time to complete
10. Configure the
Target System – application tier
Login as oracle application user
and run adcfgclone.pl from given path
provide apps user password
Provide host name i.e tmfbtest1.tameerbank.com in this case
Provide database SID i.e. PROD
Provide name of database server node
i.e. tmfbtest1.tameerbank.com
Provide path of database directory
Provide path of ORACLE_HOME directory, default in this case
Provide path of APPL_TOP,
default in this case
Provide path of COMMON_TOP directory, default in this case
Provide path of instance home
directory
Press
Enter for default values
Do
not preserve the display, for this case
Provide system display
Provide no to
select different port pool value from source system
Give port pool value i.e. 53
Select 1 for
UTL_FILE _DIR
If status of all services is 0 it means cloning process has
successfully done
Set environment file for database and
application users in following way
Provide high lighted information and
save the changes
Similarly create environment file for
application user
Provide the high lighted information
and save the changes
Login as oracle database
user
Use ls
command to see all scripts available for this user
Login as oracle application user
Use ls
command to see all scripts available for this user
Now database and application is running
Go to internet browser and give
following address to access application
Here default port for application
is 8000 and 53 is added to this value
Troubleshooting
Log Directories:
/opt/oraprod/db/tech_st/11.1.0/admin/PROD_r12prod/diag/rdbms/prod/PROD/trace
/opt/oraprod/inst/apps/PROD_r12prod/logs/appl/conc/log
/opt/oraprod/inst/apps/PROD_r12prod/logs/appl/conc/out
/opt/oraprod/inst/apps/PROD_r12prod/logs/ora/10.1.2/reports/cache
/opt/oraprod/inst/apps/PROD_r12prod/logs/ora/10.1.3/Apache/
/opt/oraprod/inst/apps/PROD_r12prod/appltmp
Delete core file from
/opt/oraprod/inst/apps/PROD_r12prod/ora/10.1.2/forms
/oradisk/oraprod/db/tech_st/11.1.0/admin/PRODTEST_stylodb/diag/rdbms/prodtest/PRODTEST/trace/oradisk/oraprod
/oradisk/oraprod/inst/apps/PRODTEST_stylodb/logs/appl/conc/log
/oradisk/oraprod/inst/apps/PRODTEST_stylodb/logs/appl/conc/out
/oradisk/oraprod/inst/apps/PRODTEST_stylodb/logs/ora/10.1.2/reports/cache
/oradisk/oraprod/inst/apps/PRODTEST_stylodb/logs/ora/10.1.3/Apache/
/oradisk/oraprod/inst/apps/PRODTEST_stylodb/appltmp
Deleting Large number of *.log
Files
find . -name "*.log" -print | xargs rm
find
/Backups/ -type f -mtime +20 -exec rm {} \;
find . -name "*.req" -print | xargs rm
Removing old Logs (keep only three days old)
/opt/oraprod/db/tech_st/11.1.0/admin/PROD_r12prod/diag/rdbms/prod/PROD/trace
find
/opt/oraprod/inst/apps/PROD_r12prod/logs/appl/conc/log/ -type f -mtime
+0 -exec rm {} \;
find
/opt/oraprod/inst/apps/PROD_r12prod/logs/appl/conc/out/ -type f -mtime
+0 -exec rm {} \;
find
/opt/oraprod/inst/apps/PROD_r12prod/logs/ora/10.1.3/opmn/ -type f -mtime
+0 -exec rm {} \;
find
/opt/oraprod/inst/apps/PROD_r12prod/logs/ora/10.1.2/reports/cache/ -type
f -mtime +0 -exec rm {} \;
find
/opt/oraprod/inst/apps/PROD_r12prod/logs/ora/10.1.2/forms -type f -mtime +0
-exec rm {} \;
find
/opt/oraprod/inst/apps/PROD_r12prod/logs/ora/10.1.3/Apache/ -type f
-mtime +0 -exec rm {} \;
find
/opt/oraprod/inst/apps/PROD_r12prod/logs/ora/10.1.3/opmn -type f -mtime
+0 -exec rm {} \;
find /opt/oraprod/db/tech_st/11.1.0/admin/PROD_r12prod/diag/rdbms/prod/PROD/trace
-type f -mtime +0 -exec rm {} \;
find
/opt/oraprod/inst/apps/TEST_stylodb/logs/appl/conc/log/ -type f -mtime
+0 -exec rm {} \;
find
/opt/oraprod/inst/apps/TEST_stylodb/logs/appl/conc/out/ -type f -mtime
+0 -exec rm {} \;
find
/opt/oraprod/inst/apps/TEST_stylodb/logs/ora/10.1.2/reports/cache/ -type
f -mtime +0 -exec rm {} \;
find find
/opt/oraprod/inst/apps/TEST_stylodb/logs/ora/10.1.3/Apache/ -type f
-mtime +0 -exec rm {} \;
0 comments:
Post a Comment