HOT CLONING IN RAC2:

HOT CLONING IN RAC2:
--------------------------

login as: oracle
oracle@192.168.1.46's password:
Access denied
oracle@192.168.1.46's password:
Last login: Fri Mar  8 10:27:38 2013 from 192.168.1.61
[oracle@rac2 ~]$ cd /prod
[oracle@rac2 prod]$ ls
ASM   Disk1       naidu                         p7312511_10204_Linux-x86.zip  raj_asm  ramhot       sbiclone  standby  usa
disk  lost+found  p6810189_10204_Linux-x86.zip  p7409356_10204_Linux-x86.zip  ram      README.html  sbihot    madhu
[oracle@rac2 prod]$ cd ram
[oracle@rac2 ram]$ . ram.env
[oracle@rac2 ram]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 13 10:23:21 2013

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  419430400 bytes
Fixed Size                  1219784 bytes
Variable Size             167772984 bytes
Database Buffers          247463936 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /prod/ram/admin/arch
Oldest online log sequence     34
Next log sequence to archive   36
Current log sequence           36
SQL> startup force mount restrict
ORACLE instance started.

Total System Global Area  419430400 bytes
Fixed Size                  1219784 bytes
Variable Size             167772984 bytes
Database Buffers          247463936 bytes
Redo Buffers                2973696 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
[oracle@rac2 ram]$ ls
admin     full.dmp   ful.log       oradata     ram.env     scripts     table.dump  tablespace.dump  ts.log
cold      full.dump  hot           owner.dump  redo01.log  shema.dump  table.log   tablespace.log   user.dmp
datapump  full.exp   inctype.dump  owner.log   rman        shema.log   tables.dmp  ts1.log          user.log
ful.dmp   full.log   inctype.log   par.sql     scott.log   sqlnet.log  tables.log  ts.dmp
[oracle@rac2 ram]$
[oracle@rac2 ram]$
[oracle@rac2 ram]$ cd $ORACLE_HOME/dbs
[oracle@rac2 dbs]$ pwd
/u01/app/oracle/product/10.2.0.1/dbs
[oracle@rac2 dbs]$ vi initram.ora
[oracle@rac2 dbs]$
[oracle@rac2 dbs]$
[oracle@rac2 dbs]$
[oracle@rac2 dbs]$
[oracle@rac2 dbs]$
[oracle@rac2 dbs]$ vi initram.ora
[oracle@rac2 dbs]$ mkdir -p /prod/ram/admin/arch
[oracle@rac2 dbs]$ mkdir -p /prod/ram/admin/bdump
[oracle@rac2 dbs]$ mkdir -p /prod/ram/admin/cdump
[oracle@rac2 dbs]$ mkdir -p /prod/ram/admin/udump
[oracle@rac2 dbs]$ mkdir -p /prod/ram/oradata
[oracle@rac2 dbs]$ cd /prod/ram/oradata
[oracle@rac2 oradata]$ ls
1_28_806574211.dbf  control01.ctl  ramdata01.dbf  redo02.log  sysaux.dbf
1_29_806574211.dbf  control02.ctl  redo01.log     redo03.log
[oracle@rac2 oradata]$ mv 1_28_806574211.dbf 1_29_806574211.dbf /prod/ram/admin/arch/
[oracle@rac2 oradata]$ cd /prod/ram
[oracle@rac2 ram]$ ls
admin     full.dmp   ful.log       oradata     ram.env     scripts     table.dump  tablespace.dump  ts.log
cold      full.dump  hot           owner.dump  redo01.log  shema.dump  table.log   tablespace.log   user.dmp
datapump  full.exp   inctype.dump  owner.log   rman        shema.log   tables.dmp  ts1.log          user.log
ful.dmp   full.log   inctype.log   par.sql     scott.log   sqlnet.log  tables.log  ts.dmp
[oracle@rac2 ram]$ cat ram.env
export ORACLE_HOME=/u01/app/oracle/product/10.2.0.1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=ram
#export TNS_ADMIN=/prod/ram/admin/
[oracle@rac2 ram]$
[oracle@rac2 ram]$ . ram.env
[oracle@rac2 ram]$ ls
admin     full.dmp   ful.log       oradata     ram.env     scripts     table.dump  tablespace.dump  ts.log
cold      full.dump  hot           owner.dump  redo01.log  shema.dump  table.log   tablespace.log   user.dmp
datapump  full.exp   inctype.dump  owner.log   rman        shema.log   tables.dmp  ts1.log          user.log
ful.dmp   full.log   inctype.log   par.sql     scott.log   sqlnet.log  tables.log  ts.dmp
[oracle@rac2 ram]$ cd oradata/
[oracle@rac2 oradata]$ vi ctl.sql
[oracle@rac2 oradata]$ ls
control01.ctl  ctl.sql        redo01.log  redo03.log  system.dbf  undo.dbf
control02.ctl  ramdata01.dbf  redo02.log  sysaux.dbf  temp.dbf    user.dbf
[oracle@rac2 oradata]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 13 11:26:35 2013

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area  419430400 bytes
Fixed Size                  1219784 bytes
Variable Size             201327416 bytes
Database Buffers          213909504 bytes
Redo Buffers                2973696 bytes
SQL> !vi ctl.sql

SQL> shut immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac2 oradata]$ cd $ORACLE_HOME/dbs
[oracle@rac2 dbs]$ vi initram.ora
[oracle@rac2 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 13 11:28:02 2013

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area  419430400 bytes
Fixed Size                  1219784 bytes
Variable Size             201327416 bytes
Database Buffers          213909504 bytes
Redo Buffers                2973696 bytes
SQL> !vi /prod/ram/oradata/ctl.sql

SQL> !vi /prod/ram/oradata/ctl.sql

SQL> @/prod/ram/oradata/ctl.sql

Control file created.

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 887621 generated at 03/13/2013 10:31:35 needed for thread 1
ORA-00289: suggestion : /prod/ram/admin/arch/1_29_806574211.dbf
ORA-00280: change 887621 for thread 1 is in sequence #29


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 887749 generated at 03/13/2013 10:36:15 needed for thread 1
ORA-00289: suggestion : /prod/ram/admin/arch/1_30_806574211.dbf
ORA-00280: change 887749 for thread 1 is in sequence #30
ORA-00278: log file '/prod/ram/admin/arch/1_29_806574211.dbf' no longer needed
for this recovery


ORA-00328: archived log ends at change 866064, need later change 887749
ORA-00334: archived log: '/prod/ram/admin/arch/1_30_806574211.dbf'


SQL> recover database cancel;
ORA-00274: illegal recovery option CANCEL


SQL> alter database open resetlogs;

Database altered.

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- ----------
RAMCLONE  READ WRITE

SQL> !vi /prod/ram/oradata/ctl.sql

No comments: