Sunday, January 4, 2009

Database Cloning of 9i

DATABASE CLONING



1. create cloneenv file copy envfile all ready existed clone.env file
cp ofdb1.env clone.env. created.

2. open clone.env vi clone.env clone.env is
opened.

3. edit the SIDname SIDname=clone SIDname is edited.

4. go to admin cd admin we are in admin dir.

5. create dir with SIDname mkdir clone clone dir is created.

6. create trace dir's in cd clone trace dir's are created.
clone dir mkdir -p udump cdump bdump

7. go oradata cd oradata we are in oradata dir.

8. create dir with SIDname mkdir clone clone dir is created.

9. run previous env file . ofdb1.env env's are seted.

10. go dbs cd $ORACLE_HOME/dbs we are in dbs.

11. copy the initofdb1.ora cp initofdb1.ora initclone.ora pfile i.e
initclone.ora is
created.

12. open&edit initclone.ora vi initclone.ora edited SIDname.

13. connect to sqlplus run sqlplu '/as sysdba' connected to sqlplus.

14. open the database startup db is opened.

15. take contolfile backup sql>alter database backup controlfile controlfile is bkuped.
to trace;

16. shutdown previous db sql>shutdown db is shutdowned.

17. go to udump cd admin/ofdb1/udump we are in udump dir.

18. copy tracefile to base cp tracefile to $ORACLE_BASE/clone.sql clone.sql is created.

19. open&edit clone.sql vi clone.sql clone.sql edited.

20. go to oradata/ofdb1 cd oradata/ofdb1 we are in ofdb1.

21. copy all datafiles to cp * /home/oradata/clone & all files are copied.
new clone dir

22. run clone.env . clone.env clone.env is runned.

23. connect to sqlplus sqlplus '/as sysdba' connected to sqlplus.

24. open db in nomount startup nomount db in nomount state.

25. run the script sql>@clone.sql contolfile is not created
it is unable to create or
all ready it is existed.

26. go to oradata/clone cd /oradata/clone we are in clone dir.

27. remove ctlfile existed rm crtlfile.ctl ctlfile is removed.

28. again run script sql>@clone.sql controlfile is created.

29. reset the logs sql>alter database open resetlogs; database is altered.

30. create temp tablespace sql>ALTER TABLESPACE TEMP ADD TEMPFILE temp table space created.
'/home/praveen/oradata/clone/temp01.dbf'
SIZE 41943040 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;





SOFTWARE CLONING



1. go to metalink.oracle.com to check oracle9iR2 s/w cloning doc read all the
steps.

2. download patch download patchp5511585 patch downloaded.

3. unzip the patch unzip patchp5511585 patch is unzipped
we get 5511585 dir.


4. go to sysman cd /home/5511585/files/sysman/ we are in sysman.

5. copy the clonerstage cp -Rp clonerstage clonerstage is
from 5511585 dir /home/praveen/product/sysman copied.

6. go to cd /home/praveen/product/sysman/ we are in p46.
clonerstage_9.2.0.8.0.zip clonerstage/db/p46/

7. unzip file unzip clonerstage_9.2.0.8.0.zip file is unzipped
we get clonerstage
folder.

8. copy the oracle product cp -Rp /home/praveen/product product is copied.
/d01/praveen/product_clone

9. go to previous clonerstage cd /home/praveen/product/sysman/ we are in clonerstage.
clonerstage/db/p46/clonerstage/

10. run perl script perl clone.pl ORACLE_HOME="/d01/praveen/ script is
product_clone" ORACLE_HOME_NAME= runned.
"product_clone"

11. run the root.sh from sh root.sh it will give the
root user permissions to write
the products &
components in
product_clone.

The cloning of oracle 9iR2 product is completed.

No comments:

Post a Comment