Database Refresh/rebuild from hot backup
Verify/calculate need for disk space and available disk space
Ex: for i in 2 3 4 5 6 7 8
>do
>rm $/vol$i/oradata/DEST_SID/*
>done
Ex: From source machine, go to the hot backup files area.
$for iii in 2 3 4 5 6 7 8
Login to source database and issue the command
Svrmgrl> alter database backup controlfile to trace;
Copy the trace file of control file creation to destination database
Change the oracle SID to DEST_SID from SRC_SID
Modify all datafile locations
CREATE controlfile SET database "DEST_DB" resetlogs NoArchivelogmode;
Svrmgrl> connect internal
Svrmgrl> startup nomount;
Svrmgrl>@modified_control_file.sql
9) svrmgrl>RECOVER DATABASE USING BACKUP until cancel;
apply logs e until the time you want to refresh
CANCEL
*************************************************************
Example PROCEDURE
98) oracle@orion% ls
dbmod_devafus.sql
(99) oracle@orion% svrmgrl
Oracle Server Manager Release 2.3.4.0.0 - Production
Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.
Oracle7 Server Release 7.3.4.5.0 - Production
With the distributed, replication and parallel query options
PL/SQL Release 2.3.4.5.0 - Production
SVRMGR> connect internal
Connected to an idle instance.
SVRMGR> startup nomount
ORACLE instance started.
Total System Global Area 37596460 bytes
Fixed Size 39816 bytes
Variable Size 21008804 bytes
Database Buffers 16384000 bytes
Redo Buffers 163840 bytes
SVRMGR> @dbmod_devafus.sql
Statement processed.
SVRMGR> recover database using backup controlfile until cancel;
ORA-00279: Change 640511289 generated at 05/06/00 01:00:15 needed for thread 1
ORA-00289: Suggestion : /export/home/oracle/admin/DMET/arch/DMET/0000001017_0001.ARC
ORA-00280: Change 640511289 for thread 1 is in sequence #1017
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: Change 640512272 generated at 05/06/00 01:59:32 needed for thread 1
ORA-00289: Suggestion : /export/home/oracle/admin/DMET/arch/DMET/0000001018_0001.ARC
ORA-00280: Change 640512272 for thread 1 is in sequence #1018
ORA-00278: Logfile '/export/home/oracle/admin/DMET/arch/DMET/0000001017_0001.ARC' no longer needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SVRMGR> alter database open resetlogs;
alter database open resetlogs
*
ORA-00344: unable to recreate online log '/vol02/vol1/oradata/DMET/redo03_m.log'
ORA-07352: sfccf: create error, unable to create file.
SVR4 Error: 2: No such file or directory
SVRMGR> shutdown abort;
ORACLE instance shut down.
SVRMGR> host
[ Removed created redo log files and control files ]
(51) oracle@orion% svrmgrl
Oracle Server Manager Release 2.3.4.0.0 - Production
Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.
Oracle7 Server Release 7.3.4.5.0 - Production
With the distributed, replication and parallel query options
PL/SQL Release 2.3.4.5.0 - Production
SVRMGR> connect internal
Connected to an idle instance.
SVRMGR> startup nomount
ORACLE instance started.
Total System Global Area 37596460 bytes
Fixed Size 39816 bytes
Variable Size 21008804 bytes
Database Buffers 16384000 bytes
Redo Buffers 163840 bytes
SVRMGR> @dbmod_devafus.sql
Statement processed.
SVRMGR> alter database open resetlogs;
Statement processed.
SVRMGR> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
PAFZ.DNT.QUESTAM.COM
1 row selected.
SVRMGR> alter database rename global_name to DMET.DNT.QUESTAM.COM;
Statement processed.
SVRMGR> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
DMET.DNT.QUESTAM.COM
1 row selected.
SVRMGR>