Lost control files (in the case of non-archiving) _9201
Set the character set
C: /> set nls_lang = american_america.us7ascii
Check if the database is noarchivelog mode
C: /> SQLPLUS "/ as sysdba"
SQL * Plus: Release 9.2.0.1.0 - Production on Tue Feb 5 11:50:26 2002
CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the partitioning, OLAP AND ORACLE DATA MINING OPTIONS
JServer Release 9.2.0.1.0 - Production
SQL> Archive Log List;
Database log mode no archive mode
Automatic archival enabled
Archive Destination E: / Oracle / ORADATA / TEST / Archive
Oldest Online Log Sequence 70
Current Log Sequence 73
SQL>
Database cooling
Switch to the backup script where the directory is current directory
H: / Vertex Studio / Cuug Courses / Backup and Recovery / Backup_Scripts / ColdBackup_for_win_9201> DIR
The volume in the drive h is Works
The serial number of the volume is B07F-C733
H: / Vertex Studio / Cuug Courses / Backup and Recovery / Backup_scripts / ColdBackup_for_win_9201
table of Contents
2002-02-05 11:46
2002-02-05 11:46
2002-02-05 11:57 230 Cold_Backup.bat
2002-02-05 11:28 72 shutdown.sql
2002-02-05 11:28 33 Startup.sql
2002-02-05 11:44 1,970 cold_backup.log
2002-02-05 11:47 2,069 cold backup process .txt
5 files 4,374 bytes
2 directory 10,090,692,608 available bytes
Execute a backup script
H: / Vertex Studio / Cuug Course Arrangement / Backup and Recovery / Backup_Scripts / ColdBackup_for_win_9201> Color
D_Backup.bat> Cold_Backup.log
H: / Vertex Studio / Cuug Courses / Backup and Recovery / Backup_Scripts / ColdBackup_for_win_9201> CD
/
H: />
Check the backup log
H: / Vertex Studio / Cuug Course Arrangement / Backup and Recovery / Backup_scripts / ColdBackup_for_win_9201> Echo Begin Cold_Backup Database ...
Begin Cold_Backup Database ...
H: / vertices Studio / Cuug course Arrangement / Backup and Restore / Backup_Scripts / ColdBackup_for_win_9201> DATE / T
2002-02-05 Tuesday H: / vertices Studio / Cuug course Arrangement / Backup and Recovery / Backup_scripts / ColdBackup_for_win_9201> TIME / T
12:00
H: / Vertex Studio / Cuug Courses / Backup and Restore / Backup_scripts / ColdBackup_for_win_9201> SQLPLUS "/ as sysdba" @ Shutdown.sql
SQL * Plus: Release 9.2.0.1.0 - Production on Tue Feb 5 12:00:03 2002
CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the partitioning, OLAP AND ORACLE DATA MINING OPTIONS
JServer Release 9.2.0.1.0 - Production
Connected.
Database closed.
Database dismount.
Oracle Instance Shut Down.
Oracle Instance Started.
Total System Global Area 135338868 BYtes
Fixed size 453492 bytes
Variable size 109051904 bytes
Database buffers 25165824 BYTES
Redo buffers 667648 bytes
Database mounted.
Database opened.
Database closed.
Database dismount.
Oracle Instance Shut Down.
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the partitioning, OLAP AND ORACLE DATA MINING OPTIONS
JServer Release 9.2.0.1.0 - Production
H: / Vertex Studio / Cuug Course Arrangement / Backup and Recovery / Backup_Scripts / ColdBackup_for_win_9201> Copy E: / Oracle / ORA92 / TEST / TEST / *. * D: / ClONEDB
E: /oracle/ora92/test/control02.ctl
E: /oracle/ora92/test/control03.ctl
E: /oracle/ora92/test/drsys01.dbf
E: /oracle/ora92/test/indx01.dbf
E: /oracle/ora92/test/redo01.log
E: /oracle/ora92/test/redo02.log
E: /oracle/ora92/test/redo03.log
E: /oracle/ora92/test/redo04a.log
E: /oracle/ora92/test/redo04b.log
E: /oracle/ora92/test/rman01.dbf
E: /oracle/ora92/test/system01.dbf
E: /oracle/ora92/test/temp01.dbf
E: /oracle/ora92/test/tools01.dbf
E: /oracle/ora92/test/undotbs01.dbf
E: /oracle/ora92/test/USERS01.DBF
E: /oracle/ora92/test/xdb01.dbf has been copied 16 files.
H: / Vertex Studio / Cuug Course Arrangement / Backup and Recovery / Backup_Scripts / ColdBackup_for_win_9201> SQLPlus "/ as sysdba" @ Startup.sql
SQL * Plus: Release 9.2.0.1.0 - Production on Tue Feb 5 12:04:22 2002
CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.
Connected to an iDLE Instance.
Connected to an iDLE Instance.
Oracle Instance Started.
Total System Global Area 135338868 BYtes
Fixed size 453492 bytes
Variable size 109051904 bytes
Database buffers 25165824 BYTES
Redo buffers 667648 bytes
Database mounted.
Database opened.
SYSTEM altered.
Database altered.
SYSTEM altered.
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the partitioning, OLAP AND ORACLE DATA MINING OPTIONS
JServer Release 9.2.0.1.0 - Production
H: / vertices Studio / Cuug course Arrangement / Backup and Restore / Backup_Scripts / ColdBackup_for_win_9201> DATE / T
2002-02-05 Tuesday
H: / Vertex Studio / Cuug Courses / Backup and Recovery / Backup_Scripts / ColdBackup_for_win_9201> Time / T
12:04
H: / Vertex Studio / Cuug Course Arrangement / Backup and Recovery / Backup_scripts / ColdBackup_for_win_9201> Echo The Cold Backup Database Successed.
The Cold Backup Database Successed.
Test data
C: /> SQLPLUS "/ as sysdba"
SQL * Plus: Release 9.2.0.1.0 - Production on Tue Feb 5 13:13:50 2002
CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the partitioning, OLAP AND ORACLE DATA MINING OPTIONS
JServer Release 9.2.0.1.0 - Production
SQL> Archive Log List;
Database log mode no archive mode
Automatic archival enabled
Archive Destination E: / Oracle / ORADATA / TEST / Archive
Oldest Online Log Sequence 70current Log Sequence 73
SQL>
SQL> Conn Lunar / Lunar
Connected.
SQL> SELECT *.
Fly
------------
1
2
SQL> INSERT INTO TEST VALUES (5);
1 row created.
SQL> INSERT INTO TEST VALUES (6);
1 row created.
SQL> commit;
COMMIT COMPLETE.
SQL> SELECT *.
Fly
------------
1
2
5
6
SQL> INSERT INTO TEST VALUES (7);
1 row created.
SQL> SELECT *.
Fly
------------
1
2
5
6
Seduce
SQL> conn / as sysdba
Connected.
SQL> Archive Log List;
Database log mode no archive mode
Automatic archival enabled
Archive Destination E: / Oracle / ORADATA / TEST / Archive
Oldest Online Log Sequence 70
Current Log Sequence 73
SQL>
Simulate all control files corruption
C: /> SQLPLUS "/ as sysdba"
SQL * Plus: Release 9.2.0.1.0 - Production on Tue Feb 5 12:08:11 2002
CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the partitioning, OLAP AND ORACLE DATA MINING OPTIONS
JServer Release 9.2.0.1.0 - Production
SQL>
Make destructive editing for all control files
SQL> conn / as sysdba
Error:
ORA-01092: Oracle routine termination. Forced disconnection
Error:
ORA-24313: User has obtained prove
Warning: You are no longer connected to Oracle.
SQL> EXIT
C: /> SQLPLUS "/ as sysdba"
SQL * Plus: Release 9.2.0.1.0 - Production On Tuesday 5 14:07:36 2002
CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.
The idle routine is connected.
SQL>
Visible database has been Crash
Start the database again, you will report an error:
SQL> Startup
Oracle Instance Started.
Total System Global Area 135338868 BYtes
Fixed size 453492 bytes
Variable size 109051904 bytes
Database buffers 25165824 BYTES
Redo buffers 667648 BYTESORA-00227: Corrupt Block Detected in ControlFile: (Block 1, # blocks 1)
ORA-00202: ControlFile: 'E: /oracle/ora92/test/control02.ctl'
SQL>
Restore Database - Reconstruction Control File Recovery Database
Modify and execute the control file for Backup to TRACE
SQL> Startup
Oracle Instance Started.
Total System Global Area 135338868 BYtes
Fixed size 453492 bytes
Variable size 109051904 bytes
Database buffers 25165824 BYTES
Redo buffers 667648 bytes
ORA-00227: Corrupt Block Detected in ControlFile: (Block 1, # block 1)
ORA-00202: ControlFile: 'E: /oracle/ora92/test/control02.ctl'
SQL> Create ControlFile Reuse Database "Test1" NoSetlogs NoarchiveLog
2 MaxLogfiles 5
3 MaxLogmembers 3
4 MaxDataFiles 100
5 MaxInstances 1
6 MaxLoghistory 226
7 logfile
8 group 1 'E: /oracle/ora92/test/redo01.log' size 30m,
9 Group 2 'E: /Oracle/ora92/test/redo02.log' size 30m,
10 Group 3 'E: /Oracle/ora92/test/redo03.log' size 30m
11 DataFile
12 'E: /oacle/ora92/test/system01.dbf',
13 'E: /oracle/ora92/test/undotbs01.dbf',
14 'E: /oacle/ora92/test/drsys01.dbf',
15 'E: /oracle/ora92/test/indx01.dbf',
16 'E: /oracle/ora92/test/tools01.dbf',
17 'E: /oracle/ora92/test/USERS01.DBF',
18 'E: /oacle/ora92/test/xdb01.dbf',
19 'E: /oracle/ora92/test/rman01.dbf'
20 Character Set ZHS16GBK
twenty one ;
Control File Created.
Full recovery database
SQL> Recover data;
Media Recovery Complete.
Open the database
SQL> ALTABASE OPEN;
Database altered.
verify the data
SQL> Conn Lunar / Lunar
Connected.
SQL> SELECT *.
Fly
------------
1
2
5
6
Seduce
SQL> conn / as sysdba
Connected.
SQL> Archive Log List;
Database log mode no archive mode
Automatic archival enabled
Archive Destination E: / Oracle / ORADATA / TEST / Archive
Oldest Online Log Sequence 72
Current Log Sequence 75
SQL>