shutdown abort后,丢失全部文件(除了archive log和init.ora)即,丢失了全部数据文件、控制文件和redo log file
准备工作 下面的信息说明了如果是完全恢复,可以看到insert into test1 values(16);,否则可以看到15,就是被归档的那个。17因为没有提交,是不会被恢复的。
SQL> conn internal
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination d:\BACKUPDB\archive
Oldest online log sequence 14
Next log sequence to archive 16
Current log sequence 16
SQL> conn lunar/lunar
SQL> select * from test1 where a>10;
SQL> insert into test1 values(15);
SQL> alter system switch logfile;
System altered.
SQL> insert into test1 values(16);
SQL> insert into test1 values(17);
新开一个session,进行shutdown abort
E:\>sqlplus internal
SQL> shutdown abort
ORACLE 例程已经关闭。
把热备的数据文件和控制文件拷贝过来
mount数据库
E:\>sqlplus internal
SQL> startup mount
ORACLE instance started.
ORA-01991: invalid password file 'd:\oracle1\ora81\DATABASE\PWDbackup.ORA'
根据提示重建口令文件
SQL> host
E:\>del d:\oracle1\ora81\DATABASE\PWDbackup.ORA
E:\>orapwd file=d:\oracle1\ora81\DATABASE\PWDbackup.ORA password=oracle entries=
10