users表空间热备(修复)
表空间正在热备的时候,数据库突然abort了,数据库正常启动startup时,启动不了到mount的状态,此时在启动的过程中报错,要怎么解决呢?
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@station datafile]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 8 14:35:42 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> create table hr.strom (a number) tablespace users;
Table created.
SQL> alter system switch logfile;
System altered.
SQL> insert into hr.strom values(1);
1 row created.
SQL> alter system switch logfile;
System altered.
SQL> commit;
Commit complete.
SQL> alter tablespace users begin backup;
Tablespace altered.
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area  281018368 bytes
Fixed Size                  2020192 bytes
Variable Size             146803872 bytes
Database Buffers          130023424 bytes
Redo Buffers                2170880 bytes
Database mounted.
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4:
'/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_7x4j6bxl_.dbf'

SQL> select * from v$backup;
     FILE# STATUS                CHANGE# TIME
---------- ------------------ ---------- ------------------
         1 NOT ACTIVE                  0
         2 NOT ACTIVE                  0
         3 NOT ACTIVE                  0
         4 ACTIVE                 952313 08-JUN-12
         5 NOT ACTIVE                  0
SQL> alter database datafile 4 end backup;
Database altered.
SQL> alter database open;
Database altered.
SQL> select * from hr.strom;
         A
----------
         1