Before cloning we have to take full database backup using  RMAN Target  /

COMMAND:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Once completed,move the backup file to target server

USING SCP BACKUP FILE TRANSFER FROM SOURCE (TEST1) TO TARGET (TEST)

COPY THE PFILE FROM SOURCE (TEST1) TO TARGET (TEST)

  • CONTROL FILE BACKUP LOCATION SHOWED AFTER RMAN BACKUP WAS DONE.
  • GO TO LOCATION COPY THE FILE FROM SOURCE (TEST1) TO TARGET (TEST)

IN SAME LOCATION , COPY THE PASSWORD FILE  FROM SOURCE (TEST1) TO TARGET (TEST)

TARGET SERVER:

 EDIT THE COPIED PFILE

  • CHANGE DATABASE NAME
  • ADD db_file_name_convert if we use different database name) and add location of datafile used in source server .Use same location in target server and change database name.
  • ADD log_file_name_convert, add location of redo log file used in source server.Use same location in target server and change the DB name

ONCE PFILE EDITED

CREATE THE SAME LOCATION FOR PFILE,CONTROL FILE,AUDIT FILE,REDO LOG FILE USED IN SOURCE SERVER

COPY THE PFILE,PASSWORD FILE IN $ORACLE_HOME/dbs LOCATION.

 CREATE ENV FILE FOR DATABASE.

  • RUN THE ENV FILE
  • START THE DATABASE USING sqlplus / as sysdba
  • STARTUP NOMOUNT WITH PFILE

CHECK WHERE INSTANCE WAS STARTED  USING v$instance

[oracle@dba ~]$ . test.env

[oracle@dba ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Fri Oct 14 17:08:24 2022

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount pfile=’/u01/app/oracle/product/19.0.0/dbhome_1/dbs/inittest.ora’

ORACLE instance started.

 

Total System Global Area 1509945616 bytes

Fixed Size     8896784 bytes

Variable Size   620756992 bytes

Database Buffers   872415232 bytes

Redo Buffers     7876608 bytes

SQL> select INSTANCE_NAME,STATUS from v$instance;

INSTANCE_NAME  STATUS

—————-                     ————

   test                                STARTED

 

[oracle@dba ~]$ rman auxiliary /

Recovery Manager: Release 19.0.0.0.0 – Production on Fri Oct 14 18:31:41 2022

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 

connected to auxiliary database: TEST (not mounted)

RUN RMAN COMMAND

RMAN> run {

allocate auxiliary channel aux1 device type disk;

allocate auxiliary channel aux2 device type disk;

DUPLICATE DATABASE TO “TEST” BACKUP LOCATION ‘/home/oracle/backup’ nofilenamecheck;

release channel aux1;

release channel aux2;

}

2> 3> 4> 5> 6> 7>

allocated channel: aux1

channel aux1: SID=28 device type=DISK

allocated channel: aux2

channel aux2: SID=25 device type=DISK

Starting Duplicate Db at 14-OCT-22

searching for database ID

 

contents of Memory Script:

{

Alter clone database open resetlogs;

}

executing Memory Script

database opened

Recovery Manager complete.

AFTER RECOVERY MANAGER COMPLETE START THE DATABASE

[oracle@dba ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Fri Oct 14 18:47:02 2022

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

SQL> select name,open_mode from v$database;

 

NAME   OPEN_MODE

——— ——————–

TEST   READ WRITE

 

Recent Posts

Start typing and press Enter to search