Ready to work
Hereinafter, if the database is completely restored, you should be able to see INSERT INTO TEST1 VALUES (7);
SQL> INSERT INTO TEST1 VALUES (3);
1 row created.
SQL> Commit
2 ;
COMMIT COMPLETE.
SQL> INSERT INTO TEST1 VALUES (4);
1 row created.
SQL> commit;
COMMIT COMPLETE.
SQL>
SQL> ALTER SYSTEM SWITCH LOGFILE;
SYSTEM altered.
SQL> CONN INTERNAL
Connected.
SQL> Archive Log List;
Database log mode archive mode
Automatic archival enabled
Archive Destination D: / Backupdb / Archive
Oldest Online Log Sequence 8
Next log sequence to archive 10
Current Log Sequence 10
SQL>
SQL> SELECT * from Test1;
A
------------
1
2
3
4
SQL> INSERT INTO TEST1 VALUES (5);
1 row created.
SQL> commit;
COMMIT COMPLETE.
SQL> INSERT INTO TEST1 VALUES (6);
1 row created.
SQL> ALTER SYSTEM SWITCH LOGFILE;
SYSTEM altered.
SQL>
SQL> CONN INTERNAL
Connected.
SQL> Conn
Lunar / Lunar
Connected.
SQL> INSERT INTO TEST1 VALUES (7);
1 row created.
SQL> Shutdown Abort;
ORA-01031: Insufficient Privileges
SQL> CONN INTERNAL
Connected.
SQL> Shutdown Abort;
Oracle Instance Shut Down.
SQL>
Delete the control file, copy the hot-standing control file
mount database
SQL> Startup Mount
Oracle Instance Started.
Total System Global Area 25856028 Bytes
Fixed Size 75804 BYTES
Variable size 8925184 bytes
Database buffers 16777216 BYTES
Redo buffers 77824 bytes
ORA-01991: Invalid Password File 'D: /oracle1/ora81/Database/pwdbackup.ora'
Rebate the password file according to the prompt
SQL> Host
Microsoft Windows 2000 [Version 5.00.2195]
(C) All rights reserved 1985-2000 Microsoft Corp.
E: /> CD D: / Oracle1 / ORA81 / DATABASE
E: /> D:
D: / Oracle1 / ORA81 / DATABASE> DEL PWDBACKUP.ORAD: / ORACLE1 / ORA81 / DATABASE> DIR
The volume in the drive D is Program
The serial number of the volume is D0E6-FA1C
D: / Oracle1 / Ora81 / Database directory
2002-10-21 00:42
2002-10-21 00:42
2002-10-05 15:36
2002-10-17 13:39 40 Initbackup.ora
2002-10-05 16:09 50 Inittest.ora
2002-10-05 15:36 31,744 ORADBA.EXE
2002-10-07 23:39 206 ORADIM.LOG
2002-10-16 18:21 1,536 PWDTEST.ORA
5 files 33,576 bytes
3 catalogs 2,775,724,032 available bytes
D: / Oracle1 / Ora81 / Database>
D: / Oracle1 / Ora81 / Database> ORAPWD File = D: /oracle1/ora81/database/pwdbackup.ora password = Oracle Entries = 10;
D: / Oracle1 / Ora81 / Database> EXIT
Use to TRACE; backup control file
SQL> ALTER DATABASE Backup ControlFile to TRACE;
Database altered.
SQL> Shutdown Immediate
ORA-01109: Database Not Open
Database dismount.
Oracle Instance Shut Down.
SQL>
Find that control file, then edit
Startup Nomount
Create ControlFile Reuse Database "Backup" NoreSetlogs ArchiveLog
MaxLogfiles 32
MaxLogmembers 2
MaxDatafiles 254
MaxInstances 1
MaxLoghistory 453
Logfile
Group 1 'd: /backupdb/redo01.log' size 1M,
Group 2 'D: /backupdb/redo02.log' size 1M,
Group 3 'D: /backupdb/redo03.log' size 1M
DataFile
'D: /backupdb/system01.dbf',
'D: /backupdb/rbs01.dbf',
'D: /backupdb/Users01.dbf',
'D: /backupdb/temp01.dbf',
'D: /backupdb/tools01.dbf',
'D: /backupdb/indx01.dbf'
Character set zhs16gbk
;
Recover Database
Alter System Archive Log ALL;
ALTER DATABASE OPEN
Rebuild the control file and restore the database (complete recovery!)
SQL> @d: /backupdb/udump/ora02092.sqlora-01081: Cannot Start Already-Running Oracle - Shut It Down First
Cluster altered.
Media Recovery Complete.
SYSTEM altered.
Database altered.
SQL>
SQL> Conn
Lunar / Lunar
Connected.
SQL> SELECT * from Test1;
A
------------
1
2
3
4
5
6
Seduce
7 rows selected.
SQL>
Complete recovery!
Description:
When you lose all control files (excluding data files and REDO), you need to completely restore the database, you need to completely restore (the data of CommIT in REDO) is required. step:
1. Mount database,
2. Backup ControlFile to TRACE
3. Modify this generated control file
4. Nomount
5. Reconstruction control files,