Professional Documents
Culture Documents
PROD> select max(first_change#) chng from v$archived_log; eg SQL> select max(first_change#) chng from v$archived_log; CHNG ---------1208744642
4. Take backup of spfile to pfile from Production and copy to Clone server
create pfile='init<new database sid>.ora' from spfile;
OR
you can also take table space wise backup mode enable. and transfer only that tablespace datafiles and disable the tablespace backup mode. select 'alter tablespace '||NAME||' begin backup;' from v$tablespace union select 'alter tablespace '||NAME||' end backup;' from v$tablespace order by 1; eg. alter tablespace users01 begin backup;
SCP the datafiles belong to only user01 tablespace. alter tablespace users01 end backup; and then go to another table space similarly. After that verify that all tablespace is in disable backup mode. SELECT * FROM V$BACKUP WHERE STATUS = 'ACTIVE';
7. After taking the data files copy to clone server, Issue this command to production server.
ALTER SYSTEM ARCHIVE LOG CURRENT;
9. Edit the Control file and PFILE if location of data files and control files is different.
Control file: create_control.sql STARTUP NOMOUNT pfile = 'location of pfile' CREATE CONTROLFILE SET DATABASE "CLON" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 4672 LOGFILE GROUP 1 '/u02/oradata/CLON/redo01.log' SIZE 50M BLOCKSIZE 512, GROUP 2 '/u02/oradata/CLON/redo02.log' SIZE 50M BLOCKSIZE 512, GROUP 3 '/u02/oradata/CLON/redo03.log' SIZE 50M BLOCKSIZE 512 DATAFILE '/u02/oradata/CLON/system01.dbf', '/u02/oradata/CLON/sysaux01.dbf', '/u02/oradata/CLON/undotbs01.dbf', '/u02/oradata/CLON/users01.dbf' CHARACTER SET AL32UTF8 ; PFILE: If Location is different from production database. Edit the following paramter in pfile bdump , cdump , udump , controlfiles , log_archive_dest to new location.
12. Create Temporary tablespace and tempfiles to database. 13. Create SPFILE from PFILE
Create spfile from pfile;
14. Shutdown the database. and startup with spfile. 15. Configure TNS
Add entries for new database in the listener.ora and tnsnames.ora as necessary.