STATUS
------------
OPEN
SQL> show parameter
name;
NAME TYPE VALUE
------------------------------------
-----------
------------------------------
db_file_name_convert string
db_name string hand
db_unique_name string hand
global_names boolean FALSE
instance_name string hand
lock_name_space string
log_file_name_convert string
service_names string hand.likun.com
data]$ rm -rf
hand
dba_segments;
Mar ::
Thread advanced to log sequence
(LGWR switch)
seq# mem# : seq# mem# : /data/hand/redo03b.log
Mon Mar
::
Starting background process CJQ0
Mon Mar ::
CJQ0 started with
pid, OS id
Mon Mar ::
Thread advanced to log sequence
(LGWR switch)
seq# mem# : seq# mem# : /data/hand/redo01b.log
Mon Mar
::
SERVER COMPONENT id ::
4、查看数据文件的句柄
trace]$ ps -ef|grep
ora_dbw
oracle Mar17
? 00:00: ora_dbw0_hand
oracle : pts 00:00:00 grep
ora_dbw
[oracle@www trace]$ cd
[oracle@www ]$ cd fd
[oracle@www fd]$ ls
lr-x------
oracle oinstall
: -> /dev/null
l-wx------
oracle oinstall
: -> /dev/null
l-wx------
oracle oinstall
: -> /dev/null
lr-x------
oracle oinstall
: /fd
lrwx------
oracle oinstall
: ../dbs/lkinsthand
(deleted)
lrwx
oracle oinstall : ../dbs/hc_hand.dat
lr-x------
oracle oinstall
: -> /dev/null
lr-x------
oracle oinstall
: -> /dev/null
lr-x------
oracle oinstall
: -> /dev/null
l-wx------
oracle oinstall
:
oracle oinstall : -> /data/hand/users01.dbf (deleted)
lrwx------
oracle oinstall
: -> /data/hand/temp01.dbf (deleted)
lrwx------
oracle oinstall
: -> /data/hand/undotbs01.dbf (deleted)
lrwx------
oracle oinstall
: -> /data/hand/sysaux01.dbf (deleted)
lrwx------
oracle oinstall
: -> /data/hand/system01.dbf (deleted)
lrwx------
oracle oinstall
:
oracle oinstall : -> /u01/oracle/oradata/hand/control01.ctl
lr-x------
oracle oinstall
: ../rdbms/mesg/oraus.msb
lrwx------
oracle oinstall
: ..
oracle oinstall : ../dbs/hc_hand.dat
lr-x------
oracle oinstall
:
oracle oinstall :
oracle oinstall :
oracle oinstall : ..
oracle oinstall :
oracle oinstall : -> /u01/oracle/diag/rdbms/hand/hand/trace/hand_ora_16835.trc
5、恢复数据文件
fd]$ mkdir /data/hand
[oracle@www
fd]$ cp
oracle oinstall
:00 sysaux01.dbf
-rw-r-----
oracle oinstall : system01.dbf
-rw-r-----
oracle oinstall : temp01.dbf
-rw-r-----
oracle oinstall : undotbs01.dbf
-rw-r-----
oracle oinstall :
users01.dbf
fd]$ ps -ef |grep
ora_lgwr
oracle Mar17
? 00::
ora_lgwr_hand
oracle : pts 00:00:00 grep
ora_lgwr
[oracle@www fd]$ pwd
/fd
[oracle@www fd]$ ll
l-wx------
oracle oinstall
: -> /dev/null
lr-x------
oracle oinstall
:
oracle oinstall : ../dbs/lkinsthand
(deleted)
lrwx
oracle oinstall : ../dbs/hc_hand.dat
lr-x------
oracle oinstall
: -> /dev/null
lr-x------
oracle oinstall
: -> /dev/null
lr-x------
oracle oinstall
: -> /dev/null
l-wx------
oracle oinstall
:
oracle oinstall : -> /dev/null
lr-x------
oracle oinstall
:
oracle oinstall : ../rdbms/mesg/oraus.msb
lrwx------
oracle oinstall
: ..
oracle oinstall : ../dbs/hc_hand.dat
lr-x------
oracle oinstall
:
oracle oinstall :
oracle oinstall :
oracle oinstall : ..
oracle oinstall :
oracle oinstall :
oracle oinstall :
oracle oinstall :
oracle oinstall :
oracle oinstall :
oracle oinstall :
oracle oinstall :
oracle oinstall :
oracle oinstall : /data/hand/redo01a.log
test(id number);
Table created.
SQL> insert into test
);
row created.
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE
instance started.
Total System Global
Area bytes
Fixed bytes
Variable
bytes
Database
Buffers bytes
Redo
Buffers bytes
Database
mounted.
ORA:
Session ID:
...
/u01/oracle/diag/rdbms/hand/hand/trace/hand_lgwr_30473.trc:
/u01/oracle/diag/rdbms/hand/hand/trace/hand_lgwr_30473.trc:
/u01/oracle/diag/rdbms/hand/hand/trace/hand_ora_30494.trc:
clear unarchived logfile ;
Database
altered.
;
Database altered.
SQL> alter database
clear unarchived logfile ;
Database
altered.
SQL> alter database open;
Database altered.
SQL> select * from test;
select * from
test
:
ORA: table or view does not exist
10、经过再次试验,发现在恢复redo时,只恢复状态为inactive的日志,最后重启数据库前,多次alter system switch
logfile来切日志,把日志中信息写盘。
最后重启数据库,但是启动还是报错,但是日志中已经没有未存盘的数据,此时可以clear日志再open就不会丢数据了。
Size
1336288 bytes
Size
209718304 bytes
104857600 bytes
Buffers
6316032 bytes
5