Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

oracle cold cloning 10g step by step perform

Source Database Name: k
Clone Database Name: kCLON

Source Database physical files path=/u01/k/oradata
Cloned Database physical files path=/u02/kCLON/oradata


Steps

1.Startup the source database (if not open)
$ export ORACLE_SID=k
$ sqlplus / as sysdba
SQL> startup

2.Find out the path and names of datafiles, control files, and redo log files.
SQL> select name from v$datafile;
SQL> select member from v$logfile;
SQL> select name from v$controlfile;

3.Take the control file backup.
SQL> alter database backup controlfile to trace;
Parameter file backup.

3.If ‘k’ database is using spfile,
SQL> create pfile=’/u02/kCLON/initkCLON.ora’ from spfile;
If database is using pfile, use OS command to copy the pfile to a backup location.

4.Shutdow the ‘k’ database
SQL> shutdown

5.Copy all data files, control files, and redo log files of ‘k’ database to a target database location.
$ mkdir /u02/kCLON/oradata
$ cp /u01/k/oradata/* /u02/kCLON/oradata/

6.Create appropriate directory structure in clone database for dumps and specify them in the parameter file.
$ mkdir -p /u02/kCLON/{bdump,udump}

7.Edit the clone database parameter file and make necessary changes to the clone database
$ cd /u02/kCLON/
$ vi initkCLON.ora
db_name=kCLON
control_files=/u02kCLON/oradata/cntrl01.ctl
background_dump_dest=/u02/kCLON/bdump
user_dump_dest=/u02/kCLON/udump
. . .
. . .
:wq!

8.Startup the clone database in NOMOUNT stage.
$ export ORACLE_SID=kCLON
SQL> startup nomount pfile=’/u02/kCLON/initkCLON.ora’

9.Create the control file trace for the clone database using the trace control file and specify the appropriate paths for redolog and datafiles.
CREATE CONTROLFILE SET DATABASE “kCLON” RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ‘/u02/kCLON/oradata/redo01.log’ SIZE 5M,
GROUP 2 ‘/u02/kCLON/oradata/redo02.log’ SIZE 5M,
DATAFILE
‘/u02/kCLON/oradata/system01.dbf’,
‘/u02/kCLON/oradata/undotbs01.dbf’,
‘/u02/kCLON/oradata/sysaux01.dbf’,
‘/u02/kCLON/oradata/users01.dbf’,
‘/u02/kCLON/oradata/example01.dbf’
CHARACTER SET AL32UTF8;

10.Create the control file by running from the trace path
SQL> @u01/k/source/udump/cntrl.sql

11.Once the control file’s successfully created, open the database with resetlogs option.
SQL> alter database open resetlogs;






errors:


03:36:33 SQL>  @u01/k/source/udump/cntrl.sql
SP2-0042: unknown command "DATAFILE" - rest of line ignored.
SP2-0734: unknown command beginning "'/home/ora..." - rest of line ignored.
SP2-0734: unknown command beginning "'/home/ora..." - rest of line ignored.
SP2-0734: unknown command beginning "'/home/ora..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "'/home/ora..." - rest of line ignored.
SP2-0734: unknown command beginning "'/home/ora..." - rest of line ignored.
SP2-0734: unknown command beginning "CHARACTER ..." - rest of line ignored.
  1  CREATE CONTROLFILE SET DATABASE "nijam" RESETLOGS ARCHIVELOG
  2      MAXLOGFILES 16
  3      MAXLOGMEMBERS 3
  4      MAXDATAFILES 100
  5      MAXINSTANCES 8
  6      MAXLOGHISTORY 292
  7  LOGFILE
  8   GROUP 1 ‘/u02/kCLON/oradata/redo01.log’ SIZE 5M,
  9   GROUP 2 ‘/u02/kCLON/oradata/redo02.log’ SIZE 5M,
 10    
 11* -- STANDBY LOGFILE

solution:-

03:36:41 SQL> set sqlblanklines ON;  --->Or remove the blank lines.
03:38:55 SQL> @/home/oracle/nijam/oradata/create/monkey.sql;

Comments

Popular posts from this blog

VMWARE WORKSTATION 3,4,5,6,7,8,9,10,11,12,14,15...etc LICENSE KEYS COLLECTION

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

How to Configuration UDEV SCSI Rules In Oracle Linux 5, 6 and 7

Linux ctime,mtime,atime,cmin,amin,mmin

aspell