Sei sulla pagina 1di 3

RAC to RAC Clone (NPMP to NPMT)

1. Point-in-time used for Recovery 02.04.2009 03:54:32


2. Prefetch
pf ITSM1001 -node TDPO_NPMP 2009-04-02
3. create spfile from pfile;
4. Comment all Cluster related parameters and NPMT1 parameters as below
cluster_database=false
cluster_database_instances =1
dbname=NPMP
5. Used setnewname.sql
SQL>set linesize 300
SQL>set pagesize 200
SQL>set long 100
SQL>spool setnewname.sql
select 'set newname for datafile '||file#||' to '|| replace(name,
' +DG_DB_NPMP/npmp/datafile',''''||' +DG_DB_NPMT/npmt/datafile')||''';' from v$datafile;
SQL>Spool off
6. Shutdown the DB
srvctl stop database -d NPMT
7. Mount the DB in restrict mode to drop the database
SQL > startup mount pfile=initNPMT1.ora restrict
SQL> Drop database;
SQL> Shut immediate;

8. SQL>Startup nomount pfile=initNPMT1.ora


9. Restore control file
Connect rman10 catalog

2009-10-17

IT Operations Oracle DB Operations

Page 1

rman catalog
run {
set until time "to_date('02.04.2009 03:54:32', 'DD.MM.YYYY HH24:MI:SS')" ;
allocate channel ch1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE
/usr/tivoli/tsm/client/oracle/bin64/tdpoconf showenv -TDPO_OPTfile=/tui/npmdb/pat/oracle/admin/NPMT/scripts/TDPO/tdpo.NPMP.opt)';
restore controlfile;
}
10. SQL>alter database mount ;
11. Restore database as below
run {
set until time "to_date('02.04.2009 03:54:32', 'DD.MM.YYYY HH24:MI:SS')" ;
allocate channel ch1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE
/usr/tivoli/tsm/client/oracle/bin64/tdpoconf showenv -TDPO_OPTfile=/tui/npmdb/pat/oracle/admin/NPMT/scripts/TDPO/tdpo.NPMP.opt)';
@setnewname.sql
restore ( database);
switch datafile all;
recover database delete archivelog;
}
12. SQL> alter database open resetlogs;
ERROR at line 1:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled
Got error as below due to Bug 4355382 and solution is set the hidden parameter
13. alter system set "_no_recovery_through_resetlogs"=TRUE
14. Rename the Database name with NID
Nid target=/ dbname=NPMT
15. Uncomment all cluster parameters and restart the DB and change the DBname to NPMT
16. SQL>Startup pfile=initNPMT1.ora
17. Enable thread for 2:
SQL> alter database enable public thread 2;
alter database enable public thread 2
ERROR at line 1:
ORA-01613: instance UNNAMED_INSTANCE_2 (thread 2) only has 0 logs - at least 2 logs
required to enable.
18. Add 5 groups as below for Thread 2 to avoid the above error
alter database add logfile thread 2 group 6 size 1G;

2009-10-17

IT Operations Oracle DB Operations

Page 2

alter database add logfile thread 2 group 7 size 1G;


alter database add logfile thread 2 group 8 size 1G;
alter database add logfile thread 2 group 9 size 1G;
alter database add logfile thread 2 group 10 size 1G;
19. alter database enable public thread 2;
20. Check All logfiles of Thread 1 & 2 are same in size (1GB)
select GROUP#,THREAD#,SEQUENCE# ,bytes/1024/1024/1024 ,status from v$log;
GROUP# THREAD# SEQUENCE# BYTES/1024/1024/1024 STATUS
---------- ---------- ---------- -------------------- -------------------1
1
2931
1 CURRENT
2
1
2927
1 INACTIVE
3
1
2928
1 INACTIVE
4
1
2929
1 INACTIVE
5
1
2930
1 INACTIVE
6
2
2167
1 INACTIVE
7
2
2171
1 CURRENT
8
2
2169
1 INACTIVE
9
2
2170
1 INACTIVE
10
2
2168
1 INACTIVE
21. SQL>shutdown immediate
22. srvctl start database d NPMT
23. Verify all RAC related applications are up and running
.oracle.env CRS
cd $CRS_HOME/bin
./crs_stat t

2009-10-17

IT Operations Oracle DB Operations

Page 3

Potrebbero piacerti anche