ORACLE case study - there is no backup. Only archive logs, how to recover data files?
1, the operating system: Solaris9
2, Database: Oracle 9i R2
Simulation of phenomena:
Through the reconstruction of data files to restore, on the assumption that a complete archive log file is saved
First set the database to archive mode
bash-2.05 $ sqlplus "/ as sysdba"
SQL * Plus: Release 9.2.0.1.0 - Production on Wednesday January 18 16:46:29 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Been connected to the idle routine.
- Start the database, view database archiving mode, such as not archiving mode, open the archive.
SQL> startup
ORACLE instance started.
Total System Global Area 320308312 bytes
Fixed Size 730200 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 811008 bytes
The database load is completed.
The database has been opened.
SQL> archive log list
Database log mode No Archive Mode
Disable Auto-Archive
Archive destination / oracle/oracle9i/u01/product/9201/dbs/arch
A summary of the earliest log sequence 23
Current log sequence 25
SQL> shutdown immediate
Database has been closed.
The database has been uninstalled.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 320308312 bytes
Fixed Size 730200 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 811008 bytes
The database load is completed.
SQL> alter database archivelog;
The database has changed.
SQL> archive log start
Statements have been processed
SQL> alter database open;
The database has changed.
SQL> archive log list
Database log mode Archive Mode
Enable automatic archiving
Archive destination / oracle/oracle9i/u01/product/9201/dbs/arch
A summary of the earliest log sequence 23
The next archived log sequence 25
Current log sequence 25
- Create a test table space
SQL> create tablespace test datafile
2 '/ oracle/oracle9i/oradata/oratest/test.ora' size 5M
3 default storage (initial 128K next 1M pctincrease 0)
4 /
Table space has been created.
- Create a test user
SQL> create user test identified by test default tablespace test;
The user has been created
SQL> grant connect, resource to test;
Grant succeeded.
- Create a test user's Test Table
SQL> conn test / test
Is connected.
SQL> create table a (a number);
The table has been created.
SQL> insert into a values (1);
Have created a row.
SQL> insert into a select * from a;
Have created a row.
SQL> select * from a;
A
----------
1
1
SQL> commit;
To submit completed.
SQL>
SQL> exit
From the Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production of disconnect
bash-2.05 $ sqlplus "/ as sysdba"
SQL * Plus: Release 9.2.0.1.0 - Production on Wednesday January 18 16:55:51 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connect to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
- Mandatory Filed
SQL> alter system switch logfile;
The system has changed.
SQL> alter system switch logfile;
The system has changed.
SQL> alter system switch logfile;
The system has changed.
SQL> shutdown
Database has been closed.
The database has been uninstalled.
ORACLE instance shut down.
- The operating system to manually delete the test data files, start the database Baocuo
SQL> startup
ORACLE instance started.
Total System Global Area 320308312 bytes
Fixed Size 730200 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 811008 bytes
The database load is completed.
ORA-01157: can not identify / lock data file 17 - see DBWR trace file
ORA-01110: data file 17: '/ oracle/oracle9i/oradata/oratest/test.ora'
SQL> exit
bash-2.05 $ sqlplus "/ as sysdba"
SQL * Plus: Release 9.2.0.1.0 - Production on Wednesday January 18 16:58:14 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connect to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> startup mount
ORA-01081: can not start already running, first turn off the ORACLE ---
SQL> shutdown
ORA-01109: database not open
The database has been uninstalled.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 320308312 bytes
Fixed Size 730200 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 811008 bytes
The database load is completed.
- Create test data files
SQL> alter database create datafile '/ oracle/oracle9i/oradata/oratest/test.ora';
The database has changed.
SQL> set autorecovery on
SQL> recover datafile '/ oracle/oracle9i/oradata/oratest/test.ora';
ORA-00279: change 2012426 (on 01/18/2006 16:53:07 build) for thread 1 is required
ORA-00289: proposed: / oracle/oracle9i/u01/product/9201/dbs/archarch_1_25.dbf
ORA-00280: Change 2012426 for thread 1 is carried out by sequence # 25
Log has been applied.
To complete media recovery.
SQL> alter database open;
The database has changed.
- Test the table to resume
SQL> conn test / test
Is connected.
SQL> select * from a;
A
----------
1
1
SQL>
SQL> conn system / manager
Is connected.
SQL> alter tablespace test offline;
The table space has changed.
SQL> drop tablespace test INCLUDING CONTENTS;
The table space has been discarded.
SQL> drop user test;
User has been discarded
-------------------------------------------------- ------------
Mengxuan.cn Blog copyright, (Mail): mengxuan.cn @ Gmail.com, reproduced please specify source and the original author
Related Posts of ORACLE case study - there is no backup. Only archive logs, how to recover data files?
-
ORACLE10G full version centos5 installed (the installation has passed)
ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...
-
SGA extended the principle of 32bit oracle
SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...
-
Dbms_obfuscation_toolkit use of Oracle's encryption and decryption of data (to)
In order to protect sensitive data, oracle start from 8i to provide a data encryption package: dbms_obfuscation_toolkit. Take advantage of this package, our data can be DES, Triple DES or MD5 encryption. This article on the use of this and the use of ...
-
Oracle XDB relax resolve port conflict of 8080
In this paper, carried: http://www.enet.com.cn/article/2008/0306/A20080306175452.shtml Oracle 9i from the start, Oracle includes the installation of the default XDB. After starting the database, Oracle XDB's http service will automatically take u ...
-
Oracle in the relationship between User and Schema
If we want to know the database and the User What is the relationship between Schema, we must first know about User and Schema database What is the concept in the end. In SQL Server2000 in architecture because of the reason, User and Schema there is ...
-
High Availability Oracle Flashback
Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...
-
An example of the use of TKPROF
First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE
-
Diagnosis and principles of order
SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...
-
ORACLE 10G dataguard configuration Step by Step
oracle dataguard













Leave a Reply