PROD Hot Oracle Database Cloning Without RMAN
Hot database cloning is ideal for 24/7 production databases where downtime is not an option. This method uses the hot backup mode to clone a database while it is running — no RMAN required, no database shutdown needed.
In this guide, we’ll demonstrate hot cloning of a database named PROD
using SQL*Plus and basic OS utilities like scp
.
Prerequisites
-
Archivelog mode must be enabled.
-
Sufficient space on target host.
-
SSH access between source and target.
-
Consistent file paths between source and target (or adjustments in
init.ora
and controlfile script).
Source & Clone Configuration
-
Source DB SID:
PROD
-
Clone DB SID:
PROD
-
File paths are the same on both systems.
Step 1: Clone the Parameter File (init.ora
)
On the source:
Then, copy it to the target server:
On the target, edit initPROD.ora
as needed:
Ensure directories for:
-
Control files
-
Audit dump (adump)
Create them if missing:
Step 2: Clone the Controlfile (Trace Method)
On the source:
Copy the controlfile trace to the target:
Edit the controlfile trace on the target:
Clean it up:
-
Delete everything before
CREATE CONTROLFILE
-
Delete everything after the last
;
You should retain something like:
Step 3: Clone the Datafiles
3.1 Put DB in Backup Mode
3.2 Copy Datafiles & Redo Logs
3.3 End Backup Mode
3.4 Copy Archivelogs
Copy all archivelogs generated between begin backup
and end backup
to the same location on the target:
Step 4: Mount and Recover Clone DB
4.1 Startup and Mount
4.2 Recover Database
Feed the required archive logs when prompted. Continue hitting ENTER
until prompted to type CANCEL
.
4.3 Open Clone Database
Hot Clone Complete
We’ve now created a fully functional clone of the PROD
database without shutting it down and without using RMAN.
Post a Comment
Post a Comment